Skip to content

Commit 3951135

Browse files
author
Simon Engledew
committed
Expand readme to include codeql-path output example
1 parent f1e2256 commit 3951135

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717
- uses: ./init
18+
id: init
1819
with:
1920
languages: javascript
2021
config-file: ./.github/codeql/codeql-config.yml
22+
- run: ${{steps.init.outputs.codeql-path}} version --format=json
2123
- uses: ./analyze

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,23 @@ By default, this will override any queries specified in a config file. If you wi
125125
queries: +<local-or-remote-query>,<another-query>
126126
```
127127

128-
### CodeQL Path
128+
### Calling CodeQL Directly
129129

130130
The `init` action makes the path to CodeQL available as the output `codeql-path`.
131131

132+
With this you can access the `codeql` binary:
133+
134+
```yaml
135+
- name: Initialize CodeQL
136+
uses: github/codeql-action/init@v1
137+
id: init
138+
with:
139+
languages: javascript
140+
141+
- name: Print CodeQL Version
142+
run: ${{steps.init.outputs.codeql-path}} version --format=json
143+
```
144+
132145
## Troubleshooting
133146

134147
Read about [troubleshooting code scanning](https://help.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning).

0 commit comments

Comments
 (0)