Skip to content

Commit 4e236ee

Browse files
committed
Add custom scan list
1 parent b8dcaeb commit 4e236ee

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/action_scanning.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ on:
77
- '.github/workflows/**/*.yaml'
88
- '.github/actions/**/*.yml'
99
- '.github/actions/**/*.yaml'
10+
env:
11+
ACTIONS_SUITE_CONTENT: |
12+
- qlpack: codeql/actions-queries
13+
- include:
14+
id: actions/envvar-injection/critical
15+
- include:
16+
id: actions/envpath-injection/critical
17+
- include:
18+
id: actions/cache-poisoning/poisonable-step
19+
- include:
20+
id: actions/artifact-poisoning/critical
21+
- include:
22+
id: actions/untrusted-checkout/critical
23+
- include:
24+
id: actions/untrusted-checkout/high
1025
1126
permissions:
1227
contents: 'read'
@@ -31,12 +46,22 @@ jobs:
3146
else
3247
echo "workflow_files_found=false" >> "$GITHUB_OUTPUT"
3348
fi
49+
50+
- name: 'Create CodeQL Query Suite'
51+
if: "steps.check_files.outputs.workflow_files_found == 'true'"
52+
run: 'echo "${{ env.ACTIONS_SUITE_CONTENT }}" > actions-suite.qls'
53+
3454
- name: 'Initialize CodeQL'
3555
if: "steps.check_files.outputs.workflow_files_found == 'true'"
3656
uses: 'google/codeql-action/init@014f16e7ab1402f30e7c3329d33797e7948572db' # ratchet:google/codeql-action/init@v4
3757
with:
3858
languages: 'actions'
39-
queries: 'security-extended'
59+
config: |
60+
name: 'Custom Action Scan'
61+
disable-default-queries: true
62+
queries:
63+
- uses: ./actions-suite.qls
64+
4065
- name: 'Perform CodeQL Analysis'
4166
if: "steps.check_files.outputs.workflow_files_found == 'true'"
4267
id: 'codeql_analysis'

0 commit comments

Comments
 (0)