-
Notifications
You must be signed in to change notification settings - Fork 45
Security: pin GitHub Actions to SHA hashes #2619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,11 +9,11 @@ jobs: | |||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||
|
|
||||||
| - name: Check for broken links | ||||||
| id: lychee | ||||||
| uses: lycheeverse/lychee-action@v2 | ||||||
| uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2 | ||||||
| with: | ||||||
| args: --verbose ./docs/**/*.md ./submodules/chart/docs/**/*.md | ||||||
| jobSummary: true | ||||||
|
|
@@ -22,7 +22,7 @@ jobs: | |||||
|
|
||||||
| - name: Create issue | ||||||
| if: env.lychee_exit_code != 0 | ||||||
| uses: peter-evans/create-issue-from-file@v5 | ||||||
| uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5 | ||||||
| with: | ||||||
| title: Broken link report | ||||||
| content-filepath: ./lychee/out.md | ||||||
|
|
@@ -34,10 +34,10 @@ jobs: | |||||
| OUTPUT_FILE: ${{ github.workspace }}/supported-tools-report.txt | ||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||
|
|
||||||
| - name: Set up Python | ||||||
| uses: actions/setup-python@v5 | ||||||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||||||
| with: | ||||||
| python-version: "3.x" | ||||||
| cache: "pip" | ||||||
|
|
@@ -52,7 +52,7 @@ jobs: | |||||
| python ./check-supported-tools.py > ${{ env.OUTPUT_FILE }} | ||||||
|
|
||||||
| - name: Create issue | ||||||
| uses: peter-evans/create-issue-from-file@v5 | ||||||
| uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5 | ||||||
| if: ${{ failure() }} | ||||||
| with: | ||||||
| title: Missing supported tools report | ||||||
|
|
@@ -65,10 +65,10 @@ jobs: | |||||
| OUTPUT_FILE: ${{ github.workspace }}/security-tools-report.txt | ||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||
|
|
||||||
| - name: Set up Python | ||||||
| uses: actions/setup-python@v5 | ||||||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||||||
| with: | ||||||
| python-version: "3.x" | ||||||
| cache: "pip" | ||||||
|
|
@@ -83,7 +83,7 @@ jobs: | |||||
| python ./check-security-tools.py > ${{ env.OUTPUT_FILE }} | ||||||
|
|
||||||
| - name: Create issue | ||||||
| uses: peter-evans/create-issue-from-file@v5 | ||||||
| uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5 | ||||||
| if: ${{ failure() }} | ||||||
| with: | ||||||
| title: Missing security tools report | ||||||
|
|
@@ -94,19 +94,19 @@ jobs: | |||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||
|
|
||||||
| - name: Compress images | ||||||
| id: calibre | ||||||
| uses: calibreapp/image-actions@main | ||||||
| uses: calibreapp/image-actions@{message:Not Found # main | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 HIGH RISK The 'uses' string contains a corrupted reference '@{message:Not Found # main'. This is invalid YAML and will cause the workflow to fail. Replace the error message with the correct 40-character commit SHA.
Suggested change
|
||||||
| with: | ||||||
| githubToken: ${{ secrets.GITHUB_TOKEN }} | ||||||
| ignorePaths: submodules/** | ||||||
| compressOnly: true | ||||||
|
|
||||||
| - name: Create pull request | ||||||
| if: steps.calibre.outputs.markdown != '' | ||||||
| uses: peter-evans/create-pull-request@v7 | ||||||
| uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7 | ||||||
| with: | ||||||
| title: "clean: Compress images" | ||||||
| branch-suffix: timestamp | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -8,13 +8,13 @@ jobs: | |||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||
| with: | ||||||
| token: ${{ secrets.GITHUB_TOKEN }} | ||||||
| submodules: false | ||||||
|
|
||||||
| - name: Vale | ||||||
| uses: errata-ai/vale-action@reviewdog | ||||||
| uses: errata-ai/vale-action@{message:Not Found # reviewdog | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 HIGH RISK The 'uses' string is malformed with an '@{message:Not Found' error. This indicates the pinning tool failed to resolve the 'reviewdog' reference. This must be corrected to a valid SHA to prevent workflow execution failure.
Suggested change
|
||||||
| with: | ||||||
| filter_mode: added | ||||||
| debug: true | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 MEDIUM RISK
Suggestion: The version comment '# v6' is incorrect as v6 of 'actions/checkout' does not exist (v4 is the current major version). Furthermore, the SHA used here (de0fac2...) is inconsistent with the v4 SHA (34e1148...) used elsewhere in this PR. Standardizing these references improves maintainability.