Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
536 commits
Select commit Hold shift + click to select a range
b115f3f
Update rust/ql/lib/codeql/rust/internal/PathResolution.qll
hvitved Apr 4, 2025
70a174a
C#: Address review comments.
michaelnebel Apr 4, 2025
49194b0
Updated `WebSocketReceiveNode` with API graphs.
Napalys Apr 4, 2025
4b7a9cd
Added test case with `bind`.
Napalys Apr 4, 2025
c5860e9
Updated `WebSocketReceiveNode` to match bind functions.
Napalys Apr 4, 2025
6bcfd8c
Updated `getAServer` with API graphs.
Napalys Apr 4, 2025
8e9e772
Merge pull request #19121 from hvitved/ruby/pre-update-unique
hvitved Apr 4, 2025
ffca52e
Merge pull request #19195 from hvitved/rust/post-with-flow-in-exclude
hvitved Apr 4, 2025
b580550
Cleanups
joefarebrother Apr 4, 2025
8f0b985
Merge pull request #19061 from michaelnebel/csharp/useless-assignment…
michaelnebel Apr 4, 2025
6f704f0
Merge pull request #19157 from hvitved/rust/path-resolution-prelude
hvitved Apr 4, 2025
8b23945
Merge branch 'main' into deallocation
geoffw0 Apr 4, 2025
24a4aad
Rust: Accept consistency check fixes following merge with main.
geoffw0 Apr 4, 2025
de7e611
Rewrite documentation
joefarebrother Apr 4, 2025
5c1581d
Add changelog entries for CodeQL CLI versions 2.20.7 and 2.21.0
coadaflorin Apr 4, 2025
e08072d
Fix qhelp formatting
joefarebrother Apr 4, 2025
dc31da8
Rust: Fix file name typo.
geoffw0 Apr 4, 2025
8b6c8d7
Rust: Minor path resolution fix for `($)crate` paths
hvitved Apr 4, 2025
e9971ff
Rust: Change the ID of the new query.
geoffw0 Apr 4, 2025
64ee6c5
Merge branch 'main' into lessnoise
geoffw0 Apr 4, 2025
6597454
Merge remote-tracking branch 'upstream/main' into lessnoise
geoffw0 Apr 4, 2025
d47e925
Rust: Delete empty .expected files.
geoffw0 Apr 4, 2025
006cb02
Merge pull request #19217 from hvitved/rust/macro-expansion-inherit-l…
hvitved Apr 4, 2025
49c2f97
Merge pull request #19180 from geoffw0/lessnoise
geoffw0 Apr 4, 2025
8e7e162
Merge branch 'main' into badalloc
geoffw0 Apr 4, 2025
c783549
Merge branch 'main' into blockon
geoffw0 Apr 4, 2025
1acbdba
Rust: Make all query sinks extend QuerySink::Range and import them in…
geoffw0 Apr 1, 2025
784ccb7
Rust: Define Rust queries and extensions more consistently.
geoffw0 Apr 4, 2025
0db5510
Rust: Make imports consistent and correct.
geoffw0 Apr 4, 2025
47ee6c6
Rust: Give regex injection extendable sources as well.
geoffw0 Apr 4, 2025
ff78c45
Rust: Abstractions then implementations.
geoffw0 Apr 4, 2025
d7c14ec
Rust: Revert change to Cargo.lock.
geoffw0 Apr 4, 2025
bc92a99
Merge pull request #19080 from geoffw0/deallocation
geoffw0 Apr 4, 2025
a5883b1
Rust: Accept test changes (due to added models?).
geoffw0 Apr 4, 2025
c993938
Rust: Turn on PrettyPrintModels for RegexInjection so we hopefully do…
geoffw0 Apr 4, 2025
6ad7a95
Merge branch 'main' into badalloc
geoffw0 Apr 4, 2025
471f02c
Merge branch 'main' into sinkstats
geoffw0 Apr 4, 2025
f992c71
Ruby: Add change note
hvitved Apr 7, 2025
8102282
Merge pull request #19222 from geoffw0/sinkstats
geoffw0 Apr 7, 2025
f292d04
Merge branch 'main' into blockon
geoffw0 Apr 7, 2025
893e423
Merge branch 'main' into badalloc
geoffw0 Apr 7, 2025
6fb5376
Refactor `ReceivedItemAsRemoteFlow` to handle data from both client a…
Napalys Apr 7, 2025
5c2d6e3
Rust: Add path resolution test for Self in trait implementation
paldepind Apr 7, 2025
6cecf7e
Rust: Resolve Self path in trait type of implementation
paldepind Apr 7, 2025
a885e61
Merge pull request #19206 from hvitved/ruby/super-implicit-args-synth
yoff Apr 7, 2025
c4fa417
Added change note
Napalys Apr 7, 2025
9388226
Added test case for `Uint8Array` and `TypedArray.prototype.buffer`
Napalys Apr 7, 2025
d17d441
Java: add integration test for query suite contents
tamasvajk Apr 7, 2025
acc565f
Rust: Refactor PathMention as suggested in review
paldepind Apr 7, 2025
5cde4dd
Merge pull request #19219 from github/changedocs/2.21.0
coadaflorin Apr 7, 2025
5dba241
Rust: Fix annotation in comment
paldepind Apr 7, 2025
3441af1
Merge pull request #19146 from paldepind/rust-ti-alias
paldepind Apr 7, 2025
2c2506c
Rust: Add Rust SSA inconsistency infrastructure.
geoffw0 Apr 7, 2025
ca5cc8e
Merge pull request #19220 from hvitved/rust/path-resolution-crate-fix
hvitved Apr 7, 2025
e5fc1b0
ruby: add qhelp to `rb/useless-assignment-to-local`
yoff Apr 4, 2025
b205fed
ruby: add tests
yoff Apr 4, 2025
385598d
ruby: remove some FPs from `rb/useless-assignment-to-local`
yoff Mar 31, 2025
eb8cbfa
ruby: add change note
yoff Apr 4, 2025
6a8484f
ruby: adjust precision of `rb/useless-assignment-to-local` to medium
yoff Apr 4, 2025
76c0b16
Merge pull request #19164 from yoff/ruby/refine-deadstore
yoff Apr 7, 2025
ba22501
ruby: add `rb/useless-assignment-to-local` to the code-quality suite
yoff Apr 7, 2025
74583e4
Merge pull request #19227 from paldepind/rust-pr-self
paldepind Apr 7, 2025
bf7d3d1
Merge pull request #19230 from yoff/ruby/add-DeadStoreOfLocal-to-code…
yoff Apr 7, 2025
ffcf6d6
Apply suggestions from code review
tamasvajk Apr 7, 2025
d8ca8dd
Merge pull request #19203 from owen-mc/review/egregius313/17905
owen-mc Apr 7, 2025
e23ff9c
Add TypedArrays flow summaries for `Uint8Array` and buffer property
Napalys Apr 7, 2025
d689a55
Added test cases for `TypedArray` methods
Napalys Apr 7, 2025
edb7aaa
Rust: Add path attribute test
hvitved Apr 4, 2025
13f4a6a
Rust: Handle path attributes in path resolution
hvitved Apr 4, 2025
dad8585
Apply suggestions from code review
geoffw0 Apr 7, 2025
41f54d8
Rust: Tweak query description.
geoffw0 Apr 7, 2025
3744ef7
Disable csharp tests that use nuget on macos-15
oscarsj Apr 7, 2025
8e76bb1
Rust: Minor changes based on PR review
paldepind Apr 7, 2025
602e617
Rust: Add type inference test for trait with multiple associated types
paldepind Apr 7, 2025
48e5b0a
Merge branch 'main' into rust-ti-associated
paldepind Apr 7, 2025
9c15673
Shared: Implement getInconsistencyCounts for SSA.
geoffw0 Apr 7, 2025
7c63264
Merge pull request #19208 from github/cklin/exclude-from-incremental
cklin Apr 7, 2025
ee54ba4
Rust: Autoformat.
geoffw0 Apr 7, 2025
ff07ec8
Add flow summaries for TypedArray methods `set` and `subarray`
Napalys Apr 7, 2025
0e09947
Added test cases for `ArrayBuffer` and `SharedArrayBuffer`
Napalys Apr 7, 2025
f427720
Add flow summaries and entry points for `ArrayBuffer` and `SharedArra…
Napalys Apr 7, 2025
f28478e
Add test cases from `TypedArrays` to strings.
Napalys Apr 7, 2025
b97c618
Add flow summaries and entry points for `TextDecoder`
Napalys Apr 7, 2025
873db7c
Added change note
Napalys Apr 7, 2025
5e74bdc
Disable csharp test failing on macos-15
oscarsj Apr 7, 2025
88439b4
Merge pull request #19095 from geoffw0/blockon
geoffw0 Apr 7, 2025
37db354
Actions: Ensure autobuild invocations work when the CLI path contains…
adityasharad Apr 4, 2025
0bb4ab9
Actions: Add integration test for default filter behaviour
adityasharad Apr 5, 2025
5adf135
Add changed framework coverage reports
github-actions[bot] Apr 8, 2025
98b6e5c
Docs: Fix formatting of GitHub Actions content
adityasharad Apr 8, 2025
cf4989e
Docs: Place GitHub Actions link lower in sidebar
adityasharad Apr 8, 2025
2f9be92
Bump golang.org/x/tools
dependabot[bot] Apr 8, 2025
df89739
Added test cases for `open` package.
Napalys Apr 8, 2025
b8802a2
Added `open` package model as data.
Napalys Apr 8, 2025
4a4d78b
Added change note
Napalys Apr 8, 2025
15606dd
Bazel: update to 8.1.1
Apr 8, 2025
fd3dcb2
Rust: More precise imports.
geoffw0 Apr 8, 2025
e2f63db
Merge branch 'main' into badalloc
geoffw0 Apr 8, 2025
10ad578
Rust: Try a different toolchain version to fix the test in CI?
geoffw0 Apr 8, 2025
5f6c595
Merge pull request #19240 from github/workflow/coverage/update
owen-mc Apr 8, 2025
8c878cd
Merge pull request #19243 from github/dependabot/go_modules/go/extrac…
owen-mc Apr 8, 2025
7459548
Rust: Cache tweaks
hvitved Apr 8, 2025
866fc6b
Merge pull request #19235 from geoffw0/ssaconsistency
geoffw0 Apr 8, 2025
a7943d8
Merge pull request #19234 from github/oscarsj/csharp-disable-nuget-tests
oscarsj Apr 8, 2025
7798b71
Go: Fix `err` instead of `decErr` in `GetPkgsInfo`
mbg Apr 8, 2025
2e1b8b8
Rust: Fix bad join in `unqualifiedPathLookup`
hvitved Apr 8, 2025
95add2f
Rust: Fix bad join in `getAPrivateVisibleModule`
hvitved Apr 8, 2025
9dc008b
Merge pull request #19214 from paldepind/rust-ti-associated
paldepind Apr 8, 2025
b5e1b25
use sudo nice for running maven test server
oscarsj Apr 8, 2025
87f2ccb
Merge pull request #19249 from github/mbg/go/fix-getpkginfo-decerr
mbg Apr 8, 2025
e49fb83
Update java/ql/integration-tests/java/buildless-inherit-trust-store/t…
oscarsj Apr 8, 2025
84c728f
Merge pull request #19244 from github/redsun82/bazel-update
redsun82 Apr 8, 2025
3b56f95
use only sudo for running maven test server (remove nice)
oscarsj Apr 8, 2025
1eb4a1a
Update java/ql/integration-tests/java/buildless-snapshot-repository/t…
oscarsj Apr 8, 2025
afe3e53
Update java/ql/integration-tests/java/buildless-inherit-trust-store/t…
oscarsj Apr 8, 2025
f325f53
Merge pull request #19229 from tamasvajk/test/java-query-suite
tamasvajk Apr 8, 2025
259a093
Move query suite selector logic to security-and-quality-suite
tamasvajk Apr 8, 2025
6abff48
Java: Add explicit filtering for quality queries that should be inclu…
tamasvajk Apr 8, 2025
e163344
Java: Add test to check queries not included in well-known query suites
tamasvajk Apr 8, 2025
d39045e
Merge pull request #19245 from tamasvajk/tamasvajk/improvement-securi…
tamasvajk Apr 8, 2025
25bd0c3
Rust: add test setup script
Apr 8, 2025
6d95950
Merge pull request #19252 from github/oscarsj/nice-servers-for-java-t…
oscarsj Apr 8, 2025
c0f2ce7
Merge pull request #19254 from tamasvajk/tamasvajk/test-queries-not-i…
tamasvajk Apr 8, 2025
21af1c6
Merge pull request #19241 from adityasharad/actions/fix/docs-table-bl…
adityasharad Apr 8, 2025
c4c351c
Merge pull request #19239 from adityasharad/actions/integration-test-…
adityasharad Apr 8, 2025
2e75dbd
Actions: Fix invocation of autobuild PowerShell script
adityasharad Apr 9, 2025
8d467c7
Merge pull request #19255 from github/redsun82/rust-setup
redsun82 Apr 9, 2025
35f9157
Ruby: Fix bad join in `DeadStoreOfLocal.ql`
hvitved Apr 9, 2025
da7d6d3
JS: Change note
asgerf Apr 9, 2025
0751d73
Merge pull request #19256 from Napalys/js/open_package
Napalys Apr 9, 2025
4bc3e9e
Addressed comments
Napalys Apr 9, 2025
b6053e3
Merge pull request #19076 from owen-mc/go/update-depstubber-files
owen-mc Apr 9, 2025
0a293cf
Add EnumType to SimpleTypeSanitizer
smowton Apr 9, 2025
a3e4e62
Removed taint from `ArrayBuffer` constructor as it accepts `length`
Napalys Apr 9, 2025
3373c24
Update test expectation
smowton Apr 9, 2025
9323f1a
Merge pull request #19250 from hvitved/rust/fix-bad-joins
hvitved Apr 9, 2025
f02783a
Merge pull request #19210 from Napalys/js/mkdirp
Napalys Apr 9, 2025
5c7a4eb
Reorder test expectations
smowton Apr 9, 2025
0c52b5a
Added summary flow for `StringFromCharCode`
Napalys Apr 9, 2025
2dca95a
Update javascript/ql/lib/change-notes/2025-04-07-websocket.md
Napalys Apr 9, 2025
674f40b
Added test cases for `make-dir` package.
Napalys Apr 9, 2025
ce2fc25
Added `make-dir` model as data
Napalys Apr 9, 2025
5ec71ab
Added change note
Napalys Apr 9, 2025
0acccf2
Update codeql-library-for-actions.rst
coadaflorin Apr 9, 2025
5243f90
Brought back old methods and marked them as `deprecated`
Napalys Apr 9, 2025
9498122
Merge pull request #19261 from smowton/smowton/admin/improve-gradle-w…
smowton Apr 9, 2025
84aa2e8
Apply review suggestion - Tweak wording of example comment
joefarebrother Apr 9, 2025
fbab715
Rust: Allow for crate self-references in crate graph paths
hvitved Apr 9, 2025
f31b49b
Change note
smowton Apr 9, 2025
7a8dfdb
Grammar
smowton Apr 9, 2025
cc379b5
Merge pull request #19260 from smowton/smowton/feature/sanitize-enum-…
smowton Apr 9, 2025
52401aa
Address review comments
hvitved Apr 9, 2025
29af6f7
Merge pull request #19257 from adityasharad/actions/fix/autobuild-pow…
adityasharad Apr 9, 2025
ef00655
Merge pull request #19264 from github/coadaflorin-actions-docs-patch
adityasharad Apr 9, 2025
1ba06ab
Merge pull request #19216 from hvitved/rust/path-resolution-path-attr
hvitved Apr 9, 2025
a6b20d7
Merge pull request #19259 from hvitved/ruby/fix-bad-join
hvitved Apr 9, 2025
0e31bf1
Merge pull request #19265 from hvitved/rust/crate-graph-self-crate-ref
hvitved Apr 9, 2025
bd3342a
Actions: Update integration test for default filters
adityasharad Apr 10, 2025
800dd16
JS: Add failing TRAP test for trailing comma
asgerf Apr 10, 2025
1434f7a
JS: Tolerate trailing comma in JSON array
asgerf Apr 9, 2025
cfa1a9b
JS: Update extractor version string
asgerf Apr 10, 2025
3da1f26
JS: Change note
asgerf Apr 10, 2025
00999ba
Apply docs review suggestion - Reword query description.
joefarebrother Apr 10, 2025
6802037
Update qhelp formatting
joefarebrother Apr 10, 2025
d2a4f1e
Merge pull request #19267 from asgerf/js/json-array-trailing-comma
asgerf Apr 10, 2025
041adcd
Java: Add initial version of string replaceAll with no regex query
owen-mc Mar 21, 2025
ff2947a
Adjust query name
owen-mc Mar 25, 2025
b5b252b
Convert test to inline expectations
owen-mc Mar 25, 2025
441c79e
Use existing class StringReplaceAllCall
owen-mc Mar 25, 2025
fea3d10
Update qhelp
owen-mc Mar 25, 2025
042fe07
Adjust alert message
owen-mc Mar 25, 2025
c4e56b1
Add quality and cwe tag to query
owen-mc Mar 25, 2025
626a7d5
Fix punctuation
owen-mc Mar 26, 2025
04ec1d7
Update test expectations
owen-mc Mar 26, 2025
e1c5517
Keep COMPLIANT and NON_COMPLIANT comments in test
owen-mc Mar 27, 2025
3ea5cc1
Add query to code-quality query suite
owen-mc Mar 27, 2025
ad89e79
Tweak documentation
owen-mc Mar 31, 2025
576f4cf
Update tags
owen-mc Apr 10, 2025
acfcc6d
Sort ids in `java-code-quality.qls`
owen-mc Apr 10, 2025
7f7fca9
Merge pull request #19165 from joefarebrother/python-qual-loop-var-ca…
joefarebrother Apr 10, 2025
78a26cf
Update index.rst
felicitymay Apr 10, 2025
171a846
Applied copilot suggestion.
Napalys Apr 10, 2025
eac14b9
Merge pull request #19200 from asgerf/js/web-response
asgerf Apr 10, 2025
81cba7f
Added test cases with missing alerts for `Request` and `NextRequest`.
Napalys Mar 31, 2025
63a3953
Enhance Next.js API endpoint handling for compatibility with both Pag…
Napalys Mar 31, 2025
a1dc874
Shared: Replace a 'count' with a 'strictcount' to prevent a CP when t…
MathiasVP Apr 10, 2025
8acb024
Added test cases for `NextResponse` and `Response`
Napalys Apr 1, 2025
732fcbf
Shared: Move 'asParameter' out of the class signature.
MathiasVP Apr 10, 2025
c484945
Shared: Move 'getEnclosingCallable' and 'getAsExprEnclosingCallable' …
MathiasVP Apr 10, 2025
04bf908
C#: Fixup MaD input.
MathiasVP Apr 10, 2025
b6c6587
Java: Fixup MaD input.
MathiasVP Apr 10, 2025
6c348b5
Rust: Fixup MaD input.
MathiasVP Apr 10, 2025
ea3bb8c
Shared: Provide a hook to MaD generation to modify the 'ReturnValue' …
MathiasVP Apr 10, 2025
86b64af
Added `NextResponse` to the `ResponseCall` class it models similar ne…
Napalys Apr 10, 2025
43bf0be
Merge pull request #19263 from Napalys/js/make-dir-lib
Napalys Apr 10, 2025
94e08e3
C++: Expose a few predicates from 'ExternalFlow'.
MathiasVP Apr 10, 2025
960e990
C++: Move the 'getArgumentIndex' into the abstract 'Position' class. …
MathiasVP Apr 10, 2025
b678112
C++: Add a few predicates to 'ReturnKind'.
MathiasVP Apr 10, 2025
3bb249f
C++: Ensure we always have 'Position's even if there are no calls in …
MathiasVP Apr 10, 2025
4f5bdbb
Add new query to java-code-quality.qls.expected
owen-mc Apr 10, 2025
c2baf9a
Merge pull request #19270 from github/felicitymay-patch-1
felicitymay Apr 10, 2025
7ed8a85
Merge pull request #19246 from hvitved/rust/cache-tweaks
hvitved Apr 10, 2025
30ce0c5
Actions: Add integration tests for configured path filters
adityasharad Apr 10, 2025
283503b
Actions: Fix handling of paths-ignore in autobuild scripts
adityasharad Apr 10, 2025
1ca25b2
ruby: add test of `rb/uninitialized-local-variable`
yoff Apr 9, 2025
53c88da
ruby: refine query for uninitialised local variables
yoff Apr 1, 2025
8555e8c
ruby: add change notes
yoff Apr 3, 2025
becea89
Rust: refine `ql/test/setup.sh`
Apr 11, 2025
208487f
Added `middleware` test
Napalys Apr 11, 2025
734ad2d
Removed legacy `Consistency` check as it is redundant now with inline…
Napalys Apr 11, 2025
6e09a65
Added support for `NextRequest` `middleware` SSRF.
Napalys Apr 11, 2025
db1203a
Rust: reinstate adding `rust-src` for test toolchains
Apr 11, 2025
8674b61
Added SSRF test case with `searchParams` for `NextRequest`
Napalys Apr 11, 2025
678eccb
Added `searchParams.get` as potential source for SSRF
Napalys Apr 11, 2025
2c4b352
Added change note
Napalys Apr 11, 2025
8594048
Update rust/ql/test/setup.sh
aibaars Apr 11, 2025
e3f1720
Renamed`DecodeLike` to `Decode` and updated `propagatesFlow`
Napalys Apr 11, 2025
d17d29a
Merge pull request #19218 from Napalys/js/upgrade_websocket
Napalys Apr 11, 2025
f675a14
ruby: remove redundant cases
yoff Apr 11, 2025
4167e96
ruby: more complete impleemntation of `isInBooleanContext`
yoff Apr 11, 2025
d0dcf89
Update javascript/ql/lib/semmle/javascript/internal/flow_summaries/St…
Napalys Apr 11, 2025
92e4f11
Update javascript/ql/lib/semmle/javascript/frameworks/Next.qll
Napalys Apr 11, 2025
11abbf8
Now `nextUrl` is of type `parameter` and loosen the restriction for `…
Napalys Apr 11, 2025
3d7c020
Merge pull request #19231 from Napalys/js/typed_array
Napalys Apr 11, 2025
472bfa2
Merge pull request #19115 from owen-mc/java/port/java/string-replace-…
owen-mc Apr 11, 2025
4ae49cf
Merge pull request #19281 from github/redsun82/rust-setup
redsun82 Apr 11, 2025
6e2cfab
ruby: add test for `for`
yoff Apr 11, 2025
b641d5f
ruby: fix FP
yoff Apr 11, 2025
bfc494c
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivat…
MathiasVP Apr 11, 2025
deef95d
Update cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivat…
MathiasVP Apr 11, 2025
877118f
Merge pull request #19274 from MathiasVP/prepare-cpp-for-mad-generation
MathiasVP Apr 11, 2025
2477233
ruby: only report on method calls
yoff Apr 11, 2025
6a76a40
ruby: adjust change notes
yoff Apr 11, 2025
11aef70
Merge pull request #19273 from MathiasVP/prepare-shared-mad-generatio…
MathiasVP Apr 11, 2025
eb0f8e9
ruby: add `rb/uninitialized-local-variable` to quality suite
yoff Apr 11, 2025
2dc88d8
Merge pull request #19278 from adityasharad/actions/integration-test-…
adityasharad Apr 11, 2025
85e27ca
Merge branch 'main' into ruby/refine-uninitialised-local
yoff Apr 11, 2025
b988be8
ruby: improve help file
yoff Apr 11, 2025
7517272
ruby: remove repetitive change note
yoff Apr 11, 2025
8552710
Merge pull request #19205 from yoff/ruby/refine-uninitialised-local
yoff Apr 11, 2025
8631371
Merge pull request #19184 from Napalys/js/request_handlers
Napalys Apr 14, 2025
c821f27
Merge branch 'main' into badalloc
geoffw0 Apr 14, 2025
884c4a6
Merge pull request #19171 from geoffw0/badalloc
geoffw0 Apr 14, 2025
b961c59
Release preparation for version 2.21.1
invalid-email-address Apr 14, 2025
b75e0ed
actions: Fix spelling error in UnmaskedSecretExposure.md
igfoo Apr 15, 2025
8ee353c
Merge pull request #19312 from igfoo/igfoo/fix-typo-unmasked-secret-e…
igfoo Apr 15, 2025
2409bcc
Merge pull request #19301 from github/release-prep/2.21.1
igfoo Apr 15, 2025
ff154b1
Merge tag 'codeql-cli/latest' into auto/sync-main-pr
Apr 22, 2025
9f44cb2
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Apr 22, 2025
b28b84f
Merge branch 'main' of https://github.com/microsoft/codeql into auto/…
Apr 22, 2025
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.0
8.1.1
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
/java/ql/test-kotlin1/ @github/codeql-kotlin
/java/ql/test-kotlin2/ @github/codeql-kotlin

