Skip to content

Commit 00b67c0

Browse files
authored
Merge pull request #2479 from jku/dont-pin-code-scanner-actions
workflows: Stop pinning actions that are not security relevant
2 parents c7f3f6b + f005825 commit 00b67c0

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@ jobs:
1616
name: Analyze
1717
runs-on: ubuntu-latest
1818
permissions:
19+
# NOTE: If you add security critical permissions, start pinning used actions
1920
actions: read
2021
contents: read
21-
security-events: write
22+
security-events: write # for uploading to code-scanning dashboard
2223

2324
steps:
2425
- name: Checkout repository
2526
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
2627

2728
- name: Initialize CodeQL
28-
uses: github/codeql-action/init@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
29+
uses: github/codeql-action/init@v2 # unpinned since this is not security critical
2930
with:
3031
languages: 'python'
3132

3233
- name: Perform CodeQL Analysis
33-
uses: github/codeql-action/analyze@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
34+
uses: github/codeql-action/analyze@v2 # unpinned since this is not security critical

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ name: 'Dependency Review'
88
on: [pull_request]
99

1010
permissions:
11+
# NOTE: If you add security critical permissions, start pinning used actions
1112
contents: read
1213

1314
jobs:
@@ -17,4 +18,4 @@ jobs:
1718
- name: 'Checkout Repository'
1819
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
1920
- name: 'Dependency Review'
20-
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
21+
uses: actions/dependency-review-action@v3 # unpinned since this is not security critical

.github/workflows/scorecards.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ jobs:
1414
name: Scorecards analysis
1515
runs-on: ubuntu-latest
1616
permissions:
17+
# NOTE: If you add security critical permissions, start pinning used actions
1718
security-events: write # for uploading to code-scanning dashboard
18-
id-token: write # for signing results
19+
id-token: write # for publishing results in scorecard public dataset
1920
actions: read
2021
contents: read
2122

@@ -24,7 +25,7 @@ jobs:
2425
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
2526

2627
- name: "Run analysis"
27-
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0
28+
uses: ossf/scorecard-action@v2 # unpinned since this is not security critical
2829
with:
2930
results_file: results.sarif
3031
# sarif format required by upload-sarif action
@@ -34,6 +35,6 @@ jobs:
3435
publish_results: true
3536

3637
- name: "Upload to code-scanning dashboard"
37-
uses: github/codeql-action/upload-sarif@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
38+
uses: github/codeql-action/upload-sarif@v2 # unpinned since this is not security critical
3839
with:
3940
sarif_file: results.sarif

0 commit comments

Comments
 (0)