-
-
Notifications
You must be signed in to change notification settings - Fork 159
ci(deps): bump actions/cache from 4 to 6 #5614
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 |
|---|---|---|
|
|
@@ -69,7 +69,7 @@ jobs: | |
| # (`sccache-<os>-perry-`). This runs on main, so the saved entry is | ||
| # main-scoped → restorable by every PR. run_id keeps the key unique. | ||
| - name: Cache sccache objects | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@v6 | ||
|
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. 🔒 Security & Privacy | 🟠 Major 🧩 Analysis chain🏁 Script executed: cat -n .github/workflows/cache-warm.yml | head -100Repository: PerryTS/perry Length of output: 5116 🏁 Script executed: rg "actions/cache" --type yaml -B 2 -A 2Repository: PerryTS/perry Length of output: 151 🌐 Web query:
💡 Result: Pinning GitHub Actions to a full-length commit SHA is a critical supply chain security practice that mitigates the risk of malicious code injection via mutable references like tags or branch names [1][2][3]. Why Pinning is Essential GitHub Actions referenced by tags (e.g., Citations:
Pin Using 🧰 Tools🪛 zizmor (1.26.1)[error] 72-72: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| with: | ||
| path: ${{ github.workspace }}/.sccache | ||
| key: sccache-${{ runner.os }}-perry-warm-${{ github.run_id }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,7 +97,7 @@ jobs: | |
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@v6 | ||
|
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. 🔒 Security & Privacy | 🟠 Major 🧩 Analysis chain🏁 Script executed: cat -n .github/workflows/container-tests.yml | sed -n '95,105p;168,178p;209,219p;251,261p'Repository: PerryTS/perry Length of output: 1726 🏁 Script executed: rg 'uses:' .github/workflows/container-tests.ymlRepository: PerryTS/perry Length of output: 703 🌐 Web query:
💡 Result: Pinning GitHub Actions to a full-length commit SHA is the recommended security best practice to prevent supply chain attacks, such as tag-retargeting or repository takeovers [1][2][3]. Key Security Principles: - Immutable References: Git tags are mutable and can be deleted, moved, or re-pushed by an attacker to point to malicious code [4][5]. In contrast, a full 40-character commit SHA is immutable and content-addressed, guaranteeing the exact code you expect runs in your workflow [2][6][3]. - Policy Enforcement: GitHub now supports organization-level policies that allow administrators to enforce SHA pinning across all repositories, causing any non-SHA-pinned action to fail [1][5][3]. - Risk Mitigation: While pinning does not protect against vulnerabilities present within the specific commit you have pinned, it prevents attackers from silently updating an action's behavior without your knowledge [7][8]. Best Practices for Implementation: - Pin to Full SHAs: Always use the full 40-character commit hash [9][4]. Never rely on short SHAs, branches, or tags for third-party actions [4][6]. - Maintain Readability with Comments: When pinning to a SHA, include the human-readable version tag in a trailing comment [7][4][3]. This allows automated tools to correlate the pin with semantic versions [7]. Example: uses: actions/checkout@b4ffde6 # v4.2.1 - Automate Updates: Use dependency management tools like Dependabot or Renovate to keep your pinned SHAs up to date [7][10][3]. Tools like Renovate can be configured with presets (e.g., helpers:pinGitHubActionDigests) to automatically open pull requests that bump the SHA while keeping the version tag comment updated [10][3]. - Strategic Trust: While SHA pinning is critical for third-party actions, some organizations may choose to allow tag-based references for internally developed or highly trusted first-party actions (e.g., those under the github-actions organization) to balance security with operational convenience [2][8][6]. However, mandatory organization-wide SHA pinning is considered the most secure posture [1][5][3]. Citations:
Pin all Lines 100, 173, 214, and 256 use 🧰 Tools🪛 zizmor (1.26.1)[error] 100-100: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [error] 100-100: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default (cache-poisoning) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
|
|
@@ -170,7 +170,7 @@ jobs: | |
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
|
|
@@ -211,7 +211,7 @@ jobs: | |
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
|
|
@@ -253,7 +253,7 @@ jobs: | |
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,7 @@ jobs: | |
| run: rustup target add aarch64-apple-ios-sim aarch64-apple-ios | ||
|
|
||
| - name: Cache cargo | ||
| uses: actions/cache@v5 | ||
| uses: actions/cache@v6 | ||
|
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. 🔒 Security & Privacy | 🟠 Major Pin Version tags like 🧰 Tools🪛 zizmor (1.26.1)[error] 41-41: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [error] 41-41: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default (cache-poisoning) 🤖 Prompt for AI Agents |
||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,7 +150,7 @@ jobs: | |
| # cache from ANY of them. The object cache therefore warms continuously | ||
| # and cross-pollinates instead of starting cold each run. | ||
| - name: Cache sccache objects | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@v6 | ||
|
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. 🔒 Security & Privacy | 🟠 Major 🧩 Analysis chain🏁 Script executed: # First, check if the file exists and get its content around the specified lines
if [ -f .github/workflows/test.yml ]; then
echo "=== File exists ==="
# Get lines around 153
echo "=== Around line 153 ==="
sed -n '150,156p' .github/workflows/test.yml
# Get lines around 264
echo "=== Around line 264 ==="
sed -n '261,267p' .github/workflows/test.yml
# Get lines around 497
echo "=== Around line 497 ==="
sed -n '494,500p' .github/workflows/test.yml
else
echo "File not found"
fiRepository: PerryTS/perry Length of output: 1314 🌐 Web query:
💡 Result: Pinning GitHub Actions to a full-length commit SHA is considered the security gold standard and a critical best practice to mitigate supply chain attacks [1][2][3]. Core Security Differences * Commit SHA (Recommended): A full-length commit SHA is an immutable identifier [2][4]. When you pin to a SHA, your workflow is guaranteed to execute the exact code you have audited, preventing attackers from modifying the logic of an action even if they gain control of the upstream repository or retarget a tag [4][5][6]. * Version Tag (Risky): Tags (e.g., Citations:
Pin Lines 153, 264, and 497 use mutable 🧰 Tools🪛 zizmor (1.26.1)[error] 153-153: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) [error] 153-153: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default (cache-poisoning) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| with: | ||
| path: ${{ github.workspace }}/.sccache | ||
| key: sccache-${{ runner.os }}-perry-${{ github.job }}-${{ github.run_id }} | ||
|
|
@@ -261,7 +261,7 @@ jobs: | |
| # cache from ANY of them. The object cache therefore warms continuously | ||
| # and cross-pollinates instead of starting cold each run. | ||
| - name: Cache sccache objects | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: ${{ github.workspace }}/.sccache | ||
| key: sccache-${{ runner.os }}-perry-${{ github.job }}-${{ github.run_id }} | ||
|
|
@@ -494,7 +494,7 @@ jobs: | |
| # cache from ANY of them. The object cache therefore warms continuously | ||
| # and cross-pollinates instead of starting cold each run. | ||
| - name: Cache sccache objects | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: ${{ github.workspace }}/.sccache | ||
| key: sccache-${{ runner.os }}-perry-${{ github.job }}-${{ github.run_id }} | ||
|
|
||
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.
🔒 Security & Privacy | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 1222
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 1302
Pin
actions/cacheto an immutable commit SHA.Lines 48 and 213 both use the mutable tag
@v6instead of a pinned commit SHA. This leaves the workflow vulnerable to tag-retarget supply-chain attacks. Pin both references to the full 40-character commit SHA:2c8a9bd7457de244a408f35966fab2fb45fda9c8Suggested change
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.26.1)
[error] 48-48: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 48-48: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default
(cache-poisoning)
🤖 Prompt for AI Agents
Source: Linters/SAST tools