Commit Graph

85368 Commits

Author SHA1 Message Date
Ian Roof
1d81c77fcd C#: Enhanced LogForgingQuery to treat C# Enums as simple types. 2025-04-02 09:40:10 +02:00
yoff
c18529086a actions: add change note 2025-04-02 08:50:05 +02:00
yoff
7bf4a47549 Apply suggestions from code review
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
2025-04-02 08:43:29 +02:00
Michael Nebel
45b55c05ae Merge pull request #19191 from github/workflow/coverage/update
Update CSV framework coverage reports
2025-04-02 08:02:39 +02:00
Aditya Sharad
3b8c4d970f Docs: Remove spurious predicate reference 2025-04-01 19:07:34 -07:00
Aditya Sharad
9db5cdf957 Docs: Add query help page placeholders for Actions 2025-04-01 19:03:59 -07:00
Aditya Sharad
a1ceaa0aa3 Docs: Add initial library docs for Actions
Create the basic structure, state the key importable libraries.
Describe a workflow.
State the extensible predicates available.
Other elements are to be filled in later.
2025-04-01 19:02:49 -07:00
github-actions[bot]
f379f23216 Add changed framework coverage reports 2025-04-02 00:22:37 +00:00
Aditya Sharad
f6442d20db Docs: Add Actions pages for CWE coverage 2025-04-01 17:09:03 -07:00
Aditya Sharad
09de7cfe4d Docs: Add GitHub Actions as a supported language
Include GitHub Actions (identifier `actions`) everywhere we list
supported languages, query packs, and library packs.

Query and library documentation link targets do not exist yet.
2025-04-01 17:01:47 -07:00
Jon Janego
74587f0d64 Update ExprHasNoEffect.ql
adding quality tags per metadata styleguide
2025-04-01 18:47:52 -05:00
Jon Janego
fa02f82ef6 Updating the metadata style guide
Update query-metadata-style-guide.md
2025-04-01 15:50:23 -05:00
Jon Janego
dcdc3b8939 Merge branch 'main' into jonjanego-patch-1 2025-04-01 15:42:51 -05:00
Jon Janego
00bb9056c2 Update query-metadata-style-guide.md 2025-04-01 15:42:36 -05:00
Jami Cogswell
1a2c34dd28 Java: update qhelp implementation notes for clarity 2025-04-01 16:24:13 -04:00
REDMOND\brodes
ac96649a02 Misc. modifications to support elliptic curves and hooking them up to keygeneration. 2025-04-01 16:15:49 -04:00
Jami
c4b8396333 fix typo in query description
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2025-04-01 15:52:57 -04:00
Jami Cogswell
e621f9fd49 Java: update comments in tests 2025-04-01 15:48:52 -04:00
Jami Cogswell
faeb7ab890 Java: add blank lines to qldocs 2025-04-01 14:54:46 -04:00
Geoffrey White
1d7dac485e Rust: switch the query to taint flow so that we get taint through conversions (without needing a special case). 2025-04-01 17:57:04 +01:00
Chris Smowton
3c555fce11 Add basic test for SQL injection vs Jakarta Persistence 2025-04-01 17:13:23 +01:00
Chris Smowton
5d37ccfa90 Change note 2025-04-01 16:51:29 +01:00
Chris Smowton
20839745bd Remove redundant import 2025-04-01 16:49:56 +01:00
Asger F
887942e3e9 Merge pull request #19108 from asgerf/js/api-graph-spread-rest
JS: Handle spread/rest in API graphs
2025-04-01 17:48:36 +02:00
Taus
aacdc70a73 Merge pull request #19136 from github/tausbn/python-modernise-mixed-tuple-returns-query
Python: Modernize `py/mixed-tuple-returns`
2025-04-01 17:31:56 +02:00
Chris Smowton
50119ae481 Update docs 2025-04-01 16:20:06 +01:00
Chris Smowton
a5a6fd37df Enable recognising jakarta.persistence in dead-code queries 2025-04-01 16:19:42 +01:00
Alex Eyers-Taylor
0ccbe3ef7f Ruby: Make module graph queries avoid relying on evalaution order. 2025-04-01 16:18:45 +01:00
yoff
80ae8794f5 actions: update test expectations 2025-04-01 17:07:57 +02:00
yoff
d83f35ff64 actions: remove unneded API 2025-04-01 17:07:43 +02:00
Chris Smowton
fb6296a564 Persistence models: recognise jakarta.persistence 2025-04-01 16:07:40 +01:00
yoff
6fd8aba560 actions: simplify using existing UsesStep 2025-04-01 17:07:21 +02:00
yoff
ee1eb199b5 actions: add description of actionsPermissionsDataModel 2025-04-01 17:07:02 +02:00
yoff
bd7c684c6c actions: add test with empty permissions 2025-04-01 17:06:32 +02:00
Taus
8afdf25e9a Actions: Mark helper predicate as noinline. 2025-04-01 14:50:00 +00:00
Asger F
4746cfddf2 JS: Add clarifying comment 2025-04-01 16:26:07 +02:00
Asger F
e1784bb10c JS: Fix handling of spread args on a bound function 2025-04-01 16:20:57 +02:00
Taus
c9fc7882e6 Actions: Fix bad performance in getTargetPath
Seen on `github/codeql`, some queries had very poor performance:
```
 [2/24 eval 36m4s] Evaluation done; writing results to
codeql/actions-queries/Security/CWE-312/ExcessiveSecretsExposure.bqrs
```

