Skip to content

Commit 0161ecd

Browse files
mrjfCopilot
andcommitted
Exclude auto-generated lock files from CodeQL actions analysis
The crane.lock.yml is generated by 'gh aw compile' and contains patterns (issue_comment trigger + checkout) that CodeQL flags as 'checkout of untrusted code in trusted context'. The lock file includes branch validation but CodeQL cannot see through the generated structure. Exclude *.lock.yml from scanning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2b925e4 commit 0161ecd

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/codeql/codeql-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: "CodeQL configuration"
2+
3+
paths-ignore:
4+
# Auto-generated lock files from gh-aw compile
5+
- ".github/workflows/*.lock.yml"

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
uses: github/codeql-action/init@v4
3131
with:
3232
languages: ${{ matrix.language }}
33+
config-file: ./.github/codeql/codeql-config.yml
3334

3435
- name: Perform CodeQL Analysis
3536
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)