Skip to content
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
dc46487
Add a query for server-side request forgery
hmac Oct 22, 2021
2bba31e
Update metadata of Ruby SSRF query
hmac Nov 1, 2021
ac20eaf
Add qhelp for Ruby SSRF
hmac Nov 3, 2021
e87a453
Remove redundant imports
hmac Nov 9, 2021
70efada
Add change note for Ruby SSRF query
hmac Nov 9, 2021
f933d24
Fix comment
hmac Nov 18, 2021
38ff584
Model more Faraday behaviour
hmac Nov 18, 2021
e2ef780
Add `base_uri` note to `HTTParty` modelling
hmac Nov 18, 2021
c297a68
Model more of the `RestClient` API
hmac Nov 18, 2021
8fc7e4b
Ruby: Increase precision of SSRF query
hmac Nov 18, 2021
cd39d15
Simplify diagnostic query
Nov 19, 2021
90a9688
Ruby: update CFG fixture
hmac Nov 19, 2021
a393bff
C#: Fix bad magic `Element::getLocation` in context of `SelfAssignmen…
hvitved Nov 19, 2021
75586b0
Apply suggestions from code review
erik-krogh Nov 19, 2021
2b2ff77
Merge pull request #7179 from hvitved/ruby/shared-ssa-consistency
hvitved Nov 19, 2021
47fd64f
Merge pull request #7130 from hvitved/cfg/dead-end-consistency
hvitved Nov 19, 2021
8ba864e
JS: Rename the available ML models external predicate
henrymercer Nov 19, 2021
2b1f34e
Java: Don't clear content in store steps in summaries.
aschackmull Nov 19, 2021
fc43220
Java: bugfix
aschackmull Nov 19, 2021
0600078
Ruby: Document PairCfgNode::getKey/getValue
hmac Nov 19, 2021
344f7bc
Merge pull request #7187 from aschackmull/java/dont-clear-in-summary-…
aschackmull Nov 19, 2021
9f08aca
Merge pull request #7170 from erik-krogh/qldocStyle
erik-krogh Nov 19, 2021
089d030
make ApiLabel into a IPA type, and cache the public API of ApiGraphs
erik-krogh Nov 19, 2021
f39872e
cache more predicates
erik-krogh Nov 19, 2021
c369b28
optimizations in global data flow
erik-krogh Nov 19, 2021
6060f2e
remove unused alias edge
erik-krogh Nov 19, 2021
0de6511
Update query-metadata-style-guide.md
AlonaHlobina Nov 22, 2021
39e3254
Merge pull request #7182 from hvitved/csharp/self-assignment-bad-magic
hvitved Nov 22, 2021
f09f1c4
Python: Minor refactor in PoorMansFunctionResolution
RasmusWL Nov 22, 2021
8322a44
JS: Mention .hbs, .ejs, and .njk file extensions
asgerf Nov 22, 2021
6f2b528
C++: Move experimental test.
geoffw0 Nov 22, 2021
e9df860
refactor implementation to make Label implementations private
erik-krogh Nov 22, 2021
fc64fae
Ruby: Restrict use-use flow
hvitved Nov 22, 2021
ddeb700
Merge pull request #7207 from github/asgerf/document-template-languag…
codeql-ci Nov 22, 2021
6f22867
Merge pull request #7015 from github/hmac/ssrf
hmac Nov 22, 2021
74221f4
Merge pull request #7209 from geoffw0/experimental-tests
MathiasVP Nov 22, 2021
f308be7
C++: Restore the missing flow. This has a couple of side-effects: Fir…
MathiasVP Nov 22, 2021
21167f4
C++: Accept test changes.
MathiasVP Nov 22, 2021
b60fef8
Merge pull request #7206 from github/AlonaHlobina-patch-2
AlonaHlobina Nov 22, 2021
5220749
Merge Ruby workspace into root workspace
Nov 22, 2021
da39f15
Ruby: Move `localFlowStepCommon` into `LocalFlow` and make `localSsaF…
hvitved Nov 22, 2021
186e375
Remove unnecessary path options
Nov 22, 2021
68c3c16
Ruby: enable forgery protection checks for development environments
alexrford Nov 22, 2021
f6baab6
Merge pull request #7211 from dbartol/dbartol/ruby-workspace
aibaars Nov 22, 2021
eaed870
Python: Fix performance problem in PoorMansFunctionResolution
RasmusWL Nov 22, 2021
752b126
Merge remote-tracking branch 'origin/main' into nickrolfe/regex_injec…
nickrolfe Nov 22, 2021
5b11cfe
Ruby: fix up import path
nickrolfe Nov 22, 2021
4b42c44
Ruby: handle Regexp.quote wherever we handle Regexp.escape
nickrolfe Nov 22, 2021
13459c8
Ruby: add Regexp.compile as sink for regexp injection query
nickrolfe Nov 22, 2021
245edd4
Merge pull request #7186 from github/henrymercer/rename-available-mod…
henrymercer Nov 22, 2021
ed78d39
Move duplicate code to the shared library and update qldoc
luchua-bc Nov 23, 2021
a68b55b
Merge pull request #7208 from hvitved/ruby/restrict-use-use
aschackmull Nov 23, 2021
b8e8ddf
fix link
jf205 Nov 23, 2021
50518b5
Fix sum of rows
Nov 23, 2021
dcca5d2
Merge pull request #7172 from hvitved/ruby/ensure-split-cp
hvitved Nov 23, 2021
21aff99
Merge pull request #7215 from github/jf205-patch-1
jf205 Nov 23, 2021
672485a
Merge branch 'main' into remove-reference-to-as-load
MathiasVP Nov 23, 2021
9d072a1
Merge pull request #7098 from github/ruby/desugar-for-1
hvitved Nov 23, 2021
e711ba9
Dataflow: Remove negation materialization.
aschackmull Nov 23, 2021
e5f4730
Ruby: add Regexp.{compile,quote} to regex injection test
nickrolfe Nov 23, 2021
baafd9f
Python: Add an other path injection FP
RasmusWL Nov 23, 2021
b2e40ac
fix typo in test
erik-krogh Nov 23, 2021
e185e90
Shared SSA: Fix consistency tests
hvitved Nov 23, 2021
0bd587b
Shared SSA: Sync files
hvitved Nov 23, 2021
8cccee6
Merge pull request #6972 from yoff/python/promote-redos
tausbn Nov 23, 2021
f5f67dd
Dataflow: Pull ccc.matchesCall(call) from the recursive loop.
aschackmull Nov 23, 2021
055641e
Merge pull request #7062 from github/ruby/rails-csrf
alexrford Nov 23, 2021
3e1164f
Merge pull request #7109 from MathiasVP/remove-reference-to-as-load
geoffw0 Nov 23, 2021
822890f
Dataflow: Remove disjunction-induced tuple duplication.
aschackmull Nov 23, 2021
4d918b5
Ruby: Fix CFG splitting logic for `ensure` blocks with loops
hvitved Nov 23, 2021
83d204d
Merge pull request #7218 from hvitved/ssa/fix-consistency-tests
hvitved Nov 23, 2021
74c0197
C++: take IR Operand locations from definitions
redsun82 Nov 19, 2021
5202f96
C++: sync Operand source
redsun82 Nov 19, 2021
b5165e3
C++: more fine-grained Operand location change
redsun82 Nov 19, 2021
0ff9520
...and syncing files again
redsun82 Nov 19, 2021
6072ccd
auto-format
redsun82 Nov 22, 2021
28806fe
update test results after operand location changes
redsun82 Nov 22, 2021
4498657
Apply suggestions from code review
redsun82 Nov 22, 2021
d4e80c6
replace shouldDump -> shouldDumpLocation
redsun82 Nov 22, 2021
0547e4c
update further test with new locations
redsun82 Nov 22, 2021
0bb11fa
fix PrintAST test run
redsun82 Nov 22, 2021
9b818a0
sync
redsun82 Nov 22, 2021
30805d9
add `ThisArgumentOperand` special case
redsun82 Nov 23, 2021
8b44d5c
sync files
redsun82 Nov 23, 2021
e99a040
implement review suggestions
redsun82 Nov 23, 2021
d626745
fix `ThisArgumentOperand` location
redsun82 Nov 23, 2021
9538ac7
account for non-existing locations
redsun82 Nov 23, 2021
055017d
fix how non existing locations are accounted for
redsun82 Nov 23, 2021
1a90b38
Merge remote-tracking branch 'origin/main' into nickrolfe/regex_injec…
nickrolfe Nov 23, 2021
bb38c4d
Merge pull request #6978 from github/nickrolfe/regex_injection
nickrolfe Nov 23, 2021
8c9e817
Merge pull request #7188 from github/redsun82/fix-operand-location
MathiasVP Nov 23, 2021
e56737e
Use value step to optimize the taint step and add a test case for Apa…
luchua-bc Nov 23, 2021
87a1ccd
Merge branch 'main' into getRubyInSync
erik-krogh Nov 23, 2021
133ec2e
Fix CI jobs
aibaars Nov 23, 2021
4cbfc30
C++: Hide dataflow nodes if they're just used for flow-through for re…
MathiasVP Nov 24, 2021
2e7ddb4
C++: Accept test changes.
MathiasVP Nov 24, 2021
b2611fe
Merge branch 'main' into redos-cwe-1333
RasmusWL Nov 24, 2021
a3b263e
Merge pull request #7181 from bmuskalla/coverageAsDiagnostics
aschackmull Nov 24, 2021
f9729bc
Merge pull request #7143 from RasmusWL/path-improvements
yoff Nov 24, 2021
d493cfd
Python: Model FastAPI `FileResponse` as `FileSystemAccess`
RasmusWL Nov 24, 2021
6c7a01d
C++: Add some comments to the two 'flowThrough' predicates.
MathiasVP Nov 24, 2021
47448d9
Python: Apply suggestions from code review
RasmusWL Nov 24, 2021
e607c51
C#: Initial implementation of csv printing in FlowSummaries test
michaelnebel Nov 19, 2021
3a7d51d
C#: Don't throw away ReturnKind information, when printing flow summa…
michaelnebel Nov 24, 2021
914d3d8
C#: Update flow summaries test to print results in CSV syntax
michaelnebel Nov 23, 2021
e153a65
C#: Update flow summaries test for EntityFramework to print results i…
michaelnebel Nov 24, 2021
a3ca9ad
C#: Sync flow summary implementation files and implement specific par…
michaelnebel Nov 23, 2021
6d9cea9
Merge pull request #7226 from MathiasVP/shorter-ir-dataflow-paths
MathiasVP Nov 24, 2021
120f204
Document XXE sanitisation policy
smowton Nov 24, 2021
c3996b0
C#: Update the Microsoft.NETCore.App stub
michaelnebel Nov 24, 2021
136ecaf
Abbreviate qhelp example
smowton Nov 24, 2021
5101a8e
Fix qhelp test
smowton Nov 24, 2021
cec91c4
Update ThreadResourceAbuse.qhelp
smowton Nov 24, 2021
c74eac4
Remove needless casts
smowton Nov 24, 2021
1739673
C#: Enable SSA consistency queries
hvitved Nov 19, 2021
1d654d1
C#: Restrict `refReadBeforeWrite`
hvitved Nov 23, 2021
1411804
Python: Allow custom `fastapi.APIRouter` subclasses
RasmusWL Nov 24, 2021
e265259
Python: Change perf fix PoorMansFunctionResolution
RasmusWL Nov 24, 2021
2a5e0a3
Merge pull request #7145 from RasmusWL/remove-owasp-tags
RasmusWL Nov 24, 2021
f85fa87
C#: Add test that illustrates problem with `getEnclosingCallable`
hvitved Nov 24, 2021
4efdcc2
Dataflow: Improve barrier handling.
aschackmull Nov 24, 2021
7dde52c
Merge pull request #7131 from RasmusWL/wsgiref.simple_server
RasmusWL Nov 24, 2021
1d1780b
C#: Fix bug in `getEnclosingCallable`
hvitved Nov 24, 2021
b0031a0
Add local input test case and update qldoc
luchua-bc Nov 24, 2021
b9d0a60
C#: Addressed review comments from hvitved
michaelnebel Nov 24, 2021
a7ec0fa
Dataflow: Remove more disjunction-induced tuple duplication.
aschackmull Nov 24, 2021
7ca3407
Dataflow: Sync.
aschackmull Nov 24, 2021
c05ffd4
JS/PY: Remove CWE-315 form CleartextLogging
RasmusWL Nov 24, 2021
651a76c
Python: Add CWE-532 to CleartextLogging
RasmusWL Nov 24, 2021
3bab8c6
Merge pull request #7173 from erik-krogh/getRubyInSync
erik-krogh Nov 24, 2021
08ce03c
Merge branch 'main' into explicit-this
erik-krogh Nov 24, 2021
1e752f3
apply the explicit this patch to new code
erik-krogh Nov 24, 2021
4b3b1d2
Merge pull request #7222 from aibaars/ruby-ci-fix
aibaars Nov 24, 2021
e7524de
Update tree-sitter-ruby
aibaars Nov 16, 2021
5d0dfe8
Re-generate library and dbscheme
aibaars Nov 16, 2021
6afcbce
C++: Prototype SSL result conflation query.
geoffw0 Nov 19, 2021
2eae6a3
C++: Add qhelp for result conflation query.
geoffw0 Nov 24, 2021
ce2b86b
C++: Add metadata for result conflation query.
geoffw0 Nov 24, 2021
88b6bd9
C++: Switch result conflation query to a slightly simpler dataflow-on…
geoffw0 Nov 24, 2021
7869733
C++: Autoformat result conflation query.
geoffw0 Nov 24, 2021
5eb814f
C++: Prototype SSL result not checked query.
geoffw0 Nov 23, 2021
72a0325
C++: Add qhelp for result not checked query.
geoffw0 Nov 24, 2021
5ffbf56
C++: Add metadata for result not checked query.
geoffw0 Nov 24, 2021
8abaf12
C++: Clean up result not checked query.
geoffw0 Nov 24, 2021
4c5faaf
C++: Autoformat result not checked query.
geoffw0 Nov 24, 2021
3c8f6e3
Merge pull request #6717 from luchua-bc/java/thread-resource-abuse
smowton Nov 24, 2021
d3da790
Merge pull request #6873 from erik-krogh/explicit-this
codeql-ci Nov 24, 2021
6cb0099
Data flow: Introduce `ConsistencyConfiguration` class
hvitved Nov 25, 2021
609d601
Merge pull request #7229 from smowton/smowton/admin/document-xxe-sani…
aschackmull Nov 25, 2021
5b560b1
Create upgrade script
aibaars Nov 17, 2021
ec0bd24
Update diagnostic tests
aibaars Nov 17, 2021
9eb9eb6
Note that FEATURE_SECURE_PROCESSING isn't a sufficient defence agains…
smowton Nov 25, 2021
078a2aa
Update AST library
aibaars Nov 22, 2021
af4c312
Test case for **nil parameter
aibaars Nov 24, 2021
16e1e97
Add test data for case-in expressions
aibaars Nov 24, 2021
dca1e34
Temporarily allow CFG inconsistencies
aibaars Nov 25, 2021
8b0bc67
Remove PatternGuard class
aibaars Nov 25, 2021
9540bee
Update java/ql/test/query-tests/security/CWE-611/DocumentBuilderTests…
smowton Nov 25, 2021
dc0b044
Merge pull request #7185 from hvitved/csharp/ssa/consistency-queries
hvitved Nov 25, 2021
e801d96
Ruby: add ruby/ruby to the dataset-measure CI job
aibaars Nov 25, 2021
f5b4073
C++: Add security-severity tag and provisional precision.
geoffw0 Nov 25, 2021
a066429
Merge pull request #7232 from aschackmull/dataflow/perf
aschackmull Nov 25, 2021
1d358c5
C++: Change note.
geoffw0 Nov 25, 2021
db39c0b
CharacterLiteral.getCodePointValue: fix handling of surrogates
smowton Nov 25, 2021
ce63549
Apply review comments
smowton Nov 25, 2021
e9ce296
C++: Qldoc.
geoffw0 Nov 25, 2021
e98ab5d
C++: Add security-severity tag and provisional precision.
geoffw0 Nov 25, 2021
f969689
C++: Change note.
geoffw0 Nov 25, 2021
7ac5791
Update charLiterals.expected
smowton Nov 25, 2021
2af5095
JS: Add ML models specification to ATM query pack definition
henrymercer Nov 25, 2021
29eb66d
JS: Add ML models to `.gitignore`
henrymercer Nov 25, 2021
1ddf5fb
Java: Ratpack HTTP Framework Additional Modeling
JLLeitschuh Oct 29, 2021
36bb84d
Copyedit change note
smowton Nov 23, 2021
aa9a8a0
Merge pull request #7244 from github/henrymercer/atm-specify-ml-model…
henrymercer Nov 25, 2021
d3a4dad
Merge pull request #7240 from smowton/smowton/admin/derecognise-xxe-s…
smowton Nov 25, 2021
57fd397
Merge pull request #7239 from smowton/smowton/fix/useless-comparison-…
aschackmull Nov 26, 2021
00ee34c
Merge pull request #7237 from hvitved/dataflow/consistency-config
aschackmull Nov 26, 2021
d4f3a6d
C#: Review comments. Keep the TContent type pribate
michaelnebel Nov 26, 2021
fdc9436
Merge pull request #7178 from michaelnebel/csharp-flowsummary-pp-csv
hvitved Nov 29, 2021
9239d40
Merge pull request #7230 from michaelnebel/csharp-update-netcoreapp-stub
michaelnebel Nov 29, 2021
e24b15b
C#: Only create flow summaries for declarations that are effectively …
michaelnebel Nov 29, 2021
e153988
C#: Update flow summaries tests
michaelnebel Nov 29, 2021
e476cde
Merge pull request #7255 from michaelnebel/csharp-effecpublic-flowsum…
michaelnebel Nov 29, 2021
d793377
Update cpp/ql/src/Security/CWE/CWE-295/SSLResultNotChecked.qhelp
geoffw0 Nov 29, 2021
c13cad7
Merge branch 'main' into apiLabel2
erik-krogh Nov 29, 2021
88fb1a1
C++: Correct the doc.
geoffw0 Nov 29, 2021
f8a62c4
Address comments
aibaars Nov 29, 2021
e63f914
Merge pull request #7233 from RasmusWL/fix-cleartext-logging-cwes
yoff Nov 29, 2021
1e026ef
AST: merge Case and CaseMatch classes
aibaars Nov 29, 2021
19802cc
Merge pull request #7046 from RasmusWL/django-own-json-response
yoff Nov 29, 2021
41b7922
Merge pull request #7089 from RasmusWL/redos-cwe-1333
yoff Nov 29, 2021
d557f6f
Merge pull request #7101 from RasmusWL/python-ids
RasmusWL Nov 29, 2021
27f40e0
Merge pull request #7007 from JLLeitschuh/feat/JLL/improve_ratpack_su…
smowton Nov 29, 2021
66e086f
Add changed framework coverage reports
github-actions[bot] Nov 30, 2021
f4555ed
Merge pull request #7242 from geoffw0/sslquery
MathiasVP Nov 30, 2021
c91b6f7
Merge pull request #7266 from github/workflow/coverage/update
atorralba Nov 30, 2021
8f270b6
C++: Fix test comments.
geoffw0 Nov 29, 2021
3f218c9
C++: add some more range analysis tests
redsun82 Nov 30, 2021
b40c77d
Merge pull request #7267 from github/redsun82/cpp-overrunning-write-p…
redsun82 Nov 30, 2021
0619453
C#: Explicitly set .NET 5.0 as target framework in class lib and hard…
michaelnebel Nov 30, 2021
8a6a8fc
C#: Update the stub for Microsoft.NETCore.App by creating as a depend…
michaelnebel Nov 30, 2021
fc05825
Dataflow: Make stage 2 equal to stages 3 and 4.
aschackmull Nov 30, 2021
3e914ef
Dataflow: Sync.
aschackmull Nov 30, 2021
830908b
Address comments
aibaars Nov 30, 2021
2589034
C#: Execute commands with the tempDir as the working directory
michaelnebel Nov 30, 2021
7d6664f
C#: Use NuGet package generated stubs for dependencies for flow summa…
michaelnebel Nov 24, 2021
5dd2d20
C#: Remove overlapping declaration of System.Web.HttpUtility
michaelnebel Nov 24, 2021
a5b6889
C# Update flow summaries test.
michaelnebel Nov 29, 2021
bab8cfb
C# Generate stubs for System.Data.SqlClient
michaelnebel Nov 30, 2021
0b4d0d2
C#: Use stubs for the CWE-838 testcase
michaelnebel Nov 30, 2021
59b71df
C#: Use stubs for the CWE-601 testcase.
michaelnebel Nov 30, 2021
1243d40
Revert "C#: Update the stub for Microsoft.NETCore.App by creating as …
michaelnebel Nov 30, 2021
186ba42
C#: Remove workdir as error message when format fails.
michaelnebel Nov 30, 2021
4b221bd
C++: Use guard.controls.
geoffw0 Nov 29, 2021
cde853c
Merge pull request #7270 from aschackmull/dataflow/stage2-refactor
aschackmull Dec 1, 2021
93e291c
C#: Fix `Newtonsoft.Json.JsonSerializer.{Deserialize,Serialize}` summ…
hvitved Dec 1, 2021
e41cd81
Merge pull request #7154 from aibaars/ruby-pattern-matching
aibaars Dec 1, 2021
ed706d9
Merge pull request #7269 from michaelnebel/chspar-nuget-stub-script
michaelnebel Dec 1, 2021
75f9a94
Merge pull request #7257 from michaelnebel/csharp-nuget-packages
michaelnebel Dec 1, 2021
aad55ff
Merge pull request #7279 from hvitved/csharp/json-net-fix-summaries
hvitved Dec 1, 2021
148da61
make the ApiLabel class non-abstract
erik-krogh Dec 1, 2021
0a3d62c
rename `mod` -> `module`
erik-krogh Dec 1, 2021
cc2914b
C#: Include NewtonSoft.Json stubs into the flow summaries test.
michaelnebel Dec 1, 2021
9e10aee
C#: Update the flow summaries test.
michaelnebel Dec 1, 2021
a077345
Merge pull request #7180 from erik-krogh/apiLabel2
erik-krogh Dec 1, 2021
9f8326a
Merge pull request #7243 from geoffw0/sslquery2
MathiasVP Dec 1, 2021
55c17f4
Merge pull request #7280 from michaelnebel/csharp-newtonsoft-flowsummary
michaelnebel Dec 2, 2021
e08c734
C#: Refactoring to allow override of the flow summaries reported by a…
michaelnebel Dec 1, 2021
a8f673f
C#: Add a test that only prints 'base' flow summaries.
michaelnebel Dec 1, 2021
ad281c0
C#: Sync FlowSummaryImpl files.
michaelnebel Dec 1, 2021
37644d3
Merge pull request #7281 from michaelnebel/csharp-flowsummaries-filtered
michaelnebel Dec 2, 2021
edf7724
C#: Remove trailing whitespace after comma, when priting callable in …
michaelnebel Dec 2, 2021
8f3be9f
C#: Update flow summaries test according to new printing format.
michaelnebel Dec 2, 2021
4609b20
Merge pull request #7217 from RasmusWL/more-path-injection-fps
yoff Dec 2, 2021
913d836
C++: Add CWE-260 tag to cpp/cleartext-storage-file.
geoffw0 Dec 2, 2021
f10f053
Merge pull request #7228 from RasmusWL/fastapi-improvements
yoff Dec 2, 2021
7aa6c62
C++: Add CWE-326 tag to cpp/boost/tls-settings-misconfiguration.
geoffw0 Dec 2, 2021
eccba57
C++: Add CWE-327 tag to cpp/boost/use-of-deprecated-hardcoded-securit…
geoffw0 Dec 2, 2021
f190d60
C#: Make it possible to describe flow for properties using their back…
michaelnebel Dec 2, 2021
f6c36b4
C#: Include test case for override of property.
michaelnebel Dec 2, 2021
3043ac8
C++: Update security-severity tags.
geoffw0 Dec 2, 2021
2b349b3
Merge pull request #7295 from geoffw0/cwe260
geoffw0 Dec 2, 2021
102b5e0
Merge pull request #7290 from michaelnebel/csharp-modify-flow-summari…
michaelnebel Dec 2, 2021
19c34be
Merge pull request #7297 from michaelnebel/csharp-accessor-flow
michaelnebel Dec 2, 2021
976faf9
Ruby: remove redundant closure
nickrolfe Dec 2, 2021
991d659
Ruby: use unwrap_or_else to construct object only when needed
nickrolfe Dec 2, 2021
f2800ab
Merge pull request #7299 from github/nickrolfe/clippy_fixes
aibaars Dec 2, 2021
cd78843
JS: Fix compilation errors in EndpointFeatures library
adityasharad Dec 3, 2021
a9189cb
JS: Performance optimisation for matching framework libraries with th…
adityasharad Dec 3, 2021
c118e16
nop
Z80coder Dec 9, 2021
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.
22 changes: 16 additions & 6 deletions .codeqlmanifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{ "provide": [ "*/ql/src/qlpack.yml",
"*/ql/test/qlpack.yml",
"*/ql/examples/qlpack.yml",
"*/upgrades/qlpack.yml",
"misc/legacy-support/*/qlpack.yml",
"misc/suite-helpers/qlpack.yml" ] }
{
"provide": [
"*/ql/src/qlpack.yml",
"*/ql/lib/qlpack.yml",
"*/ql/test/qlpack.yml",
"*/ql/examples/qlpack.yml",
"*/upgrades/qlpack.yml",
"cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/qlpack.yml",
"javascript/ql/experimental/adaptivethreatmodeling/lib/qlpack.yml",
"javascript/ql/experimental/adaptivethreatmodeling/src/qlpack.yml",
"misc/legacy-support/*/qlpack.yml",
"misc/suite-helpers/qlpack.yml",
"ruby/ql/consistency-queries/qlpack.yml",
"ruby/extractor-pack/codeql-extractor.yml"
]
}
7 changes: 6 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"extensions": [
"rust-lang.rust",
"bungcip.better-toml",
"github.vscode-codeql",
"slevesque.vscode-zipexplorer"
],
"settings": {
"codeQL.experimentalBqrsParsing": true
"files.watcherExclude": {
"**/target/**": true
},
"codeQL.runningQueries.memory": 2048
}
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@
*.gif -text
*.dll -text
*.pdb -text

java/ql/test/stubs/**/*.java linguist-generated=true
java/ql/test/experimental/stubs/**/*.java linguist-generated=true
14 changes: 14 additions & 0 deletions .github/actions/fetch-codeql/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Fetch CodeQL
description: Fetches the latest version of CodeQL
runs:
using: composite
steps:
- name: Fetch CodeQL
shell: bash
run: |
LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
unzip -q -d "${RUNNER_TEMP}" codeql-linux64.zip
echo "${RUNNER_TEMP}/codeql" >> "${GITHUB_PATH}"
env:
GITHUB_TOKEN: ${{ github.token }}
2 changes: 2 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ paths-ignore:
- '/cpp/'
- '/java/'
- '/python/'
- '/javascript/ql/test'
- '/javascript/extractor/tests'
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "ruby/node-types"
schedule:
interval: "daily"
- package-ecosystem: "cargo"
directory: "ruby/generator"
schedule:
interval: "daily"
- package-ecosystem: "cargo"
directory: "ruby/extractor"
schedule:
interval: "daily"
- package-ecosystem: "cargo"
directory: "ruby/autobuilder"
schedule:
interval: "daily"
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Python:
- python/**/*
- change-notes/**/*python*

Ruby:
- ruby/**/*
- change-notes/**/*ruby*

documentation:
- "**/*.qhelp"
- "**/*.md"
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/check-change-note.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check change note

on:
pull_request_target:
types: [labeled, unlabeled, opened, synchronize, reopened, ready_for_review]
paths:
- "*/ql/src/**/*.ql"
- "*/ql/src/**/*.qll"
- "!**/experimental/**"

jobs:
check-change-note:
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
30 changes: 30 additions & 0 deletions .github/workflows/close-stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Mark stale issues

on:
workflow_dispatch:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
if: github.repository == 'github/codeql'

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Comment or remove the `Stale` label in order to avoid having this issue closed in 7 days.'
close-issue-message: 'This issue was closed because it has been inactive for 7 days.'
days-before-stale: 14
days-before-close: 7
only-labels: awaiting-response

# do not mark PRs as stale
days-before-pr-stale: -1
days-before-pr-close: -1

# Uncomment for dry-run
# debug-only: true
# operations-per-run: 1000
39 changes: 22 additions & 17 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ name: "Code scanning - action"

on:
push:
branches:
- main
- 'rc/*'
pull_request:
branches:
- main
- 'rc/*'
paths:
- 'csharp/**'
- '.github/codeql/**'
- '.github/workflows/codeql-analysis.yml'
schedule:
- cron: '0 9 * * 1'

Expand All @@ -11,31 +21,27 @@ jobs:

runs-on: ubuntu-latest

permissions:
contents: read
security-events: write
pull-requests: read

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}


# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@main
# Override language selection by uncommenting this and choosing your languages
with:
languages: csharp
config-file: ./.github/codeql/codeql-config.yml

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
#- name: Autobuild
# uses: github/codeql-action/autobuild@main

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -44,9 +50,8 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
- run: |
dotnet build csharp

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@main
99 changes: 99 additions & 0 deletions .github/workflows/csv-coverage-pr-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Check framework coverage changes

on:
pull_request:
paths:
- '.github/workflows/csv-coverage-pr-comment.yml'
- '*/ql/src/**/*.ql'
- '*/ql/src/**/*.qll'
- '*/ql/lib/**/*.ql'
- '*/ql/lib/**/*.qll'
- 'misc/scripts/library-coverage/*.py'
# input data files
- '*/documentation/library-coverage/cwe-sink.csv'
- '*/documentation/library-coverage/frameworks.csv'
branches:
- main
- 'rc/*'

jobs:
generate:
name: Generate framework coverage artifacts

runs-on: ubuntu-latest

steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
run: echo "$GITHUB_CONTEXT"
- name: Clone self (github/codeql) - MERGE
uses: actions/checkout@v2
with:
path: merge
- name: Clone self (github/codeql) - BASE
uses: actions/checkout@v2
with:
fetch-depth: 2
path: base
- run: |
git checkout HEAD^1
git log -1 --format='%H'
working-directory: base
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Download CodeQL CLI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download --repo "github/codeql-cli-binaries" --pattern "codeql-linux64.zip"
- name: Unzip CodeQL CLI
run: unzip -d codeql-cli codeql-linux64.zip
- name: Generate CSV files on merge commit of the PR
run: |
echo "Running generator on merge"
PATH="$PATH:codeql-cli/codeql" python merge/misc/scripts/library-coverage/generate-report.py ci merge merge
mkdir out_merge
cp framework-coverage-*.csv out_merge/
cp framework-coverage-*.rst out_merge/
- name: Generate CSV files on base commit of the PR
run: |
echo "Running generator on base"
PATH="$PATH:codeql-cli/codeql" python base/misc/scripts/library-coverage/generate-report.py ci base base
mkdir out_base
cp framework-coverage-*.csv out_base/
cp framework-coverage-*.rst out_base/
- name: Generate diff of coverage reports
run: |
python base/misc/scripts/library-coverage/compare-folders.py out_base out_merge comparison.md
- name: Upload CSV package list
uses: actions/upload-artifact@v2
with:
name: csv-framework-coverage-merge
path: |
out_merge/framework-coverage-*.csv
out_merge/framework-coverage-*.rst
- name: Upload CSV package list
uses: actions/upload-artifact@v2
with:
name: csv-framework-coverage-base
path: |
out_base/framework-coverage-*.csv
out_base/framework-coverage-*.rst
- name: Upload comparison results
uses: actions/upload-artifact@v2
with:
name: comparison
path: |
comparison.md
- name: Save PR number
run: |
mkdir -p pr
echo ${{ github.event.pull_request.number }} > pr/NR
- name: Upload PR number
uses: actions/upload-artifact@v2
with:
name: pr
path: pr/
34 changes: 34 additions & 0 deletions .github/workflows/csv-coverage-pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Comment on PR with framework coverage changes

on:
workflow_run:
workflows: ["Check framework coverage changes"]
types:
- completed

jobs:
check:
name: Check framework coverage differences and comment
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJSON(github.event) }}
run: echo "$GITHUB_CONTEXT"
- name: Clone self (github/codeql)
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Check coverage difference file and comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_ID: ${{ github.event.workflow_run.id }}
run: |
python misc/scripts/library-coverage/comment-pr.py "$GITHUB_REPOSITORY" "$RUN_ID"
Loading