Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from github:main #11

Open
wants to merge 10,000 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
ad7c965
Rust: Correct extraction errors query to output only errors.
geoffw0 Oct 2, 2024
12fbd18
Rust: Have ExtractionConsistency.ql report both.
geoffw0 Oct 2, 2024
a4c06b2
Rust: Define SuccessfullyExtractedFile and use it to simplify queries.
geoffw0 Oct 2, 2024
88abc8f
Rust: Add to summary stats.
geoffw0 Oct 2, 2024
b16ba61
Merge pull request #17636 from github/revert-17629-release-prep/2.19.1
angelapwen Oct 2, 2024
fe54961
Release preparation for version 2.19.1
invalid-email-address Oct 2, 2024
569b650
Merge pull request #17649 from github/release-prep/2.19.1
angelapwen Oct 2, 2024
98d587c
Post-release preparation for codeql-cli-2.19.1
invalid-email-address Oct 2, 2024
0dc036a
Python: Allow type tracking through comprehensions
yoff Oct 3, 2024
9e808c1
Python: add change note
yoff Oct 3, 2024
6d486f9
Python: move change note to the right place
yoff Oct 3, 2024
56d0aff
Update python/ql/lib/semmle/python/frameworks/Stdlib.model.yml
yoff Oct 3, 2024
97c2387
Merge pull request #17644 from hvitved/rust/break-continue-target
hvitved Oct 3, 2024
91f1cf1
Merge pull request #17454 from yoff/stdlib-optparse
yoff Oct 3, 2024
5c68bad
Python: add comments
yoff Oct 3, 2024
0462809
Python: add taint test for urllib
yoff Sep 24, 2024
768d866
python: model `urllib.parse.parse_qs`
yoff Sep 24, 2024
8213987
Rust: Test spacing.
geoffw0 Oct 3, 2024
777279d
Python: MaD test expectations
yoff Oct 3, 2024
0304aa8
Rust: Add more tests for uused variables.
geoffw0 Oct 3, 2024
9902874
SSA: Add BarrierGuardWithState
asgerf Oct 3, 2024
da84889
Rust: Use @diagnostic_error, @diagnostic_warning rather than constants.
geoffw0 Oct 3, 2024
32dbdb3
Rust: Update summary stats .expected file.
geoffw0 Oct 3, 2024
3c777b7
Merge branch 'main' into warnings
geoffw0 Oct 3, 2024
cd04500
Rust: Account for variables bound in `while let` expressions
hvitved Oct 3, 2024
88b3d1f
Merge pull request #17565 from yoff/python/model-urllib-parse-parse-qs
yoff Oct 3, 2024
ccaf2dd
Rust: Temporarily limit results (hopefully enough for the DCA job to …
geoffw0 Oct 3, 2024
369241e
Merge pull request #5 from hvitved/unusedvar2
geoffw0 Oct 3, 2024
7600c24
Merge pull request #17639 from felickz/patch-1
michaelnebel Oct 3, 2024
64720ad
Merge pull request #17656 from geoffw0/unusedvar2
geoffw0 Oct 3, 2024
2e772a8
Rust: Accept minor consistency .expected changes.
geoffw0 Oct 3, 2024
321eb34
Merge pull request #17637 from smowton/smowton/admin/go-test-extracti…
smowton Oct 3, 2024
4c7ec59
Ruby: Sync identical files.
geoffw0 Oct 3, 2024
1ea94fa
Ruby: Make similar changes to differentiate extraction errors and war…
geoffw0 Oct 3, 2024
86cc2dc
Ruby: Add rb/diagnostics/extraction-warnings so that we don't miss an…
geoffw0 Oct 3, 2024
d4414da
Ruby: Add change notes.
geoffw0 Oct 3, 2024
05f8549
Rust: Add `&mut` variable tests
hvitved Oct 3, 2024
8542992
Merge pull request #17651 from github/post-release-prep/codeql-cli-2.…
angelapwen Oct 3, 2024
a9cf33c
Rust: `&x` is neither a read nor a write
hvitved Oct 3, 2024
aa5e0c3
Rust: Implement `ConditionalCompletionSplitting`
hvitved Oct 2, 2024
2832318
Java: Account for top-level `res` folders in `AndroidLayoutXmlFile`
hvitved Sep 20, 2024
bf0675e
Kotlin: Update two tests
hvitved Sep 23, 2024
953461d
C++: Update expected test output
hvitved Sep 23, 2024
b3b9406
Python: Update test
hvitved Sep 23, 2024
d0ca39f
JS: Update expected test output
hvitved Sep 26, 2024
c629867
Merge pull request #17654 from michaelnebel/modelgen/mixedbugfix
michaelnebel Oct 4, 2024
db5e452
Merge pull request #17536 from hvitved/ql-test-source-root
hvitved Oct 4, 2024
c064a9e
Update python/ql/lib/semmle/python/frameworks/Stdlib.qll
yoff Oct 4, 2024
201c4aa
Python: add comment
yoff Oct 4, 2024
977767b
Python: comment around dictionary comprehensions
yoff Oct 4, 2024
306b087
Merge pull request #17566 from yoff/python/dict-can-take-multiple-args
yoff Oct 4, 2024
50c2d10
Rust: Fix `CompoundAssignmentExpr` charpred
hvitved Oct 4, 2024
a4c1a62
Merge branch 'main' of https://github.com/github/codeql into python/a…
yoff Oct 4, 2024
04a4fb2
Merge pull request #17655 from hvitved/rust/variable-mut
hvitved Oct 4, 2024
6f5b949
Python: adjust test expectations
yoff Oct 4, 2024
b8eb2ab
C++: Add some documentation on the printed IR
jketema Oct 4, 2024
6bb98b0
Merge pull request #17577 from yoff/python/add-comprehension-capture-…
yoff Oct 4, 2024
d24bdbb
Java: Typo in a comment
igfoo Oct 4, 2024
927b402
Merge pull request #17668 from igfoo/igfoo/typo
owen-mc Oct 6, 2024
f1afa2b
Ruby: Fix expected test output
hvitved Oct 7, 2024
16feaf1
Go: Update expected test output
hvitved Oct 7, 2024
c04315a
Merge pull request #17670 from hvitved/ruby/fix-test
aibaars Oct 7, 2024
6196fd2
Swift: Update expected test output
hvitved Oct 7, 2024
c15749f
Merge pull request #17672 from hvitved/swift/fix-test
hvitved Oct 7, 2024
770774e
Merge pull request #17671 from hvitved/go/fix-tests
smowton Oct 7, 2024
26f8e64
Bump golang.org/x/tools
dependabot[bot] Oct 7, 2024
9bfd461
Merge pull request #17669 from github/dependabot/go_modules/go/extrac…
mbg Oct 7, 2024
1ce0ba5
SSA: Make WithState private
asgerf Oct 7, 2024
ed266da
C++: Address review comments
jketema Oct 7, 2024
5a4cd1c
Merge pull request #17661 from asgerf/shared/js-useuse-ssa-changes
asgerf Oct 8, 2024
96dda88
Rust: rename `generate-schema -> ast-generator`
Oct 8, 2024
26ac84a
Fix trailing whitespace in docs
d10c Sep 24, 2024
328f322
BigInt documentation
d10c Sep 24, 2024
61c3aa6
Rust: integrate rust code generation into `//rust/codegen`
Oct 8, 2024
c9bd9e9
C++: Modernize the 'cpp/unclear-array-index-validation' query by gett…
MathiasVP Oct 7, 2024
f6f5f5d
C++: Accept test changes.
MathiasVP Oct 7, 2024
afb5e4f
C++: Add test spacing.
MathiasVP Oct 7, 2024
c3d9ea1
C++: Add FP.
MathiasVP Oct 7, 2024
a2cdb9c
C++: Use range analysis at the sink to exclude trivial FPs.
MathiasVP Oct 7, 2024
8bb21e1
C++: Accept test changes.
MathiasVP Oct 7, 2024
823d5ac
C++: Spacing.
MathiasVP Oct 7, 2024
6ca978e
C++: Add FP test.
MathiasVP Oct 7, 2024
f7392d6
C++: Range analysis of 'getc'.
MathiasVP Oct 7, 2024
d6618ed
C++: Accept test changes.
MathiasVP Oct 7, 2024
b00c545
C++: Add change notes.
MathiasVP Oct 7, 2024
3d6965a
Merge pull request #17665 from jketema/printir-doc
jketema Oct 8, 2024
51d189d
Merge pull request #17556 from d10c/d10c/bigint-docs
jbj Oct 8, 2024
36937a0
Adding unified changelog for 2.19.1
coadaflorin Oct 8, 2024
f084bb7
Rust: A couple of interesting cases with short-circuiting.
geoffw0 Oct 8, 2024
483370d
Merge branch 'main' into unreachable
geoffw0 Oct 8, 2024
9e3f4cd
Rust: Accept test changes after merging main.
geoffw0 Oct 8, 2024
40096eb
Rust: More cleanup after merge.
geoffw0 Oct 8, 2024
5d7a92c
Rust: Add example from discussion.
geoffw0 Oct 8, 2024
6bde26d
Rust: Switch firstUnreachable to hvitved's suggested implementation.
geoffw0 Oct 8, 2024
4ab9255
Merge pull request #17682 from github/redsun82/rust-codegen
aibaars Oct 8, 2024
cb1ca4c
Update rust/ql/lib/codeql/rust/controlflow/internal/Completion.qll
hvitved Oct 8, 2024
3b1d917
Rust: Autoformat.
geoffw0 Oct 8, 2024
7235ba8
Rust: Fix test compilation errors.
geoffw0 Oct 8, 2024
a7dbe29
Rust: Add parenthesis example to test.
geoffw0 Oct 8, 2024
70d530a
Rust: Exclude nodes that aren't part of the CFG.
geoffw0 Oct 8, 2024
08d6d54
Rust: Add AST consistency queries
hvitved Oct 8, 2024
fcf1b6d
Merge pull request #17657 from hvitved/rust/cfg-conditional-splitting
hvitved Oct 8, 2024
98f5258
Merge pull request #17684 from github/changedocs/2.19.1
coadaflorin Oct 8, 2024
92bca9c
Python: Update CORS query tags and change note
tausbn Oct 8, 2024
3c1a19c
Merge pull request #17700 from github/tausbn/update-cors-query-change…
tausbn Oct 8, 2024
1f1b1b7
Merge pull request #17653 from yoff/python/typetracking-through-compr…
yoff Oct 8, 2024
f1e2268
C++: Fix ODR violations in tests
jketema Oct 8, 2024
dcbb66d
Go: extract and expose struct tags, interface method IDs
smowton Sep 3, 2024
9bb2a4b
Change note
smowton Sep 3, 2024
22ed2f9
Autoformat CodeQL
smowton Sep 3, 2024
5d14070
Fix test file
smowton Sep 3, 2024
7a7ff4a
Apply review comments
smowton Sep 30, 2024
e1963a5
autoformat
smowton Sep 30, 2024
442e581
Update stats
smowton Sep 9, 2024
fd615fb
Prevent bad magic
smowton Sep 30, 2024
1511927
Remove unnecessary table population on upgrade
smowton Sep 30, 2024
d04a0f4
Add note explaining how to regenerate dbscheme
smowton May 31, 2022
74cba90
Optimise join orders
smowton Oct 1, 2024
c1a1edf
Autoformat
smowton Oct 1, 2024
288e0ec
component_tags -> struct_tags
smowton Oct 1, 2024
0f95a8d
Clarify doc
smowton Oct 1, 2024
ab99509
Rework interface for querying private interface method ids
smowton Oct 1, 2024
36a0318
Further optimisation
smowton Oct 2, 2024
365ccf4
autoformat
smowton Oct 2, 2024
bf5ba33
Improve join orders for top 5 perf regressions in QA
smowton Oct 2, 2024
ed9a6bd
Further join order optimisations
smowton Oct 3, 2024
c79da8b
Avoid pathological case where getExampleMethodName picks a very commo…
smowton Oct 4, 2024
d401891
copyedit
smowton Oct 4, 2024
629a7a6
Further optimise guardingFunction: remove redundant condition, and or…
smowton Oct 8, 2024
837387a
Re-optimise isSensitive routine
smowton Oct 8, 2024
c90d0fa
C++: Fix ODR violations in dataflow tests
jketema Oct 8, 2024
723236d
C++: Add a skeleton class for requires expressions
jketema Oct 8, 2024
f3cbf86
Merge pull request #17703 from jketema/odr-test
jketema Oct 9, 2024
9952997
Shared: Add `DenseRank` library
hvitved Oct 9, 2024
a3a0c2b
Rust: Add more variable tests
hvitved Oct 8, 2024
5afd2d5
Rust: Account for captured variables
hvitved Oct 8, 2024
41218fb
Rust: Test spacing / variable names.
geoffw0 Oct 8, 2024
11016e1
Rust: PrintAst improvements
hvitved Oct 8, 2024
3d95369
Shared `ConditionalSplitting` implementation
hvitved Oct 3, 2024
5d925d3
C#: Adopt shared `ConditionalCompletionSplitting` implementation
hvitved Oct 3, 2024
3a098d7
Ruby: Adopt shared `ConditionalCompletionSplitting` implementation
hvitved Oct 3, 2024
bdb793b
Swift: Adopt shared `ConditionalCompletionSplitting` implementation
hvitved Oct 4, 2024
4d251b9
C++: Fix copy&paste error in QLDoc
jketema Oct 9, 2024
ad630bc
Python: ignore some extractor test output
yoff Oct 9, 2024
58fd1a2
Merge pull request #17357 from smowton/smowton/feature/go-indistingui…
smowton Oct 9, 2024
0b0e8a4
Update python/extractor/tests/parser/.gitignore
yoff Oct 9, 2024
6ffdf57
Merge pull request #17708 from yoff/python/ignore-extractor-test-output
yoff Oct 9, 2024
7a6eabc
Rust: Additional test cases.
geoffw0 Oct 8, 2024
073189e
python: add test for `re.Match` objects returned from `finditer`
yoff Oct 3, 2024
494b8bd
python: model `string` property of resultof `finditer`
yoff Oct 9, 2024
0ac4a10
Python: model that `finditer` returns iterable of `re.Match` objects
yoff Oct 9, 2024
fa1c92d
Rust: Another case worth having.
geoffw0 Oct 9, 2024
f3d727f
Rust: Correct spurious annotations.
geoffw0 Oct 9, 2024
5d4ceee
Shared: Only generate df summary model in the mixed query in case no …
michaelnebel Oct 7, 2024
ed39c46
Merge pull request #17710 from geoffw0/unusedvar3
geoffw0 Oct 9, 2024
4c21444
Bazel: Flip --incompatible_use_plus_in_repo_names.
criemen Oct 9, 2024
79871aa
Merge pull request #17687 from michaelnebel/modelgen/removeduplicatedf
michaelnebel Oct 9, 2024
c883aa0
Update cpp/ql/src/change-notes/2024-10-07-unclear-array-index-validat…
MathiasVP Oct 9, 2024
61a012f
C++: Don't allow 'x < 0' as a barrier guard.
MathiasVP Oct 9, 2024
201842d
C++: Add test with missing flow through 'fopen'.
MathiasVP Oct 9, 2024
338e820
C++: Add a taint model for 'fopen' and accept test changes.
MathiasVP Oct 9, 2024
954235e
C++: Add change note.
MathiasVP Oct 9, 2024
04d1c82
Merge pull request #17689 from hvitved/rust/print-ast
hvitved Oct 9, 2024
918e435
Merge pull request #17690 from hvitved/rust/ast-consistency-queries
hvitved Oct 9, 2024
b087fde
Merge pull request #17678 from MathiasVP/modernize-unclear-array-inde…
jketema Oct 9, 2024
4de0fef
Upgrade rules_kotlin to 2.0.0.
criemen Oct 9, 2024
6965cf7
C++: Make ql-for-ql happy.
MathiasVP Oct 9, 2024
a66f31d
Rust: Restrict variables to lowercase (for now).
geoffw0 Oct 9, 2024
6bd4614
Python: add change note
yoff Oct 9, 2024
f171eeb
Rust: Restrict 'unreachable' to nodes intended to be part of the CFG.
geoffw0 Oct 9, 2024
8352d17
Merge pull request #17693 from jketema/concepts
jketema Oct 9, 2024
dfeb35f
Rust: Move the restriction to variableDecl.
geoffw0 Oct 9, 2024
aa7215b
Address review comments
hvitved Oct 9, 2024
5ac9c2d
Rust: Accept variables test change.
geoffw0 Oct 9, 2024
719cef8
Merge branch 'main' into unreachable
geoffw0 Oct 9, 2024
acac3a0
C++: Respond to review comments.
MathiasVP Oct 9, 2024
6a87eb0
Merge pull request #17696 from hvitved/rust/captured-variables
hvitved Oct 9, 2024
09c2f90
Merge pull request #17525 from geoffw0/unreachable
geoffw0 Oct 10, 2024
25b3d76
Merge pull request #17718 from geoffw0/unusedvar4
geoffw0 Oct 10, 2024
3711a7e
Fix CWE coverage link in main index
redsun82 Oct 10, 2024
6322270
Merge branch 'main' into criemen/flip-enable-plus
criemen Oct 10, 2024
b18f8d3
Merge pull request #17714 from github/criemen/flip-enable-plus
criemen Oct 10, 2024
0c9a289
Rust: Remove unused types
paldepind Oct 10, 2024
4df9cd8
Merge pull request #17658 from hvitved/shared/cfg-conditional-splitting
hvitved Oct 10, 2024
b80b6aa
Rust: extract modifier tokens as predicates
aibaars Oct 10, 2024
30034b4
Rust: run 'bazel //rust/codegen'
aibaars Oct 10, 2024
32e9881
Rust: update expected output
aibaars Oct 10, 2024
c364fd7
Codegen: allow annotations to replace bases and drop fields
Oct 10, 2024
6015524
Rust: insert `FunctionOrMethodCallExpr` in annotations
Oct 10, 2024
89f43fb
Rust: generate code
Oct 10, 2024
d295cac
Always use generic method object
owen-mc Oct 9, 2024
6f6b4a0
Add check for specialized objects
owen-mc Oct 9, 2024
513efe2
Add check for object for specialized named type
owen-mc Oct 9, 2024
8a89574
Ruby: Move language specific code out of FileSystem.qll (at least for…
geoffw0 Oct 10, 2024
396bf93
Merge pull request #17716 from github/criemen/rules-kotlin-2.0.0
criemen Oct 10, 2024
7986fc7
Rust: avoid double '.' in trap extension
aibaars Sep 26, 2024
69f0e8b
Rust: add MacroStmts and MacroItems
aibaars Oct 1, 2024
6ede20c
Rust: regenerate code
aibaars Oct 1, 2024
cad2b74
Rust: integrate Rust Analyzer's Semantic module into extractor
aibaars Sep 24, 2024
0b3b95a
Rust: macro expansion
aibaars Sep 27, 2024
796da12
Rust: update expected output
aibaars Oct 3, 2024
0c10f08
Rust: set RUST_BACKTRACE=1
aibaars Oct 4, 2024
faa1689
Rust: reduce log output
aibaars Oct 4, 2024
ae19b2f
Rust: check that TextRanges are for the correct file
aibaars Oct 4, 2024
3e877ff
Rust: do not fail on bad Cargo.toml files
aibaars Oct 4, 2024
1135bf6
Rust: improve QL test script
aibaars Oct 6, 2024
f70f8a3
Rust: fix utf8 test
aibaars Oct 6, 2024
58d2c71
Rust: load files from disk ourselves
aibaars Oct 7, 2024
8372a2e
Rust: ensure error and token locations are valid
aibaars Oct 7, 2024
db28f1b
Rust: use macro to inject extraction functions for detached properties
aibaars Oct 8, 2024
ca27785
Rust: extract files on a per-project basis
aibaars Oct 8, 2024
88e5ce3
Rust: lower default verbosity to WARN
aibaars Oct 8, 2024
f97a159
Rust: clippy fixes
aibaars Oct 9, 2024
3ef49f3
Merge pull request #17725 from github/redsun82/fix-cwe-coverage-link
redsun82 Oct 10, 2024
6d43eed
Rust: add QL doc for MacroStmts and MacroItems
aibaars Oct 10, 2024
e7da53d
Merge pull request #17715 from MathiasVP/fopen-taint
MathiasVP Oct 10, 2024
7420d07
Update ruby/ql/lib/codeql/ruby/AST.qll
geoffw0 Oct 10, 2024
04c7319
Merge pull request #17647 from geoffw0/warnings
geoffw0 Oct 10, 2024
1398575
Merge pull request #17728 from paldepind/rust-remove-unused-types
paldepind Oct 10, 2024
5f353b7
Merge pull request #17727 from github/aibaars/modifiers
hvitved Oct 10, 2024
d0f73ac
Merge pull request #17709 from owen-mc/go/extractor/objecttypes-consi…
owen-mc Oct 10, 2024
f1a350c
C++: Print handler parameters in PrintAST
jketema Oct 10, 2024
665da39
Rust: Add CFG test for nested function
hvitved Oct 10, 2024
f6f54c6
Rust: Include parameters in the CFG
hvitved Oct 8, 2024
2f14ec9
Rust: Include patterns in the CFG
hvitved Oct 8, 2024
756affa
Rust: Fix bugs in `LetExprTree` and `MethodCallExprTree`
hvitved Oct 9, 2024
d013c89
Revert "Go: extractor/objecttypes consistency generics"
owen-mc Oct 10, 2024
575eb24
Merge pull request #17735 from github/revert-17709-go/extractor/objec…
igfoo Oct 10, 2024
c66bd72
Rust: rename to `CallExprBase`
Oct 11, 2024
9fad541
Rust: implement CFG for macros
aibaars Oct 10, 2024
f3bf347
Merge branch 'main' into redsun82/codegen-annotate
Oct 11, 2024
57c6e4d
Merge pull request #17734 from jketema/handle-print
jketema Oct 11, 2024
854d766
Merge pull request #17730 from github/redsun82/codegen-annotate
redsun82 Oct 11, 2024
6ade2a8
Rust: address comments
aibaars Oct 11, 2024
b4bb24a
Merge remote-tracking branch 'upstream/main' into aibaars/rust-macros
aibaars Oct 11, 2024
659ce6f
Rust: fix CodeQL alert
aibaars Oct 11, 2024
ffd6b98
Address review comments
hvitved Oct 11, 2024
ac8b973
Merge pull request #17686 from hvitved/rust/cfg-patterns
hvitved Oct 11, 2024
e91efaa
python: do not extract stdlib by default
yoff Apr 11, 2024
bb78c2a
Python: update test expectations
yoff Oct 9, 2024
4a29114
Python: only look for the py2 stdlib if we extract std lib
yoff Oct 10, 2024
c013d4a
Python: update test expectations
yoff Oct 10, 2024
22588c9
Python: update ectractor version
yoff Oct 10, 2024
e2eb08b
Python: improve messaging
yoff Oct 11, 2024
5650694
Python: update tests
yoff Oct 11, 2024
5f45402
Merge remote-tracking branch 'upstream/main' into aibaars/rust-macros
aibaars Oct 11, 2024
fc298b2
Rust: address comment
aibaars Oct 11, 2024
2af60f1
Merge pull request #17712 from yoff/python/re-finditer-match
yoff Oct 11, 2024
5b57826
Merge pull request #17659 from github/aibaars/rust-macros
redsun82 Oct 11, 2024
8f68115
Merge pull request #17683 from yoff/python/flip-default-for-stdlib-ex…
yoff Oct 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
27 changes: 24 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
common --enable_platform_specific_config
common --enable_bzlmod
# because we use --override_module with `%workspace%`, the lock file is not stable
common --lockfile_mode=off

# when building from this repository in isolation, the internal repository will not be found at ..
# where `MODULE.bazel` looks for it. The following will get us past the module loading phase, so
# that we can build things that do not rely on that
common --override_module=semmle_code=%workspace%/misc/bazel/semmle_code_stub

build --repo_env=CC=clang --repo_env=CXX=clang++

build:linux --cxxopt=-std=c++20
build:macos --cxxopt=-std=c++20 --cpu=darwin_x86_64
build:windows --cxxopt=/std:c++20 --cxxopt=/Zc:preprocessor
# we use transitions that break builds of `...`, so for `test` to work with that we need the following
test --build_tests_only

# this requires developer mode, but is required to have pack installer functioning
startup --windows_enable_symlinks
common --enable_runfiles

# with the above, we can avoid building python zips which is the default on windows as that's expensive
build --nobuild_python_zip

common --registry=file:///%workspace%/misc/bazel/registry
common --registry=https://bcr.bazel.build

common --@rules_dotnet//dotnet/settings:strict_deps=false
common --experimental_isolated_extension_usages
common --incompatible_use_plus_in_repo_names

try-import %workspace%/local.bazelrc
11 changes: 11 additions & 0 deletions .bazelrc.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# this file should contain bazel settings required to build things from `semmle-code`

common --registry=file:///%workspace%/ql/misc/bazel/registry
common --registry=https://bcr.bazel.build

# See bazelbuild/rules_dotnet#413: strict_deps in C# also appliy to 3rd-party deps, and when we pull
# in (for example) the xunit package, there's no code in this at all, it just depends transitively on
# its implementation packages without providing any code itself.
# We either can depend on internal implementation details, or turn of strict deps.
common --@rules_dotnet//dotnet/settings:strict_deps=false
common --experimental_isolated_extension_usages
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.1
5f5d70b6c4d2fb1a889479569107f1692239e8a7
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DisableFormat: true
14 changes: 13 additions & 1 deletion .devcontainer/swift/root.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@ set -xe
BAZELISK_VERSION=v1.12.0
BAZELISK_DOWNLOAD_SHA=6b0bcb2ea15bca16fffabe6fda75803440375354c085480fe361d2cbf32501db

# install git lfs apt source
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash

# install gh apt source
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \

apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y install --no-install-recommends \
zlib1g-dev \
uuid-dev \
python3-distutils \
python3-pip \
bash-completion
bash-completion \
git-lfs \
gh

# Install Bazel
curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-amd64
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/swift/user.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
set -xe

git lfs install

# add the workspace to the codeql search path
mkdir -p /home/vscode/.config/codeql
echo "--search-path /workspaces/codeql" > /home/vscode/.config/codeql/config
Expand Down
38 changes: 27 additions & 11 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,40 @@
*.dll -text
*.pdb -text

java/ql/test/stubs/**/*.java linguist-generated=true
java/ql/test/experimental/stubs/**/*.java linguist-generated=true
/java/ql/test/stubs/**/*.java linguist-generated=true
/java/ql/test/experimental/stubs/**/*.java linguist-generated=true
/java/kotlin-extractor/deps/*.jar filter=lfs diff=lfs merge=lfs -text

# Force git not to modify line endings for go or html files under the go/ql directory
go/ql/**/*.go -text
go/ql/**/*.html -text
/go/ql/**/*.go -text
/go/ql/**/*.html -text
# Force git not to modify line endings for go dbschemes
go/*.dbscheme -text
/go/*.dbscheme -text
# Preserve unusual line ending from codeql-go merge
go/extractor/opencsv/CSVReader.java -text
/go/extractor/opencsv/CSVReader.java -text

# For some languages, upgrade script testing references really old dbscheme
# files from legacy upgrades that have CRLF line endings. Since upgrade
# resolution relies on object hashes, we must suppress line ending conversion
# for those testing dbscheme files.
*/ql/lib/upgrades/initial/*.dbscheme -text
/*/ql/lib/upgrades/initial/*.dbscheme -text

# Generated test files - these are synced from the standard JavaScript libraries using
# `javascript/ql/experimental/adaptivethreatmodeling/test/update_endpoint_test_files.py`.
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.js linguist-generated=true -merge
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/**/*.ts linguist-generated=true -merge
# Auto-generated modeling for Python
/python/ql/lib/semmle/python/frameworks/data/internal/subclass-capture/*.yml linguist-generated=true

# auto-generated bazel lock file
/ruby/extractor/cargo-bazel-lock.json linguist-generated=true
/ruby/extractor/cargo-bazel-lock.json -merge

# auto-generated files for the C# build
/csharp/paket.lock linguist-generated=true
# needs eol=crlf, as `paket` touches this file and saves it as crlf
/csharp/.paket/Paket.Restore.targets linguist-generated=true eol=crlf
/csharp/paket.main.bzl linguist-generated=true
/csharp/paket.main_extension.bzl linguist-generated=true

# ripunzip tool
/misc/ripunzip/ripunzip-* filter=lfs diff=lfs merge=lfs -text

# swift prebuilt resources
/swift/third_party/resource-dir/*.zip filter=lfs diff=lfs merge=lfs -text
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,26 @@ updates:
ignore:
- dependency-name: '*'
update-types: ['version-update:semver-patch', 'version-update:semver-minor']

- package-ecosystem: "gomod"
directory: "go/extractor"
schedule:
interval: "daily"
allow:
- dependency-name: "golang.org/x/mod"
- dependency-name: "golang.org/x/tools"
groups:
extractor-dependencies:
patterns:
- "golang.org/x/*"
reviewers:
- "github/codeql-go"

- package-ecosystem: "gomod"
directory: "go/ql/test"
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
reviewers:
- "github/codeql-go"
17 changes: 7 additions & 10 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Java:
- change-notes/**/*java.*

JS:
- any: [ 'javascript/**/*', '!javascript/ql/experimental/adaptivethreatmodeling/**/*' ]
- any: [ 'javascript/**/*' ]
- change-notes/**/*javascript*

Kotlin:
- java/kotlin-extractor/**/*
- java/ql/test/kotlin/**/*
- java/ql/test-kotlin*/**/*

Python:
- python/**/*
Expand All @@ -30,6 +30,10 @@ Ruby:
- ruby/**/*
- change-notes/**/*ruby*

Rust:
- rust/**/*
- change-notes/**/*rust*

Swift:
- swift/**/*
- change-notes/**/*swift*
Expand All @@ -45,11 +49,4 @@ documentation:

# Since these are all shared files that need to be synced, just pick _one_ copy of each.
"DataFlow Library":
- "java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll"
- "java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplCommon.qll"
- "java/ql/lib/semmle/code/java/dataflow/internal/tainttracking1/TaintTrackingImpl.qll"
- "java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImplConsistency.qll"
- "java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll"

"ATM":
- javascript/ql/experimental/adaptivethreatmodeling/**/*
- "shared/dataflow/**/*"
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Pull Request checklist

#### All query authors

- [ ] A change note is added if necessary. See [the documentation](https://github.com/github/codeql/blob/main/docs/change-notes.md) in this repository.
- [ ] All new queries have appropriate `.qhelp`. See [the documentation](https://github.com/github/codeql/blob/main/docs/query-help-style-guide.md) in this repository.
- [ ] QL tests are added if necessary. See [Testing custom queries](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/testing-custom-queries) in the GitHub documentation.
- [ ] New and changed queries have correct query metadata. See [the documentation](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md) in this repository.

#### Internal query authors only

- [ ] Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to `.ql`, `.qll`, or `.qhelp` files. See [the documentation](https://github.com/github/codeql-team/blob/main/docs/best-practices/validating-autofix-for-query-changes.md) (internal access required).
- [ ] Changes are validated [at scale](https://github.com/github/codeql-dca/) (internal access required).
- [ ] Adding a new query? Consider also [adding the query to autofix](https://github.com/github/codeml-autofix/blob/main/docs/updating-query-support.md#adding-a-new-query-to-the-query-suite).
74 changes: 74 additions & 0 deletions .github/workflows/build-ripunzip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build runzip

on:
workflow_dispatch:
inputs:
ripunzip-version:
description: "what reference to checktout from google/runzip"
required: false
default: v1.2.1
openssl-version:
description: "what reference to checkout from openssl/openssl for Linux"
required: false
default: openssl-3.3.0

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-12, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
repository: google/ripunzip
ref: ${{ inputs.ripunzip-version }}
# we need to avoid ripunzip dynamically linking into libssl
# see https://github.com/sfackler/rust-openssl/issues/183
- if: runner.os == 'Linux'
name: checkout openssl
uses: actions/checkout@v4
with:
repository: openssl/openssl
path: openssl
ref: ${{ inputs.openssl-version }}
- if: runner.os == 'Linux'
name: build and install openssl with fPIC
shell: bash
working-directory: openssl
run: |
./config -fPIC --prefix=$HOME/.local --openssldir=$HOME/.local/ssl
make -j $(nproc)
make install_sw -j $(nproc)
- if: runner.os == 'Linux'
name: build (linux)
shell: bash
run: |
env OPENSSL_LIB_DIR=$HOME/.local/lib64 OPENSSL_INCLUDE_DIR=$HOME/.local/include OPENSSL_STATIC=yes cargo build --release
mv target/release/ripunzip ripunzip-linux
- if: runner.os == 'Windows'
name: build (windows)
shell: bash
run: |
cargo build --release
mv target/release/ripunzip ripunzip-windows
- name: build (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
rustup target install x86_64-apple-darwin
rustup target install aarch64-apple-darwin
cargo build --target x86_64-apple-darwin --release
cargo build --target aarch64-apple-darwin --release
lipo -create -output ripunzip-macos \
-arch x86_64 target/x86_64-apple-darwin/release/ripunzip \
-arch arm64 target/aarch64-apple-darwin/release/ripunzip
- uses: actions/upload-artifact@v4
with:
name: ripunzip-${{ runner.os }}
path: ripunzip-*
- name: Check built binary
shell: bash
run: |
./ripunzip-* --version
28 changes: 28 additions & 0 deletions .github/workflows/buildifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Check bazel formatting

on:
pull_request:
paths:
- "**.bazel"
- "**.bzl"
branches:
- main
- "rc/*"

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check bazel formatting
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
with:
extra_args: >
buildifier --all-files 2>&1 ||
(
echo -e "In order to format all bazel files, please run:\n bazel run //misc/bazel/buildifier"; exit 1
)
36 changes: 28 additions & 8 deletions .github/workflows/check-change-note.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Check change note

permissions:
pull-requests: read

on:
pull_request_target:
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]
Expand All @@ -9,26 +12,43 @@ on:
- "*/ql/lib/**/*.ql"
- "*/ql/lib/**/*.qll"
- "*/ql/lib/**/*.yml"
- "shared/**/*.ql"
- "shared/**/*.qll"
- "!**/experimental/**"
- "!ql/**"
- "!rust/**"
- ".github/workflows/check-change-note.yml"

jobs:
check-change-note:
env:
REPO: ${{ github.repository }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:

- name: Fail if no change note found. To fix, either add one, or add the `no-change-note-required` label.
if: |
github.event.pull_request.draft == false &&
!contains(github.event.pull_request.labels.*.name, 'no-change-note-required')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq 'any(.[].filename ; test("/change-notes/.*[.]md$"))' |
grep true -c
change_note_files=$(gh api "repos/$REPO/pulls/$PULL_REQUEST_NUMBER/files" --paginate --jq '.[].filename | select(test("/change-notes/.*[.]md$"))')

if [ -z "$change_note_files" ]; then
echo "No change note found. Either add one, or add the 'no-change-note-required' label."
exit 1
fi

echo "Change notes found:"
echo "$change_note_files"

- name: Fail if the change note filename doesn't match the expected format. The file name must be of the form 'YYYY-MM-DD.md', 'YYYY-MM-DD-{title}.md', where '{title}' is arbitrary text, or released/x.y.z.md for released change-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api 'repos/${{github.repository}}/pulls/${{github.event.number}}/files' --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))] | all(test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$") or test("/change-notes/released/[0-9]*[.][0-9]*[.][0-9]*[.]md$"))' |
grep true -c
bad_change_note_file_names=$(gh api "repos/$REPO/pulls/$PULL_REQUEST_NUMBER/files" --paginate --jq '[.[].filename | select(test("/change-notes/.*[.]md$"))][] | select((test("/change-notes/[0-9]{4}-[0-9]{2}-[0-9]{2}.*[.]md$") or test("/change-notes/released/[0-9]*[.][0-9]*[.][0-9]*[.]md$")) | not)')

if [ -n "$bad_change_note_file_names" ]; then
echo "The following change note file names are invalid:"
echo "$bad_change_note_file_names"
exit 1
fi
3 changes: 3 additions & 0 deletions .github/workflows/check-implicit-this.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
- main
- "rc/*"

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
Expand Down
Loading
Loading