# Experimental CodeQL cryptography
**/experimental/quantum/ @github/ps-codeql

# CodeQL tools and associated docs
/docs/codeql/codeql-cli/ @github/codeql-cli-reviewers
/docs/codeql/codeql-for-visual-studio-code/ @github/codeql-vscode-reviewers
Expand Down
45 changes: 26 additions & 19 deletions actions/extractor/tools/autobuild-impl.ps1
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
if (($null -ne $env:LGTM_INDEX_INCLUDE) -or ($null -ne $env:LGTM_INDEX_EXCLUDE) -or ($null -ne $env:LGTM_INDEX_FILTERS)) {
Write-Output 'Path filters set. Passing them through to the JavaScript extractor.'
} else {
Write-Output 'No path filters set. Using the default filters.'
# Note: We're adding the `reusable_workflows` subdirectories to proactively
# record workflows that were called cross-repo, check them out locally,
# and enable an interprocedural analysis across the workflow files.
# These workflows follow the convention `.github/reusable_workflows/<nwo>/*.ya?ml`
$DefaultPathFilters = @(
'exclude:**/*',
'include:.github/workflows/*.yml',
'include:.github/workflows/*.yaml',
'include:.github/reusable_workflows/**/*.yml',
'include:.github/reusable_workflows/**/*.yaml',
'include:**/action.yml',
'include:**/action.yaml'
)
# Note: We're adding the `reusable_workflows` subdirectories to proactively
# record workflows that were called cross-repo, check them out locally,
# and enable an interprocedural analysis across the workflow files.
# These workflows follow the convention `.github/reusable_workflows/<nwo>/*.ya?ml`
$DefaultPathFilters = @(
'exclude:**/*',
'include:.github/workflows/*.yml',
'include:.github/workflows/*.yaml',
'include:.github/reusable_workflows/**/*.yml',
'include:.github/reusable_workflows/**/*.yaml',
'include:**/action.yml',
'include:**/action.yaml'
)

if ($null -ne $env:LGTM_INDEX_FILTERS) {
Write-Output 'LGTM_INDEX_FILTERS set. Using the default filters together with the user-provided filters, and passing through to the JavaScript extractor.'
# Begin with the default path inclusions only,
# followed by the user-provided filters.
# If the user provided `paths`, those patterns override the default inclusions
# (because `LGTM_INDEX_FILTERS` will begin with `exclude:**/*`).
# If the user provided `paths-ignore`, those patterns are excluded.
$PathFilters = ($DefaultPathFilters -join "`n") + "`n" + $env:LGTM_INDEX_FILTERS
$env:LGTM_INDEX_FILTERS = $PathFilters
} else {
Write-Output 'LGTM_INDEX_FILTERS not set. Using the default filters, and passing through to the JavaScript extractor.'
$env:LGTM_INDEX_FILTERS = $DefaultPathFilters -join "`n"
}

# Find the JavaScript extractor directory via `codeql resolve extractor`.
$CodeQL = Join-Path $env:CODEQL_DIST 'codeql.exe'
$env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT = &$CodeQL resolve extractor --language javascript
$env:CODEQL_EXTRACTOR_JAVASCRIPT_ROOT = &"$CodeQL" resolve extractor --language javascript
if ($LASTEXITCODE -ne 0) {
throw 'Failed to resolve JavaScript extractor.'
}
Expand All @@ -40,7 +47,7 @@ $env:CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR = $env:CODEQL_EXTRACTOR_ACTI
$env:CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR = $env:CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR
$env:CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE = $env:CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE

&$JavaScriptAutoBuild
&"$JavaScriptAutoBuild"
if ($LASTEXITCODE -ne 0) {
throw "JavaScript autobuilder failed."
}
3 changes: 2 additions & 1 deletion actions/extractor/tools/autobuild.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@echo off
rem All of the work is done in the PowerShell script
powershell.exe %~dp0autobuild-impl.ps1
echo "Running PowerShell script at '%~dp0autobuild-impl.ps1'"
powershell.exe -File "%~dp0autobuild-impl.ps1"
22 changes: 17 additions & 5 deletions actions/extractor/tools/autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,28 @@ include:**/action.yaml
END
)

