fix(ci): grant the wrapper the permissions the reusable declares - #72
Merged
Merged
Conversation
The Hypatia reusable workflow declares `actions: read`, `contents: read` and `security-events: write`. A caller job that does not grant at least what the called workflow declares cannot start at all: every run of this wrapper was `startup_failure`, so the repository published no Hypatia check — the defect class of hyperpolymath/tropical-types#17 (a gate that names a context with no publisher). * grant `actions: read` * pass `secrets: inherit` (the reusable consumes `secrets.HYPATIA_SCAN_PAT || secrets.GITHUB_TOKEN`) No other change: the caller id, the pin, and the job body are untouched.
|
Warning Review limit reachedNext included review available in 12 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
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 |
| jobs: | ||
| hypatia: | ||
| uses: hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd | ||
|
|
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.
Every run of this wrapper was
startup_failure— the workflow never started, so the repository has never published a Hypatia check. That is the defect class of hyperpolymath/tropical-types#17: a gate (or a requirement) that names a context nothing publishes.Cause: the Hypatia reusable workflow declares
actions: read,contents: readandsecurity-events: write, and a caller cannot start a called workflow unless its job grants at least what the called workflow declares. This wrapper did not grantactions: read.Fix, minimal:
actions: read(at the job level where a job-levelpermissions:block overrides the workflow-level one);secrets: inherit— the reusable consumessecrets.HYPATIA_SCAN_PAT || secrets.GITHUB_TOKEN.The caller id, the pin and the rest of the job are untouched. Found by the caller-id standardisation sweep (same probe: read the run history, not the file).