Skip to content

Commit 57942fe

Browse files
author
Alvaro Muñoz
authored
Merge pull request #18 from GitHubSecurityLab/jorgectf-patch-2
Add getting started
2 parents d9b0b67 + 85ae4c8 commit 57942fe

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
11
# Community Packs
22

33
Collection of community-driven CodeQL query and extension packs
4+
5+
## Getting started
6+
7+
### Default query suites
8+
9+
Using a `githubsecuritylab/codeql-LANG-queries` query pack will reference the default suite for that pack (e.g. `python.qls` for python). However, you may use a different suite such as `python-audit.qls` by referencing the query pack with the following syntax: `githubsecuritylab/codeql-python-queries:suites/python-audit.qls`. The examples below work for both syntaxes.
10+
11+
### Using a community pack from the CodeQL Action
12+
13+
```yaml
14+
- name: Initialize CodeQL
15+
uses: github/codeql-action/init@v2
16+
with:
17+
languages: ${{ matrix.language }}
18+
packs: githubsecuritylab/codeql-${{ matrix.language }}-queries
19+
```
20+
21+
### Using a community pack from the CLI configuration file
22+
23+
```bash
24+
$ cat codeql-config.yml | grep -A 1 'packs:'
25+
packs:
26+
- githubsecuritylab/codeql-python-queries
27+
```
28+
29+
### Using a community pack from the CodeQL CLI
30+
31+
```bash
32+
codeql database analyze db/ --download githubsecuritylab/codeql-python-queries --format=sarif-latest --output=results.sarif
33+
```

0 commit comments

Comments
 (0)