if [ -n "${LGTM_INDEX_INCLUDE:-}" ] || [ -n "${LGTM_INDEX_EXCLUDE:-}" ] || [ -n "${LGTM_INDEX_FILTERS:-}" ] ; then
echo "Path filters set. Passing them through to the JavaScript extractor."
if [ -n "${LGTM_INDEX_FILTERS:-}" ]; then
echo "LGTM_INDEX_FILTERS set. Using the default filters together with the user-provided filters, and passing through to the JavaScript extractor."
# Begin with the default path inclusions only,
# followed by the user-provided filters.
# If the user provided `paths`, those patterns override the default inclusions
# (because `LGTM_INDEX_FILTERS` will begin with `exclude:**/*`).
# If the user provided `paths-ignore`, those patterns are excluded.
PATH_FILTERS="$(cat << END
${DEFAULT_PATH_FILTERS}
${LGTM_INDEX_FILTERS}
END
)"
LGTM_INDEX_FILTERS="${PATH_FILTERS}"
export LGTM_INDEX_FILTERS
else
echo "No path filters set. Using the default filters."
echo "LGTM_INDEX_FILTERS not set. Using the default filters, and passing through to the JavaScript extractor."
LGTM_INDEX_FILTERS="${DEFAULT_PATH_FILTERS}"
export LGTM_INDEX_FILTERS
fi

