Skip to content

Commit ec67df3

Browse files
Merge branch 'main' into robertbrignull/set-modeled-and-modified-methods
2 parents 5ce09e6 + 6e61ddb commit ec67df3

File tree

52 files changed

+1078
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1078
-644
lines changed
10.2 KB
Loading

docs/test-plan.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,48 @@ Run one of the above MRVAs, but cancel it from within VS Code:
145145
- Check that the workflow run is also canceled.
146146
- Check that any available results are visible in VS Code.
147147

148+
#### Test Case 6: Using model packs in MRVA
149+
150+
1. Create a model pack with mock data
151+
1. Create a new directory `test-model-pack`
152+
2. Create a `qlpack.yml` file in that directory with the following contents:
153+
154+
```yaml
155+
name: github/test-model-pack
156+
version: 0.0.0
157+
library: true
158+
extensionTargets:
159+
codeql/python-all: '*'
160+
dataExtensions:
161+
- extension.yml
162+
```
163+
164+
3. Create an `extension.yml` in the same directory with the following contents:
165+
166+
```yaml
167+
extensions:
168+
- addsTo:
169+
pack: codeql/python-all
170+
extensible: sinkModel
171+
data:
172+
- ["vscode-codeql","Member[initialize].Argument[0]","code-injection"]
173+
```
174+
175+
2. In a Python query pack, create the following query (e.g. `sinks.ql`):
176+
177+
```ql
178+
import python
179+
import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions
180+
181+
from string path, string kind
182+
where sinkModel("vscode-codeql", path, kind)
183+
select path, kind
184+
```
185+
186+
3. Run a MRVA against a Python repository (e.g. `psf/requests`) with this query.
187+
4. Check that the results view contains 1 result with the values corresponding to the `extension.yml` file:
188+
![Model packs results table for `psf/requests`](images/model-pack-results-table.png)
189+
148190
### CodeQL Model Editor
149191

150192
#### Test Case 1: Opening the model editor

extensions/ql-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [UNRELEASED]
44

55
- Remove support for CodeQL CLI versions older than 2.13.5. [#3371](https://github.com/github/vscode-codeql/pull/3371)
6+
- Add a timeout to downloading databases and the CodeQL CLI. These can be changed using the `codeQL.addingDatabases.downloadTimeout` and `codeQL.cli.downloadTimeout` settings respectively. [#3373](https://github.com/github/vscode-codeql/pull/3373)
67

78
## 1.12.2 - 14 February 2024
89

extensions/ql-vscode/package-lock.json

Lines changed: 69 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)