Commit Graph

84550 Commits

Author SHA1 Message Date
Tamas Vajk
c68d36eb79 Remove restored framework packages when user specified framework folders 2024-02-16 14:42:39 +01:00
Alvaro Muñoz
13c5ec07b4 fix(actions): ql pack installation 2024-02-16 14:41:47 +01:00
Alvaro Muñoz
b3bab160d2 fix(actions): ql pack installation 2024-02-16 14:41:21 +01:00
Ian Lynagh
d6b96c5c23 Kotlin 2: Accept loc changes in library-tests/stmts/stmts.expected 2024-02-16 13:40:44 +00:00
Alvaro Muñoz
41639dd0e2 fix(actions): ql pack installation 2024-02-16 14:37:43 +01:00
Alvaro Muñoz
b11d8dad49 fix(actions): ql pack installation 2024-02-16 14:31:07 +01:00
Alvaro Muñoz
04a2ae9ad3 fix(actions): ql pack installation 2024-02-16 14:29:03 +01:00
Alvaro Muñoz
a94793fc09 fix(actions): pass the qlpack dirs 2024-02-16 14:14:53 +01:00
Alvaro Muñoz
e9f3006204 fix(actions): pass the qlpack dirs 2024-02-16 14:10:52 +01:00
Alvaro Muñoz
c58c4e0d54 feat(actions): refactor as composite action to be able to pass env vars 2024-02-16 14:06:46 +01:00
Anders Schack-Mulligen
53801e8efb Dataflow: Bugfix for field reads in SimpleGlobal. 2024-02-16 14:00:04 +01:00
Alvaro Muñoz
e2699c31f8 feat(action): clone and install local packs 2024-02-16 13:56:58 +01:00
Mathias Vorreiter Pedersen
b407c86d03 C++: Make Code Scanning happy. 2024-02-16 13:51:34 +01:00
Mathias Vorreiter Pedersen
57c1bf5835 C++: Add file-level QLDoc. 2024-02-16 13:47:02 +01:00
Mathias Vorreiter Pedersen
497592a4d4 C++: Add change note. 2024-02-16 13:36:25 +01:00
Tamas Vajk
ce0159c005 Add dotnet core dependencies to the integration test 2024-02-16 13:35:18 +01:00
Alvaro Muñoz
959a974c8b feat(action): clone pack (not use the registry) 2024-02-16 13:32:05 +01:00
Geoffrey White
e187a4a7d6 C++: Add flow summaries to simpleLocalFlowStep. 2024-02-16 12:31:17 +00:00
Tamas Vajk
7e912f0de0 Rename integration test 2024-02-16 13:31:08 +01:00
Mathias Vorreiter Pedersen
9b2019db6b C++: Accept test changes. 2024-02-16 13:10:41 +01:00
Mathias Vorreiter Pedersen
499ab0892f C++: Currently, to catch flow in an example such as:
```cpp
char* source();
void sink(const char*);
int sprintf(char *, const char *, ...);

void call_sprintf(char* path, char* data) {
        sprintf(path, "%s", "abc"); // (1)
        sprintf(path, "%s", data); // (2)
}

void foo() {
        char path[10];
        call_sprintf(path, source()); // (3)
        sink(path);
}
```
we identify that the `*path [post update]` node at `// (2)` is a
`ReturnNodeExt` and since `*data` flows to that node flow will be carried
out to `*path [post update]` at // (3) and thus reach `sink(path)`.

The reason `*path [post update]` at `// 2` is recognized as a `ReturnNodeExt`
is because it satisfies the following condition (which is identified by the
shared dataflow library):
There is flow from the parameter node `*path` to the pre-update node of the
post-update node `*path [post update]` at `// (2)`.