# Find the JavaScript extractor directory via `codeql resolve extractor`.
CODEQL_EXTRACTOR_JAVASCRIPT_ROOT="$($CODEQL_DIST/codeql resolve extractor --language javascript)"
CODEQL_EXTRACTOR_JAVASCRIPT_ROOT="$("${CODEQL_DIST}/codeql" resolve extractor --language javascript)"
export CODEQL_EXTRACTOR_JAVASCRIPT_ROOT

echo "Found JavaScript extractor at '${CODEQL_EXTRACTOR_JAVASCRIPT_ROOT}'."
Expand All @@ -42,4 +54,4 @@ env CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR="${CODEQL_EXTRACTOR_ACTIONS_DIAGN
CODEQL_EXTRACTOR_JAVASCRIPT_SOURCE_ARCHIVE_DIR="${CODEQL_EXTRACTOR_ACTIONS_SOURCE_ARCHIVE_DIR}" \
CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR="${CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR}" \
CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE="${CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE}" \
${JAVASCRIPT_AUTO_BUILD}
"${JAVASCRIPT_AUTO_BUILD}"
5 changes: 5 additions & 0 deletions actions/ql/integration-tests/filters-default/actions.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import actions

from AstNode n
where n instanceof Workflow or n instanceof CompositeAction
select n
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
| src/.github/action.yaml:1:1:11:32 | name: ' ... action' |
| src/.github/actions/action-name/action.yml:1:1:11:32 | name: ' ... action' |
| src/.github/workflows/workflow.yml:1:1:12:33 | name: A workflow |
| src/action.yml:1:1:11:32 | name: ' ... action' |
| src/excluded/action.yml:1:1:11:32 | name: ' ... action' |
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
| src/included/unreachable-workflow.yml:1:1:12:33 | name: A ... orkflow |
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
| src/.github/action.yaml:1:1:11:32 | name: ' ... action' |
| src/.github/actions/action-name/action.yml:1:1:11:32 | name: ' ... action' |
| src/.github/workflows/workflow.yml:1:1:12:33 | name: A workflow |
| src/action.yml:1:1:11:32 | name: ' ... action' |
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
| src/included/action.yml:1:1:11:32 | name: ' ... action' |
| src/included/unreachable-workflow.yml:1:1:12:33 | name: A ... orkflow |
5 changes: 5 additions & 0 deletions actions/ql/integration-tests/filters/actions.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import actions

