Skip to content

Commit 4359995

Browse files
authored
Avoids 3rd party actions and modify code scanning paths (#125)
* edited codeql config to include all files extensions in the DB and exclude node_modules * replace third party action sergeysova/jq-action with a one-liner script * renamed the cap log-injection tests so that alerts are recreated * update javascript.sarif.expected file
1 parent fb70faa commit 4359995

File tree

3 files changed

+8824
-6081
lines changed

3 files changed

+8824
-6081
lines changed

.github/workflows/code_scanning.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ on:
1212

1313
env:
1414
LGTM_INDEX_XML_MODE: all
15+
LGTM_INDEX_FILETYPES: ".json:JSON"
1516

1617
jobs:
17-
analyze:
18+
analyze-javascript:
1819
name: Analyze
1920
runs-on: 'ubuntu-latest'
2021
permissions:
@@ -54,19 +55,16 @@ jobs:
5455
-o "$cds_file.json"
5556
done
5657
57-
# Initializes the CodeQL tools for scanning.
58-
- name: Extract version from qlt.conf.json
59-
uses: sergeysova/jq-action@v2
60-
id: version
61-
with:
62-
cmd: 'jq .CodeQLCLIBundle qlt.conf.json -r'
58+
- name: Extract CodeQL bundle version from qlt.conf.json
59+
run: |
60+
echo "BUNDLE_VERSION=$(jq .CodeQLCLIBundle qlt.conf.json -r)" >> $GITHUB_ENV
6361
6462
- name: Initialize CodeQL
6563
uses: github/codeql-action/init@v3
6664
with:
6765
languages: javascript
6866
config-file: ./.github/codeql/codeql-config.yaml
69-
tools: https://github.com/github/codeql-action/releases/download/${{steps.version.outputs.value}}/codeql-bundle-linux64.tar.gz
67+
tools: https://github.com/github/codeql-action/releases/download/${{env.BUNDLE_VERSION}}/codeql-bundle-linux64.tar.gz
7068
debug: true
7169

7270
- name: Perform CodeQL Analysis

0 commit comments

Comments
 (0)