Investigating further lead to the following worrying sequence of joins
(after I ran out of patience and cancelled the query):
```
[2025-04-01 12:31:03] Tuple counts for
Yaml::YamlInclude.getTargetPath/0#dispred#32565107#fb#reorder_1_0/2@i6#9f4b2jw1
after 8m40s:
...
    559418    ~33%        {1} r5 = SCAN
`Yaml::YamlNode.getLocation/0#dispred#24555c57#prev_delta` OUTPUT In.1
...
    909345525 ~821%       {3} r7 = JOIN r5 WITH
`Yaml::YamlNode.getLocation/0#dispred#24555c57#prev` CARTESIAN PRODUCT
OUTPUT Rhs.1, Lhs.0 'result', Rhs.0
    909342139 ~779%       {3}    | JOIN WITH
`Locations::Location.getFile/0#dispred#dcf38c8d#prev` ON FIRST 1 OUTPUT
Rhs.1, Lhs.1 'result', Lhs.2
    909338753 ~794%       {3}    | JOIN WITH containerparent_10#join_rhs
ON FIRST 1 OUTPUT Rhs.1, Lhs.1 'result', Lhs.2
    909335367 ~824%       {3}    | JOIN WITH
`FileSystem::Container.getAbsolutePath/0#dispred#d234e6fa` ON FIRST 1
OUTPUT Lhs.2, Lhs.1 'result', Rhs.1
    883246724 ~812%       {3}    | JOIN WITH
`Yaml::YamlNode.getDocument/0#dispred#ee1eb3bf#bf_10#join_rhs` ON FIRST
1 OUTPUT Rhs.1 'this', Lhs.1 'result', Lhs.2
    760047185 ~838%       {5}    | JOIN WITH yaml_scalars ON FIRST 1
OUTPUT Lhs.1 'result', Lhs.0 'this', Rhs.2, _, Lhs.2
    0         ~0%         {4}    | REWRITE WITH Tmp.3 := "/", Out.3 :=
(In.4 ++ Tmp.3 ++ InOut.2), TEST Out.3 = InOut.0 KEEPING 4
                        {4}    | REWRITE WITH NOT [TEST InOut.2
startsWith "/"]
...
```

The culprit turned out to be the following method on class `YamlInclude`
```ql
private string getTargetPath() {
    exists(string path | path = this.getValue() |
    if path.matches("/%")
    then result = path
    else
        result =

this.getDocument().getLocation().getFile().getParentContainer().getAbsolutePath()
+ "/" +
            path
    )
}
```

Basically, in the `else` branch, the evaluator was producing all
possible values of `result` before filtering out the ones where the
`path` component started with a forward slash.

To fix this, I opted to factor out the logic into two helper predicates,
each accounting for whether `this.getValue()` does or does not start
with a `/`. With this, evaluating the original query from a clean cache
takes roughly 3.3s.
2025-04-01 13:59:19 +00:00
Tom Hvitved
ffb25b7aac Merge pull request #19162 from hvitved/rust/to-string-non-rec
Rust: Make `Element.toString` non-recursive
2025-04-01 15:31:18 +02:00
Anders Schack-Mulligen
e1ef56b8bb Swift: Fix accidental cartesian product. 2025-04-01 15:23:16 +02:00
Óscar San José
9b2eff88a6 restore original port 2025-04-01 15:17:52 +02:00
Arthur Baars
0e23b86bf5 Merge pull request #19182 from github/post-release-prep/codeql-cli-2.21.0
Post-release preparation for codeql-cli-2.21.0
2025-04-01 15:12:29 +02:00
Tom Hvitved
dcaeeabad8 Rust: Fix capturedCallRead 2025-04-01 15:11:20 +02:00
Tom Hvitved
9dea9f5046 SSA: Make phiWithoutTwoPriorRefs consistency check more informative 2025-04-01 15:07:46 +02:00
Tom Hvitved
01810cbac9 Rust: Update PhiDefinition.toString 2025-04-01 14:59:05 +02:00
Marco Gario
2419ccf511 Merge pull request #19183 from github/marcogario-patch-1
Update UntrustedCheckoutCritical.ql
2025-04-01 14:43:37 +02:00
Simon Friis Vindum
8acf9ceef4 Rust: Make trait a base type mention of the self type parameter 2025-04-01 14:04:46 +02:00
Marco Gario
d33ce423d8 Update UntrustedCheckoutCritical.ql 2025-04-01 13:58:37 +02:00
Arthur Baars
68690b4615 Merge pull request #19181 from github/aibaars/rust-delete-cargo-lock
Rust: QLTest: delete Cargo.lock files
2025-04-01 13:57:19 +02:00
yoff
3cdd641b81 actions: fix typo 2025-04-01 13:43:00 +02:00