from AstNode n
where n instanceof Workflow or n instanceof CompositeAction
select n
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths:
- 'included'
paths-ignore:
- 'excluded'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths-ignore:
- 'excluded'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths:
- 'included'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
src/.github/action.yaml
src/.github/actions/action-name/action.yml
src/.github/workflows/workflow.yml
src/action.yml
src/excluded/action.yml
src/included/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src/included/action.yml
src/included/not-an-action.yml
src/included/unreachable-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
src/.github/action.yaml
src/.github/actions/action-name/action.yml
src/.github/workflows/workflow.yml
src/action.yml
src/included/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src/included/action.yml
src/included/not-an-action.yml
src/included/unreachable-workflow.yml
11 changes: 11 additions & 0 deletions actions/ql/integration-tests/filters/src/.github/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'A composite action'
description: 'Do something'
runs:
using: "composite"
steps:
- name: Print
run: echo "Hello world"
shell: bash

- name: Checkout
uses: actions/checkout@v4
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'A composite action'
description: 'Do something'
runs:
using: "composite"
steps:
- name: Print
run: echo "Hello world"
shell: bash

- name: Checkout
uses: actions/checkout@v4
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: An unreachable workflow
on:
push:
branches:
- main

jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: A workflow
on:
push:
branches:
- main

jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
11 changes: 11 additions & 0 deletions actions/ql/integration-tests/filters/src/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'A composite action'
description: 'Do something'
runs:
using: "composite"
steps:
- name: Print
run: echo "Hello world"
shell: bash

- name: Checkout
uses: actions/checkout@v4
11 changes: 11 additions & 0 deletions actions/ql/integration-tests/filters/src/excluded/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'A composite action'
description: 'Do something'
runs:
using: "composite"
steps:
- name: Print
run: echo "Hello world"
shell: bash

- name: Checkout
uses: actions/checkout@v4
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: An unreachable workflow
on:
push:
branches:
- main

jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
11 changes: 11 additions & 0 deletions actions/ql/integration-tests/filters/src/included/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'A composite action'
description: 'Do something'
runs:
using: "composite"
steps:
- name: Print
run: echo "Hello world"
shell: bash

- name: Checkout
uses: actions/checkout@v4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name: 'Not an action, just a YAML file'
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: An unreachable workflow
on:
push:
branches:
- main

jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
12 changes: 12 additions & 0 deletions actions/ql/integration-tests/filters/src/unreachable-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: An unreachable workflow
on:
push:
branches:
- main

jobs:
job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
18 changes: 18 additions & 0 deletions actions/ql/integration-tests/filters/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pytest

