Skip to content

Commit

Permalink
Specify SARIF path via env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Mar 9, 2023
1 parent 53f80ed commit b36480d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/__config-export.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pr-checks/checks/config-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ steps:
retention-days: 7
- name: Check config properties appear in SARIF
uses: actions/github-script@v6
env:
SARIF_PATH: "${{ runner.temp }}/results/javascript.sarif"
with:
script: |
const fs = require('fs');
const path = require('path');
const sarifFile = path.join('${{ runner.temp }}', 'results', 'javascript.sarif');
const sarif = JSON.parse(fs.readFileSync(sarifFile, 'utf8'));
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));
const run = sarif.runs[0];
const configSummary = run.properties.codeqlConfigSummary;
Expand Down

0 comments on commit b36480d

Please sign in to comment.