Merge pull request #260 from copenhagentruckwash/fix-unpinned-github-actions-vulnerability

Harden Qodana workflow permissions and pin checkout action
This commit is contained in:
Jeppe B
2026-06-02 00:17:44 +02:00
committed by GitHub
+2 -1
View File
@@ -16,10 +16,11 @@ jobs:
pull-requests: read pull-requests: read
checks: read checks: read
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
ref: ${{ github.event.pull_request.head.sha || github.sha }} # Use PR head when available, otherwise the pushed SHA. ref: ${{ github.event.pull_request.head.sha || github.sha }} # Use PR head when available, otherwise the pushed SHA.
fetch-depth: 0 # a full history is required for pull request analysis fetch-depth: 0 # a full history is required for pull request analysis
persist-credentials: false
- name: Mark repository as safe for Git - name: Mark repository as safe for Git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Prepare Qodana cache directories - name: Prepare Qodana cache directories