debug(ci): use rootless version of buildkit-cache-dance#247
debug(ci): use rootless version of buildkit-cache-dance#247TheDarthMole wants to merge 4 commits intomainfrom
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe pull request updates the GitHub Actions workflow build configuration by modifying the "Inject go-build-cache" step. The action reference is changed from Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
|
||
| - name: 💉 Inject go-build-cache | ||
| uses: reproducible-containers/buildkit-cache-dance@6f699a72a59e4252f05a7435430009b77e25fe06 # v3.3.1 | ||
| uses: jackmisbach/buildkit-cache-dance@rootless |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
repo='https://github.com/jackmisbach/buildkit-cache-dance.git'
echo "Resolving 'rootless' to immutable refs..."
refs="$(git ls-remote "$repo" 'refs/heads/rootless' 'refs/tags/rootless' 'rootless')"
printf '%s\n' "$refs"
sha="$(printf '%s\n' "$refs" | awk 'NR==1 {print $1}')"
if [ -z "$sha" ]; then
echo "Could not resolve a SHA for 'rootless'" >&2
exit 1
fi
echo
echo "Candidate SHA to pin: $sha"
echo
echo "Inspecting action metadata at that SHA..."
curl -fsSL "https://raw.githubusercontent.com/jackmisbach/buildkit-cache-dance/$sha/action.yml" | sed -n '1,120p'Repository: TheDarthMole/upswake
Length of output: 2079
Pin this action to an immutable commit SHA.
Line 120 references @rootless, which is a mutable branch reference on a third-party repository. This reintroduces workflow drift and weakens supply-chain hardening. GitHub's guidance recommends pinning actions to full commit SHAs for maximum safety and reproducibility.
Suggested change
- uses: jackmisbach/buildkit-cache-dance@rootless
+ uses: jackmisbach/buildkit-cache-dance@995b7bfce9b62060b4240cc0936a6af743e82247The action at this SHA exposes all inputs currently in use: builder, dockerfile, skip-extraction, and cache-map.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| uses: jackmisbach/buildkit-cache-dance@rootless | |
| uses: jackmisbach/buildkit-cache-dance@995b7bfce9b62060b4240cc0936a6af743e82247 |
🧰 Tools
🪛 GitHub Check: CodeQL
[warning] 120-120: Unpinned tag for a non-immutable Action in workflow
Unpinned 3rd party Action 'Docker' step Uses Step uses 'jackmisbach/buildkit-cache-dance' with ref 'rootless', not a pinned commit hash
|
Hey! Even though I, of course, have no malicious intent 😂, I would recommend pinning it to the SHA digest. |
|
Hey @jackmisbach! That's a good shout, I should have used the pinned versions. I did see the security tools but just wanted a quick POC to see if the fixes you made worked, and they do! Thank you for your contributions to reproducible-containers/buildkit-cache-dance, I look forward to them being merged into main |
No description provided.