However, when we start recognizing that the call to `sprintf(path, ...)` at
`// (1)` overrides the value of `*path` and no longer provide use-use flow out
of `*path` the `*path [post update]` node at `// (2)` is no longer recognized
as a `ReturnNodeExt` (because it doesn't satisfy the above criteria).

Thus, we need to identify the flow above without relying on the dataflow
library's summary mechanism. That is, instead of relying on the dataflow
library's mechanism to summarize the `*data -> *path` flow for `call_sprintf`
we need to:
- Ensure that the write to `*path` at `// (2)` is recognized as the "final"
write to the parameter, and
- Ensure that there's flow out of that parameter and back to
`*path [post update]` at `// (3)`.

Luckiky, we do all of this already to support flow out of writes to parameters
that don't have post-update nodes. For example, in something like:
```cpp
void set(int* x, int y) {
  *x = y;
}

void test() {
  int x;
  set(&x, source());
  sink(x);
}
```
So in order to make the original example work, all we need to do is to remove
the restrictions on this mechanism so that the same mechanism that makes the
above example work also makes the original example work!
2024-02-16 13:09:45 +01:00
Joe Farebrother
9ad05fe51c Address reveiws - Add BAD example to doc, add doc example to tests and fix typo. 2024-02-16 12:00:51 +00:00
Mathias Vorreiter Pedersen
7e9bf2a880 C++: Add a model for 'partial updating' and extend models appropriately. 2024-02-16 12:56:19 +01:00
Mathias Vorreiter Pedersen
24a63ae94d C++: Block flow by default. 2024-02-16 12:56:19 +01:00
Mathias Vorreiter Pedersen
625c47fa9c C++: Add a testcase. 2024-02-16 12:56:19 +01:00
Alvaro Muñoz
5d1264d3a4 feat(action): update references to qlpacks 2024-02-16 12:56:06 +01:00
Tamas Vajk
1e75c73825 Fix failing integration test 2024-02-16 12:50:13 +01:00
Alvaro Muñoz
cf4ab41df2 feat(action): rename qlpacks to use githubsecuritylab prefix 2024-02-16 12:32:48 +01:00
Alvaro Muñoz
0105d63a44 Add Action to scan repos 2024-02-16 12:25:23 +01:00
Tamas Vajk
f8b29ad70e Introduce environment variable to specify framework assembly locations 2024-02-16 11:54:19 +01:00
Anders Schack-Mulligen
03f7968dbf Dataflow: Fix flow-feature bug. 2024-02-16 11:38:30 +01:00
Angela P Wen
4291c75488 Merge pull request #15631 from github/angelapwen/extend-permissions
Add `security-events: write` permission in `ql-for-ql-build.yml`
2024-02-16 02:28:30 -08:00
Anders Schack-Mulligen
ba1a0bc320 Java: Add test highlighting problem. 2024-02-16 11:25:33 +01:00
Angela P Wen
c75111619e Add security-events: write permission 2024-02-16 02:17:17 -08:00
Tamas Vajk
d358f8e4f2 Move undocumented environment variable names to a common location 2024-02-16 11:15:53 +01:00
Tamas Vajk
b996f7b3ce Change environment variable for opt-out web view extraction 2024-02-16 11:15:53 +01:00
Tamas Vajk
8f0f6963bb Change desktop dotnet assembly lookup to fall back to nuget reference assemblies 2024-02-16 11:15:53 +01:00
Tamas Vajk
04f0fb0483 Add integration test with mono assemblies as references 2024-02-16 11:15:52 +01:00
Cornelius Riemenschneider
4e022e2098 Merge pull request #15627 from github/criemen/java-test
Move the JS java tests to be a proper `java_test` target.
2024-02-16 11:15:18 +01:00
Erik Krogh Kristensen
037e64a4b5 Merge pull request #15623 from erik-krogh/cs-url
C#: update the QHelp for `cs/web/unvalidated-url-redirection`
2024-02-16 11:12:22 +01:00
Óscar San José
d46157135a Merge pull request #15630 from tamasvajk/fix/change-coverage-updater-permissions
Extend permissions in `csv-coverage-update.yml`
2024-02-16 10:58:24 +01:00
Tamas Vajk
89384bb855 Extend permissions in csv-coverage-update.yml 2024-02-16 10:19:16 +01:00
Mathias Vorreiter Pedersen
c19ed4c17e Merge pull request #15626 from MathiasVP/fix-constness-checking
C++: Don't strip specifiers away in `TFinalParameterUse`
2024-02-16 10:09:43 +01:00
Max Schaefer
a95f4128d9 Merge pull request #15554 from github/max-schaefer/automodel-candidate-fixes
Automodel: Improve handling of varargs and overriding in extraction queries
2024-02-16 08:51:54 +00:00
Benjamin Rodes
d6b0746b30 The non-constant format query is now a path query. Minor changes to the output alert to be more precise on what is being alerted. Minor changes to the query itself to avoid redundancies with argv. 2024-02-15 12:14:52 -05:00
Ian Lynagh
c6f4a204e9 Merge pull request #15616 from igfoo/igfoo/kt2-exprs
Kotlin 2: Accept more location changes
2024-02-15 16:49:28 +00:00
Jeroen Ketema
da3ff4813f Merge pull request #15612 from jketema/destructors4a
C++: Support `constexpr if` in the IR
2024-02-15 17:29:56 +01:00
Max Schaefer
652b6bb8e1 Fix bugs revealed by omittable exists variables. 2024-02-15 16:29:20 +00:00
Max Schaefer
8d4a344d47 Merge pull request #15592 from github/max-schaefer/rephrase-negative-characteristics
Automodel: Make description of some negative characteristics more explicit.
2024-02-15 16:20:17 +00:00
Michael B. Gale
4d28c0d2a9 Go: Call go mod vendor to synchronise vendor directory when it exists 2024-02-15 16:19:07 +00:00