Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
896 commits
Select commit Hold shift + click to select a range
05a943c
Delete `StandardEndpointFilters`.
tiferet Nov 17, 2022
50291c7
`AtmConfig` inherits from `TaintTracking::Configuration`.
tiferet Nov 18, 2022
cd24ec8
Move the definition of `isSource` to the base class:
tiferet Nov 18, 2022
a710b72
Move the definition of `isSink` to the base class:
tiferet Nov 18, 2022
75cd7a9
Remove code duplication in query .ql files:
tiferet Nov 18, 2022
6f807e9
Doc suggestion from code review
tiferet Nov 29, 2022
84ce232
use the query compilation cache in the ATM qltest
erik-krogh Nov 29, 2022
0eae638
combine into one job, and run on an XL runner
erik-krogh Nov 29, 2022
375403f
Merge pull request #11114 from hmac/case-barrier-guard-3
hmac Nov 29, 2022
dc8b13a
Merge remote-tracking branch 'upstream/main'
your-username Nov 29, 2022
c5184d3
Suggestion from code review:
tiferet Nov 29, 2022
0a98559
Ruby: Add flow summaries for ActiveSupport::JSON
hmac Nov 6, 2022
5259d4a
Ruby: Model various JSON methods
hmac Nov 6, 2022
eff763d
Ruby: Model to_json ActiveSupport extension
hmac Nov 6, 2022
1bd2dd0
Ruby: update test fixture
hmac Nov 7, 2022
35a6201
Ruby: US spelling
hmac Nov 7, 2022
13f4a0e
Add changed framework coverage reports
github-actions[bot] Nov 30, 2022
d20d1e5
Ruby: Add change note
hmac Nov 24, 2022
6725767
Ruby: Remove redundant dataflow test
hmac Nov 24, 2022
14a19d2
Ruby: Fix typo in documentation
hmac Nov 24, 2022
dab7970
Ruby: Model JSON.pretty_generate
hmac Nov 24, 2022
e2e3667
Merge pull request #11323 from github/tiferet/simplify-configs
tiferet Nov 30, 2022
b885249
Add a boosted version of XssThroughDOM
tiferet Nov 30, 2022
2923d0c
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
da57307
Merge pull request #11483 from github/redsun82/cache
redsun82 Nov 30, 2022
b6f240e
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
594b7ef
Merge pull request #11485 from github/workflow/coverage/update
atorralba Nov 30, 2022
d81e084
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
3d0c9c4
Merge branch 'main' into test-ci
erik-krogh Nov 30, 2022
045e6ef
remove unused environment variable
erik-krogh Nov 30, 2022
71f5c8a
Shared: Add Util qlpack.
aschackmull Nov 30, 2022
22eb619
Merge pull request #11467 from erik-krogh/test-ci
redsun82 Nov 30, 2022
d165c49
CI: add workaround for nested composite actions issue
redsun82 Nov 30, 2022
e12e86b
Restore previous cache key
redsun82 Nov 30, 2022
4b38a00
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
ba56565
Update shared/util/codeql/util/Option.qll
aschackmull Nov 30, 2022
ab276fc
Merge pull request #11481 from owen-mc/dataflow/sync-go-libraries-2
owen-mc Nov 30, 2022
4e1356d
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
758cb8b
Shared: Fix trailing and non-ascii whitespace.
aschackmull Nov 30, 2022
ce8a20c
Fix variable name (`source` should be `sink`)
owen-mc Nov 30, 2022
2f4cf59
Merge pull request #11490 from github/redsun82/cache
redsun82 Nov 30, 2022
3d04b26
Merge pull request #11492 from aschackmull/shared/util
aschackmull Nov 30, 2022
207ba86
Ruby: add flow summary for Enumerable#pick
aibaars Nov 17, 2022
5517cfa
Ruby: add flow summary for Enumerable#pluck
aibaars Nov 17, 2022
0f2cb44
Ruby: add flow summary for Enumerable#sole
aibaars Nov 16, 2022
cbf4197
Ruby: add change note
aibaars Nov 28, 2022
55c4643
Dataflow: Sync.
owen-mc Nov 30, 2022
8a0463b
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
6103c57
Address comments
aibaars Nov 30, 2022
635c202
Use `ArgumentPosition` instead of `int`
owen-mc Nov 30, 2022
75940dc
Remove @codeql-go from code owners for dataflow
owen-mc Nov 30, 2022
d53d275
Merge pull request #11450 from d10c/swift/missing-enum-cases
MathiasVP Nov 30, 2022
d8af0bd
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
90d471b
Swift: upgrade to Swift 5.7.1
AlexDenisov Nov 16, 2022
f618d53
Swift: add new implicit conversion
AlexDenisov Nov 23, 2022
67fb56d
Swift: workaround an internal crash coming from Swift 5.7.1
AlexDenisov Nov 24, 2022
ad66353
Swift: bump setup Swift action
AlexDenisov Nov 30, 2022
fe0ae6b
Swift: add 5.7.1 migration scripts
AlexDenisov Nov 24, 2022
4e7e70f
Docs: Add missing `language[monotonicAggregates]` annotation
intrigus-lgtm Nov 30, 2022
e0bd210
Ruby: At most one hash-splat `ParameterNode` per callable
hvitved Nov 28, 2022
b33f592
Data flow: Sync files
hvitved Nov 29, 2022
76db5f2
Swift: make `codegen` resilient to formatting errors
redsun82 Nov 30, 2022
d6aad13
Swift: make `codegen` run when no registry is there
redsun82 Nov 30, 2022
bb3aa9e
Swift: add `--force` to `codegen`
redsun82 Nov 30, 2022
b4e3554
Merge pull request #11370 from github/alexdenisov/swift-5.7.1
redsun82 Nov 30, 2022
ffcdef0
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
1ce2854
Merge pull request #11495 from intrigus-lgtm/patch-7
aschackmull Nov 30, 2022
ddd2101
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
45e2a13
Merge pull request #11494 from owen-mc/dataflow/some-trivial-fixes
owen-mc Nov 30, 2022
3e6b6ed
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
b8c11de
Merge pull request #11498 from github/redsun82/swift-codegen
redsun82 Nov 30, 2022
98082cc
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
6620ba8
Merge branch 'main' into exit-code
erik-krogh Nov 30, 2022
f6bc884
update the expected output for CWE-079
karimhamdanali Nov 30, 2022
0bfe502
Swift: remove patches from the extractor
AlexDenisov Nov 30, 2022
cddc9db
change back to the old order of extracting externs before Xml
erik-krogh Nov 30, 2022
8f45629
Merge pull request #11185 from karimhamdanali/swift-string-taint-steps
karimhamdanali Nov 30, 2022
2f9a16f
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
d958a62
Fix expectations in data.swift
atorralba Nov 30, 2022
6ae10c5
Merge pull request #11501 from atorralba/atorralba/swift/fix-data-tes…
atorralba Nov 30, 2022
6ee7138
Merge remote-tracking branch 'upstream/main'
your-username Nov 30, 2022
4e29ff1
Swift: add `-merge-modules` to `frontend-invocations` test
redsun82 Nov 30, 2022
cd8c40e
Kotlin: Enable java/non-serializable-field for Kotlin
igfoo Nov 25, 2022
9142152
Ruby: Update test
hmac Nov 30, 2022
210d852
add query for SupportedExternalApis
Nov 30, 2022
7f45e32
add tests
Nov 30, 2022
22c4d97
remove old import
Nov 30, 2022
94c5d53
add a couple more tests
Nov 30, 2022
a0a742e
Rename predicates to fit style guide:
tiferet Dec 1, 2022
bd129ed
Merge pull request #11136 from hmac/json-flow-summaries
hmac Dec 1, 2022
4a6de3e
Apply suggestion from code review
tiferet Dec 1, 2022
28e46df
Merge remote-tracking branch 'upstream/main'
your-username Dec 1, 2022
7c1bfdb
Merge pull request #11511 from github/tiferet/renamings
tiferet Dec 1, 2022
5daaf7f
Merge remote-tracking branch 'upstream/main'
your-username Dec 1, 2022
b1b3487
Swift: Add a test for MaD data sources in generics.
geoffw0 Nov 30, 2022
8f24b0b
Swift: Add missing comment.
geoffw0 Nov 30, 2022
d71eeb4
Swift: First fix for MaD on generics.
geoffw0 Nov 28, 2022
5a4d188
Swift: Fix for extensions.
geoffw0 Nov 30, 2022
0a0cfc3
Swift: Do the same for methods.
geoffw0 Dec 1, 2022
c71bd4c
Swift: Remove unused predicate.
geoffw0 Dec 1, 2022
1ea4437
Swift: Autoformat.
geoffw0 Dec 1, 2022
8acc09b
Swift: Make ql-for-ql happy.
geoffw0 Dec 1, 2022
e7264fb
Merge pull request #11480 from RasmusWL/sink-meta-query
RasmusWL Dec 1, 2022
687c0df
Merge remote-tracking branch 'upstream/main'
your-username Dec 1, 2022
4ac9c87
Merge pull request #11508 from github/redsun82/swift-frontend-invocat…
redsun82 Dec 1, 2022
3c42907
Merge remote-tracking branch 'upstream/main'
your-username Dec 1, 2022
ef8e52a
Merge pull request #11437 from igfoo/igfoo/NonSerializableField
igfoo Dec 1, 2022
b19a5cd
Merge remote-tracking branch 'upstream/main'
your-username Dec 1, 2022
cd0d09d
Java: Refactor to avoid using SummaryModelCsv.
michaelnebel Dec 1, 2022
d47b326
Python: Fix `py/meta/points-to-call-graph`
RasmusWL Dec 1, 2022
eb9bee2
JS: Remove MkAsyncFunctionResult
asgerf Nov 30, 2022
d64fd62
Swift: resolve TODOs.
geoffw0 Dec 1, 2022
b7d0d28
Swift: QLDoc.
geoffw0 Dec 1, 2022
c6c4975
Swift: codegen.
geoffw0 Dec 1, 2022
6289ae3
fix a race-condition
erik-krogh Dec 1, 2022
b438285
Fallback to package dir for discovering go.mod
grddev Dec 1, 2022
68504c0
Swift: remove obsolete file
redsun82 Dec 1, 2022
3506065
Merge pull request #11500 from github/alexdenisov/remove-patches-from…
AlexDenisov Dec 1, 2022
a6b8ef3
Swift: Rename predicate.
geoffw0 Dec 1, 2022
3bd4f22
Merge remote-tracking branch 'upstream/main'
your-username Dec 1, 2022
cd6d00e
Swift: add xcode integration test
redsun82 Dec 1, 2022
c374a53
Swift: upload test DBs as artifacts for integration tests
redsun82 Dec 1, 2022
2976daa
Merge pull request #11524 from github/redsun82/swift-remove-dangling-…
redsun82 Dec 1, 2022
02e6724
Merge remote-tracking branch 'upstream/main'
your-username Dec 1, 2022
f388703
ATM: update further files following the addition of XssThroughDom query
jhelie Dec 1, 2022
50a3c0d
ATM: update expected ML test values
jhelie Dec 1, 2022
880548b
Merge branch 'main' into tiferet/boost-xss-through-dom
jhelie Dec 1, 2022
65021e6
Add go.work file
mbg Dec 1, 2022
ae0d82e
ATM: update predicate name
jhelie Dec 1, 2022
98923ce
ATM: update missing .qll
jhelie Dec 1, 2022
352d1a7
ATM: update tests
jhelie Dec 1, 2022
f1ebaf1
add csharp query
Dec 1, 2022
8af2138
Merge pull request #11518 from RasmusWL/fix-call-graph-meta-query
RasmusWL Dec 1, 2022
f1e3694
Merge remote-tracking branch 'upstream/main'
your-username Dec 1, 2022
155c146
Merge branch 'main' into tiferet/boost-xss-through-dom
jhelie Dec 1, 2022
b789534
add csharp tests
Dec 1, 2022
aa63341
add change notes
Dec 1, 2022
0e3e849
add negative summary test for java
Dec 1, 2022
1e01049
Revert testing with experimental `go list` usage
smowton Dec 1, 2022
1b6a501
Merge branch 'main' into redsun82/swift-type-mapping
redsun82 Dec 2, 2022
c145678
Java: Address review comments.
michaelnebel Dec 2, 2022
01307e1
Update java/ql/src/utils/flowtestcasegenerator/FlowTestCase.qll
michaelnebel Dec 2, 2022
73b171e
Update java/ql/src/utils/flowtestcasegenerator/GenerateFlowTestCase.qll
michaelnebel Dec 2, 2022
2d578c1
Merge branch 'main' into merge-package-type-columns
asgerf Dec 2, 2022
e7a48b4
Swift: add a test case for symlinks
AlexDenisov Dec 1, 2022
e6c5975
Merge pull request #11484 from erik-krogh/js-ml-cache
Dec 2, 2022
7a3beac
Swift: resolve symlinks conditionally
AlexDenisov Dec 1, 2022
293319c
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
fae5a9a
Merge pull request #11268 from grddev/accelerate-go-list-option
smowton Dec 2, 2022
2736364
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
3f203ea
Merge pull request #11486 from github/tiferet/boost-xss-through-dom
jhelie Dec 2, 2022
ea8bd55
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
7bf0e7c
Merge pull request #11520 from github/redsun82/swift-xcode-integratio…
AlexDenisov Dec 2, 2022
d2bbb61
Ruby: update syntax for more models
asgerf Dec 2, 2022
7f49844
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
6e98c67
Java: fix syntax error in path-injection example fix
smowton Dec 2, 2022
a245977
C++: Change iterator models.
MathiasVP Dec 2, 2022
cef7224
C++: Make QL-for-QL happy.
MathiasVP Dec 2, 2022
ef72e22
Merge pull request #11513 from asgerf/js/api-graph-async-result-node
asgerf Dec 2, 2022
b7b359f
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
24be481
Merge pull request #11429 from github/redsun82/swift-type-mapping
redsun82 Dec 2, 2022
bada2ae
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
95e6534
Merge pull request #11455 from michaelnebel/java/flowtestcaseextensions
michaelnebel Dec 2, 2022
fb67032
Java/C#: Add query for aiding the conversion of existing negative mod…
michaelnebel Nov 30, 2022
b2dd29f
Java/C#: Update conversion script to also produce negative models.
michaelnebel Nov 30, 2022
cd700df
Swift: upload integration test logs also on failure
redsun82 Dec 2, 2022
5194108
Java/C#: Improve the newlines in the generated model files.
michaelnebel Dec 1, 2022
d9e4aaf
Kotlin: Add Kotlin standard library models as Data extensions.
michaelnebel Nov 30, 2022
42411fd
Java/Kotlin: Allow dashes in callable names (the Kotlin standard libr…
michaelnebel Nov 30, 2022
f5069ff
Kotlin: Remove the inlined models.
michaelnebel Nov 30, 2022
b80829a
Java/Kotlin: Cleanup files needed for inline models.
michaelnebel Nov 30, 2022
3098077
Java: Deprecate ModelCsv classes.
michaelnebel Dec 1, 2022
39d8277
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
194b754
Merge pull request #11525 from github/mbg/add/go.work
smowton Dec 2, 2022
fef03a0
Merge pull request #11540 from github/smowton/fix/path-injection-exam…
smowton Dec 2, 2022
64ac9f7
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
d3e06ee
Merge pull request #11431 from owen-mc/go/update-qldoc
owen-mc Dec 2, 2022
dc4b45a
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
2ae0c7e
Update RequestForgeryGood.js
mattrothenberg Dec 2, 2022
a453405
Update RequestForgeryBad.js
mattrothenberg Dec 2, 2022
691188b
Merge pull request #11523 from github/alexdenisov/preserve-symlinks
AlexDenisov Dec 2, 2022
f5ddbd6
Swift: add a test case showing case canonicalization
AlexDenisov Dec 2, 2022
c49e9e8
fix: use let for subdomain assignment
mattrothenberg Dec 2, 2022
5748496
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
7d674e7
set base URL
mattrothenberg Dec 2, 2022
95f994a
Update RequestForgeryBad.js
mattrothenberg Dec 2, 2022
bb716dd
Merge pull request #11499 from michaelnebel/java/kotlinstd
michaelnebel Dec 2, 2022
5490fe8
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
f8386e7
Merge pull request #11522 from github/redsun82/swift-integration-test…
redsun82 Dec 2, 2022
390fa06
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
2653458
Merge pull request #11537 from MathiasVP/iterator-model-changes
MathiasVP Dec 2, 2022
31eda15
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
a317f2b
Test for endpoints scored at inference time
tiferet Dec 1, 2022
294f34b
Small improvement
tiferet Dec 1, 2022
2e20abc
Undo error from previous commit
tiferet Dec 1, 2022
d17383d
Add XssThroughDom
tiferet Dec 2, 2022
1c7cae4
Merge pull request #11547 from mattrothenberg/main
erik-krogh Dec 2, 2022
c4cb410
Merge pull request #11472 from erik-krogh/exit-code
erik-krogh Dec 2, 2022
c173e79
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
a11756b
Merge pull request #11542 from github/alexdenisov/canonical-case
redsun82 Dec 2, 2022
96cd88e
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
c0aae3d
Apply suggestions from code review
tiferet Dec 2, 2022
d211dec
Fix error in last commit
tiferet Dec 2, 2022
edfcc0c
Merge pull request #11487 from jcogs33/jcogs33/supportedexternalapis-…
jcogs33 Dec 2, 2022
0c96d41
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
ff4baf0
Don't add name mangling to top-level internal functions
smowton Dec 2, 2022
79d8444
Merge pull request #11532 from github/tiferet/endpoint-filter-test
tiferet Dec 2, 2022
4afd606
Merge remote-tracking branch 'upstream/main'
your-username Dec 2, 2022
15c58de
Golang : Add SQL sinks for `gorqlite` and `GoFrame` frameworks
Jun 3, 2022
a0d7043
Swift: always upload integration test logs
redsun82 Dec 5, 2022
c2d843f
CI: Change `--ram` value from 52G to 50G in `codeql` tests
hvitved Dec 5, 2022
6bffb11
Merge pull request #11253 from asgerf/merge-package-type-columns
asgerf Dec 5, 2022
92785b1
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
fea755e
Delete go.work
smowton Dec 5, 2022
3d59935
Merge pull request #11560 from hvitved/ci/decrease-ram
hvitved Dec 5, 2022
8342385
Merge pull request #11339 from aibaars/active_support_enumerable
aibaars Dec 5, 2022
ba04eea
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
59e9d08
Merge branch 'main' into generics
geoffw0 Dec 5, 2022
07e4367
Merge pull request #11562 from github/smowton/admin/remove-go-work
smowton Dec 5, 2022
732bb00
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
faca4b5
Merge pull request #11461 from hvitved/ruby/unique-hash-splat-param
hvitved Dec 5, 2022
9292471
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
ef9b503
Merge pull request #11559 from github/redsun82/swift-integration-test…
AlexDenisov Dec 5, 2022
7883bff
Merge branch 'main' into goSqlInjection
smowton Dec 5, 2022
d39b80a
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
6cb69c9
Merge pull request #11514 from geoffw0/generics
geoffw0 Dec 5, 2022
bab1523
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
07c790a
Merge branch 'main' into alamofire3
geoffw0 Dec 5, 2022
1724473
Swift: Results repaired by merge.
geoffw0 Dec 1, 2022
64fb98e
Swift: Rewrite bits to try and get rid of red highlighting.
geoffw0 Dec 2, 2022
6b9cab2
Merge pull request #11248 from erik-krogh/js-redosMod
erik-krogh Dec 5, 2022
64a3903
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
5b31da4
Merge pull request #11424 from geoffw0/alamofire3
MathiasVP Dec 5, 2022
a80bc3c
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
8897f5b
Merge pull request #11552 from smowton/smowton/fix/kotlin-toplevel-in…
smowton Dec 5, 2022
5e91079
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
5bb1319
Merge pull request #9779 from porcupineyhairs/goSqlInjection
smowton Dec 5, 2022
86cc483
Merge remote-tracking branch 'upstream/main'
your-username Dec 5, 2022
40abfe3
Adding additional hashing algorithms, and block mode predicates. Also…
bdrodes Dec 7, 2022
2c477c7
Changing BlockMode to use the isKnownCipherBlockModeAlgorithm predica…
bdrodes Dec 7, 2022
a50b01f
Updating cryptodrome and crytopgraphy framework libraries to allow fo…
bdrodes Dec 7, 2022
9bf37b3
Interim partially working refactor of crypto libraries for python.
bdrodes Dec 12, 2022
36fb8f0
Updates for key derivation in stdlib
bdrodes Dec 12, 2022
1ff5cc5
Deleting workflow from branch.
bdrodes Dec 13, 2022
60bff80
Cleanup
bdrodes Dec 13, 2022
05f91f3
More cleanup
bdrodes Dec 13, 2022
a1368a4
More cleanup
bdrodes Dec 13, 2022
8564580
adding a predicate to determine if an encryption algorithm is asymmetric
bdrodes Dec 20, 2022
1be6bc3
updating algorithm names. Removed some entries that are redundant, an…
bdrodes Dec 21, 2022
066270c
Changed mechanics for unknown block mode.
bdrodes Dec 21, 2022
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 .github/ISSUE_TEMPLATE/ql---general.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ assignees: ''
**Description of the issue**

<!-- Please explain briefly what is the problem.
If it is about an LGTM project, please include its URL.-->
If it is about a GitHub project, please include its URL. -->

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ql--false-positive.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: CodeQL False positive
name: CodeQL false positive
about: Report CodeQL alerts that you think should not have been detected (not applicable, not exploitable, etc.)
title: False positive
labels: false-positive
Expand Down
55 changes: 55 additions & 0 deletions .github/actions/cache-query-compilation/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Cache query compilation
description: Caches CodeQL compilation caches - should be run both on PRs and pushes to main.

inputs:
key:
description: 'The cache key to use - should be unique to the workflow'
required: true

outputs:
cache-dir:
description: "The directory where the cache was stored"
value: ${{ steps.fill-compilation-dir.outputs.compdir }}

runs:
using: composite
steps:
# calculate the merge-base with main, in a way that works both on PRs and pushes to main.
- name: Calculate merge-base
shell: bash
if: ${{ github.event_name == 'pull_request' }}
env:
BASE_BRANCH: ${{ github.base_ref }}
run: |
MERGE_BASE=$(git cat-file commit $GITHUB_SHA | grep '^parent ' | head -1 | cut -f 2 -d " ")
echo "merge_base=$MERGE_BASE" >> $GITHUB_ENV
- name: Restore read-only cache (PR)
if: ${{ github.event_name == 'pull_request' }}
uses: erik-krogh/actions-cache@a88d0603fe5fb5606db9f002dfcadeb32b5f84c6
with:
path: '**/.cache'
read-only: true
key: codeql-compile-${{ inputs.key }}-pr-${{ github.sha }}
restore-keys: |
codeql-compile-${{ inputs.key }}-${{ github.base_ref }}-${{ env.merge_base }}
codeql-compile-${{ inputs.key }}-${{ github.base_ref }}-
codeql-compile-${{ inputs.key }}-main-
- name: Fill cache (push)
if: ${{ github.event_name != 'pull_request' }}
uses: erik-krogh/actions-cache@a88d0603fe5fb5606db9f002dfcadeb32b5f84c6
with:
path: '**/.cache'
key: codeql-compile-${{ inputs.key }}-${{ github.ref_name }}-${{ github.sha }} # just fill on main
restore-keys: | # restore the latest cache if the exact cache is unavailable, to speed up compilation.
codeql-compile-${{ inputs.key }}-${{ github.ref_name }}-
codeql-compile-${{ inputs.key }}-main-
- name: Fill compilation cache directory
id: fill-compilation-dir
shell: bash
run: |
# Move all the existing cache into another folder, so we only preserve the cache for the current queries.
node $GITHUB_WORKSPACE/.github/actions/cache-query-compilation/move-caches.js ${COMBINED_CACHE_DIR}

echo "compdir=${COMBINED_CACHE_DIR}" >> $GITHUB_OUTPUT
env:
COMBINED_CACHE_DIR: ${{ runner.temp }}/compilation-dir
75 changes: 75 additions & 0 deletions .github/actions/cache-query-compilation/move-caches.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// # Move all the existing cache into another folder, so we only preserve the cache for the current queries.
// mkdir -p ${COMBINED_CACHE_DIR}
// rm -f **/.cache/{lock,size} # -f to avoid errors if the cache is empty.
// # copy the contents of the .cache folders into the combined cache folder.
// cp -r **/.cache/* ${COMBINED_CACHE_DIR}/ || : # ignore missing files
// # clean up the .cache folders
// rm -rf **/.cache/*

const fs = require("fs");
const path = require("path");

// the first argv is the cache folder to create.
const COMBINED_CACHE_DIR = process.argv[2];

function* walkCaches(dir) {
const files = fs.readdirSync(dir, { withFileTypes: true });
for (const file of files) {
if (file.isDirectory()) {
const filePath = path.join(dir, file.name);
yield* walkCaches(filePath);
if (file.name === ".cache") {
yield filePath;
}
}
}
}

async function copyDir(src, dest) {
for await (const file of await fs.promises.readdir(src, { withFileTypes: true })) {
const srcPath = path.join(src, file.name);
const destPath = path.join(dest, file.name);
if (file.isDirectory()) {
if (!fs.existsSync(destPath)) {
fs.mkdirSync(destPath);
}
await copyDir(srcPath, destPath);
} else {
await fs.promises.copyFile(srcPath, destPath);
}
}
}

async function main() {
const cacheDirs = [...walkCaches(".")];

for (const dir of cacheDirs) {
console.log(`Found .cache dir at ${dir}`);
}

// mkdir -p ${COMBINED_CACHE_DIR}
fs.mkdirSync(COMBINED_CACHE_DIR, { recursive: true });

// rm -f **/.cache/{lock,size} # -f to avoid errors if the cache is empty.
await Promise.all(
cacheDirs.map((cacheDir) =>
(async function () {
await fs.promises.rm(path.join(cacheDir, "lock"), { force: true });
await fs.promises.rm(path.join(cacheDir, "size"), { force: true });
})()
)
);

// # copy the contents of the .cache folders into the combined cache folder.
// cp -r **/.cache/* ${COMBINED_CACHE_DIR}/ || : # ignore missing files
await Promise.all(
cacheDirs.map((cacheDir) => copyDir(cacheDir, COMBINED_CACHE_DIR))
);

// # clean up the .cache folders
// rm -rf **/.cache/*
await Promise.all(
cacheDirs.map((cacheDir) => fs.promises.rm(cacheDir, { recursive: true }))
);
}
main();
48 changes: 7 additions & 41 deletions .github/workflows/compile-queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,58 +14,24 @@ jobs:

steps:
- uses: actions/checkout@v3
# calculate the merge-base with main, in a way that works both on PRs and pushes to main.
- name: Calculate merge-base
if: ${{ github.event_name == 'pull_request' }}
env:
BASE_BRANCH: ${{ github.base_ref }}
run: |
MERGE_BASE=$(git cat-file commit $GITHUB_SHA | grep '^parent ' | head -1 | cut -f 2 -d " ")
echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
- name: Read CodeQL query compilation - PR
if: ${{ github.event_name == 'pull_request' }}
uses: actions/cache@v3
with:
path: '*/ql/src/.cache'
key: codeql-compile-pr-${{ github.sha }} # deliberately not using the `compile-compile-main` keys here.
restore-keys: |
codeql-compile-${{ github.base_ref }}-${{ env.merge-base }}
codeql-compile-${{ github.base_ref }}-
codeql-compile-main-
- name: Fill CodeQL query compilation cache - main
if: ${{ github.event_name != 'pull_request' }}
uses: actions/cache@v3
with:
path: '*/ql/src/.cache'
key: codeql-compile-${{ github.ref_name }}-${{ github.sha }} # just fill on main
restore-keys: | # restore from another random commit, to speed up compilation.
codeql-compile-${{ github.ref_name }}-
codeql-compile-main-
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql
with:
channel: 'release'
- name: Cache compilation cache
id: query-cache
uses: ./.github/actions/cache-query-compilation
with:
key: all-queries
- name: check formatting
run: find */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 codeql query format --check-only
- name: compile queries - check-only
# run with --check-only if running in a PR (github.sha != main)
if : ${{ github.event_name == 'pull_request' }}
shell: bash
run: codeql query compile -j0 */ql/src --keep-going --warnings=error --check-only
run: codeql query compile -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
- name: compile queries - full
# do full compile if running on main - this populates the cache
if : ${{ github.event_name != 'pull_request' }}
shell: bash
run: |
# Move all the existing cache into another folder, so we only preserve the cache for the current queries.
mkdir -p ${COMBINED_CACHE_DIR}
rm */ql/src/.cache/{lock,size}
# copy the contents of the .cache folders into the combined cache folder.
cp -r */ql/src/.cache/* ${COMBINED_CACHE_DIR}/
# clean up the .cache folders
rm -rf */ql/src/.cache/*

# compile the queries
codeql query compile -j0 */ql/src --keep-going --warnings=error --compilation-cache ${COMBINED_CACHE_DIR}
env:
COMBINED_CACHE_DIR: ${{ github.workspace }}/compilation-dir
run: codeql query compile -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
86 changes: 86 additions & 0 deletions .github/workflows/csharp-qltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: "C#: Run QL Tests"

on:
push:
paths:
- "csharp/**"
- "shared/**"
- .github/actions/fetch-codeql/action.yml
- codeql-workspace.yml
branches:
- main
- "rc/*"
pull_request:
paths:
- "csharp/**"
- "shared/**"
- .github/workflows/csharp-qltest.yml
- .github/actions/fetch-codeql/action.yml
- codeql-workspace.yml
branches:
- main
- "rc/*"

defaults:
run:
working-directory: csharp

jobs:
qlupgrade:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/fetch-codeql
- name: Check DB upgrade scripts
run: |
echo >empty.trap
codeql dataset import -S ql/lib/upgrades/initial/semmlecode.csharp.dbscheme testdb empty.trap
codeql dataset upgrade testdb --additional-packs ql/lib
diff -q testdb/semmlecode.csharp.dbscheme ql/lib/semmlecode.csharp.dbscheme
- name: Check DB downgrade scripts
run: |
echo >empty.trap
rm -rf testdb; codeql dataset import -S ql/lib/semmlecode.csharp.dbscheme testdb empty.trap
codeql resolve upgrades --format=lines --allow-downgrades --additional-packs downgrades \
--dbscheme=ql/lib/semmlecode.csharp.dbscheme --target-dbscheme=downgrades/initial/semmlecode.csharp.dbscheme |
xargs codeql execute upgrades testdb
diff -q testdb/semmlecode.csharp.dbscheme downgrades/initial/semmlecode.csharp.dbscheme
qltest:
runs-on: ubuntu-latest-xl
strategy:
fail-fast: false
matrix:
slice: ["1/2", "2/2"]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/fetch-codeql
- uses: ./csharp/actions/create-extractor-pack
- name: Cache compilation cache
id: query-cache
uses: ./.github/actions/cache-query-compilation
with:
key: csharp-qltest-${{ matrix.slice }}
- name: Run QL tests
run: |
CODEQL_PATH=$(gh codeql version --format=json | jq -r .unpackedLocation)
# The legacy ASP extractor is not in this repo, so take the one from the nightly build
mv "$CODEQL_PATH/csharp/tools/extractor-asp.jar" "${{ github.workspace }}/csharp/extractor-pack/tools"
# Safe guard against using the bundled extractor
rm -rf "$CODEQL_PATH/csharp"
codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path "${{ github.workspace }}/csharp/extractor-pack" --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
env:
GITHUB_TOKEN: ${{ github.token }}
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.202
- name: Extractor unit tests
run: |
dotnet test -p:RuntimeFrameworkVersion=6.0.4 "${{ github.workspace }}/csharp/extractor/Semmle.Util.Tests"
dotnet test -p:RuntimeFrameworkVersion=6.0.4 "${{ github.workspace }}/csharp/extractor/Semmle.Extraction.Tests"
dotnet test -p:RuntimeFrameworkVersion=6.0.4 "${{ github.workspace }}/csharp/autobuilder/Semmle.Autobuild.CSharp.Tests"
dotnet test -p:RuntimeFrameworkVersion=6.0.4 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
80 changes: 80 additions & 0 deletions .github/workflows/go-tests-other-os.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: "Go: Run Tests - Other OS"
on:
pull_request:
paths:
- "go/**"
- "!go/ql/**" # don't run other-os if only ql/ files changed
- .github/workflows/go-tests-other-os.yml
- .github/actions/**
- codeql-workspace.yml
jobs:
test-mac:
name: Test MacOS
runs-on: macos-latest
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19
id: go

- name: Check out code
uses: actions/checkout@v2

- name: Set up CodeQL CLI
uses: ./.github/actions/fetch-codeql

- name: Enable problem matchers in repository
shell: bash
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'

- name: Build
run: |
cd go
make

- name: Cache compilation cache
id: query-cache
uses: ./.github/actions/cache-query-compilation
with:
key: go-qltest
- name: Test
run: |
cd go
make test cache="${{ steps.query-cache.outputs.cache-dir }}"

test-win:
name: Test Windows
runs-on: windows-latest-xl
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19
id: go

- name: Check out code
uses: actions/checkout@v2

- name: Set up CodeQL CLI
uses: ./.github/actions/fetch-codeql

- name: Enable problem matchers in repository
shell: bash
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'

- name: Build
run: |
cd go
make

- name: Cache compilation cache
id: query-cache
uses: ./.github/actions/cache-query-compilation
with:
key: go-qltest

- name: Test
run: |
cd go
make test cache="${{ steps.query-cache.outputs.cache-dir }}"
Loading