feat: add passive support for code-quality (and related) permissions#6119
Open
displague wants to merge 2 commits into
Open
feat: add passive support for code-quality (and related) permissions#6119displague wants to merge 2 commits into
code-quality (and related) permissions#6119displague wants to merge 2 commits into
Conversation
- Add `code-quality`, `artifact-metadata`, and `vulnerability-alerts` to the workflow permissions schema so workflows using the new GitHub Code Quality / coverage upload features (e.g. `code-quality: write`) pass schema validation. See https://docs.github.com/en/code-security/how-tos/maintain-quality-code/set-up-code-coverage - Parse `permissions:` (workflow + per-job) into model.Workflow and model.Job (using RawPermissions + Permissions() helper, following existing Raw* pattern). - Populate github.permissions context (when declared as a map) for expression evaluation and action compatibility. - Add schema validation test exercising the code-quality permission.
code-quality (and related) permissions
code-quality (and related) permissionscode-quality (and related) permissions
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.
Add code-quality, artifact-metadata, and vulnerability-alerts to the workflow permissions schema.
This allows workflows that declare modern permissions (e.g. the official GitHub Code Quality / coverage setup) to be parsed and run instead of being rejected with "Unknown Property code-quality".
yaml permissions: contents: read code-quality: writeChanges
Testing (using this build)
gh act -lusing this build: temporarily replaced the vendored gh-act.exe extension binary with our build (becausegh actvendors its own copy ofact). Confirmed jobs from workflow yaml are listed with no schema refusal.This PR was built with and opened with 🤖 (Grok 4.3 by xAI).
See: