ci(security): minimize workflow token permissions (Scorecard)#165
Merged
Conversation
…only workflow jobs
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.
Summary
Reduces
contents/packageswrite permissions flagged by OpenSSF Scorecard'sTokenPermissions check, on jobs that never actually execute on this fork
(guarded by
if: github.repository == 'maximhq/bifrost'or otherwiseupstream-only). Zero functional impact on the fork — these jobs skip either way.
release-pipeline.yml:docker-build-amd64,docker-build-arm64,docker-manifest,docker-build-ubi9-amd64,docker-build-ubi9-arm64,docker-manifest-ubi9,push-mintlify-changelog— all guarded tomaximhq/bifrostonly; dropped tocontents: readand removedpackages: write.helm-release.yml: top-levelpermissionsdropped tocontents: read(job already sets its own). Removed unused
packages: writefrom jobrelease(only used by continue-on-error, already-nonfunctional GHCR/DockerHub OCI push steps). Left
contents: writeon jobreleasein place — thisjob has no repository guard and does run on the fork (creates a real
GitHub Release + pushes to
gh-pageson push to main).openapi-bundle.yml: top-levelpermissionsdropped tocontents: read(only job is guarded to
maximhq/bifrost).release-bifrost-migration-cli.yml:release-bifrost-migration-clijobdropped to
contents: read(guarded tomaximhq/bifrost).Left unchanged: 2
npm install -g newman@6.2.1 newman-reporter-htmlextra@1.23.1lines (PinnedDependencies) — these are legitimate runtime tool installs, not
practical to hash-pin without vendoring; recommend dismissing those 2 alerts.
Alert disposition (17 flagged)
13 of 17 alerts fully fixed; 4 recorded as must-dismiss with reasons above
(1 genuinely-needed-on-fork write permission, 2 npm pin issues, plus the
already-covered helm-release contents:write).
Test plan
python3 -c "import yaml; ..."— all 4 edited workflow files parse as valid YAMLactionlinton all 4 files — no new errors introduced (pre-existing shellcheck info/style notices only, unrelated to permissions changes)git diff --statreviewed — surgical, permissions-only changes🤖 Generated with Claude Code
https://claude.ai/code/session_01KaMwdJBpdWtWo7xxmehHrr