fix(ci): scope workflow token permissions and pin remaining Docker base images#93
Merged
shudonglin merged 1 commit intoJul 5, 2026
Conversation
…er base images by digest Scorecard's Token-Permissions check flagged four workflows (check_duplicate_issues, create_daily_staging_branch, issue-keyword-labeler, label-component) with no top-level permissions block, defaulting the GITHUB_TOKEN to the repo's broad default instead of least-privilege. Pinned-Dependencies flagged four remaining floating-tag base images with a digest already resolvable from the registry: node/nginx in ui/Dockerfile and rust/python in litellm-rust's ai-gateway Dockerfile, matching the digest-pin convention already applied to the other four Dockerfiles in the repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant issues
Linear ticket
Pre-Submission checklist
@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewScreenshots / Proof of Fix
N/A: CI/supply-chain hardening only, no proxy-visible behavior change. Verified each digest independently against the Docker registry before pinning (see commit message).
Type
🚄 Infrastructure
Changes
Addresses the two open code-scanning alert categories (
TokenPermissionsID,PinnedDependenciesID) surfaced by the fork's Scorecard supply-chain scan:permissions: contents: readtocheck_duplicate_issues.yml,create_daily_staging_branch.yml,issue-keyword-labeler.yml, andlabel-component.yml, which previously had none and so defaulted to the repo's broader default token permissions.node:20.18-alpine3.20andnginx:1.27-alpineinui/Dockerfile,rust:1.90-slim-bookwormandpython:3.11-slim-bookworminlitellm-rust/crates/ai-gateway/Dockerfile. Each digest was independently resolved from the registry (not just copied from Scorecard's suggestion) before pinning.The remaining Token-Permissions warnings (release/schema-sync/branch-creation workflows needing
contents: write) are already correctly scoped at job level with a restrictivepermissions: {}at the top level; thewritegrant is inherent to what those workflows do (creating branches, releases, tags) and isn't further reducible without removing that capability, so left as-is. The remaining Pinned-Dependencies warnings (cookbook/example Dockerfiles, docker/Dockerfile.database, docker/Dockerfile.non_root, docker/build_from_pip, and pip/npm install commands) are non-deployed example or auxiliary files; left for follow-up rather than rushed digest pins on files this PR didn't otherwise touch.Generated by Claude Code