@pytest.mark.ql_test(expected=".default-filters.expected")
def test_default_filters(codeql, actions, check_source_archive):
check_source_archive.expected_suffix = ".default-filters.expected"
codeql.database.create(source_root="src")

@pytest.mark.ql_test(expected=".paths-only.expected")
def test_config_paths_only(codeql, actions):
codeql.database.create(source_root="src", codescanning_config="codeql-config.paths-only.yml")

@pytest.mark.ql_test(expected=".paths-ignore-only.expected")
def test_config_paths_ignore_only(codeql, actions):
codeql.database.create(source_root="src", codescanning_config="codeql-config.paths-ignore-only.yml")

@pytest.mark.ql_test(expected=".paths-and-paths-ignore.expected")
def test_config_paths_and_paths_ignore(codeql, actions):
codeql.database.create(source_root="src", codescanning_config="codeql-config.paths-and-paths-ignore.yml")
4 changes: 4 additions & 0 deletions actions/ql/lib/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.7

No user-facing changes.

## 0.4.6

### Bug Fixes
Expand Down
3 changes: 3 additions & 0 deletions actions/ql/lib/change-notes/released/0.4.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 0.4.7

No user-facing changes.
2 changes: 1 addition & 1 deletion actions/ql/lib/codeql-pack.release.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
lastReleaseVersion: 0.4.6
lastReleaseVersion: 0.4.7
10 changes: 10 additions & 0 deletions actions/ql/lib/codeql/actions/config/Config.qll
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,13 @@ predicate untrustedGitCommandDataModel(string cmd_regex, string flag) {
predicate untrustedGhCommandDataModel(string cmd_regex, string flag) {
Extensions::untrustedGhCommandDataModel(cmd_regex, flag)
}

/**
* MaD models for permissions needed by actions
* Fields:
* - action: action name, e.g. `actions/checkout`
* - permission: permission name, e.g. `contents: read`
*/
predicate actionsPermissionsDataModel(string action, string permission) {
Extensions::actionsPermissionsDataModel(action, permission)
}
11 changes: 11 additions & 0 deletions actions/ql/lib/codeql/actions/config/ConfigExtensions.qll
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,14 @@ extensible predicate untrustedGitCommandDataModel(string cmd_regex, string flag)
* Holds for gh commands that may introduce untrusted data
*/
extensible predicate untrustedGhCommandDataModel(string cmd_regex, string flag);

/**
* Holds if `action` needs `permission` to run.
* - 'action' is the name of the action without any version information.
* E.g. for the action selector `actions/checkout@v2`, `action` is `actions/checkout`.
* - `permission` is of the form `scope-name: read|write`, for example `contents: read`.
* - see https://github.com/actions/checkout?tab=readme-ov-file#recommended-permissions
* for an example of recommended permissions.
* - see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token for documentation of token permissions.
*/
extensible predicate actionsPermissionsDataModel(string action, string permission);
Loading
Loading