-
Notifications
You must be signed in to change notification settings - Fork 341
[plan] Add missing permission scopes to schema and fix unknown all scope handling #17904
Copy link
Copy link
Closed
Labels
Description
Context
From schema consistency discussion #17876 (2026-02-23 run, finding 6).
Objective
Fix the permissions schema so that all scopes implemented in Go code are also present in the JSON schema, and handle the all scope key gracefully.
Issues to Fix
1. repository-projects and organization-projects missing from schema
- Files:
pkg/workflow/permissions.go:39-42,pkg/parser/schemas/main_workflow_schema.json - These two scopes are fully implemented (
PermissionRepositoryProj,PermissionOrganizationProj) but absent from the schema which usesadditionalProperties: false. - Workflows using these scopes fail schema validation even though the runtime handles them correctly.
- Add both scopes (
repository-projects,organization-projects) as valid enum values to the permissions schema.
2. all scope key has no handler in convertStringToPermissionScope
- File:
pkg/workflow/permissions.go:28-47 - The schema allows an
allkey (forall: readstyle permissions) butconvertStringToPermissionScopehas nocase "all":branch. - Users who set
permissions: all: writeget a silent "Unknown permission scope key: all" log with no compilation error. - Either add a
case "all":handler or removeallfrom the schema if it is not a valid GitHub Actions permission key.
Files to Modify
pkg/parser/schemas/main_workflow_schema.jsonpkg/workflow/permissions.go
Acceptance Criteria
-
repository-projectsandorganization-projectsare valid properties in the permissions schema - Workflows using
repository-projectsororganization-projectspass schema validation - The
allscope is either handled inconvertStringToPermissionScopeor removed from the schema - Run
make agent-finishwith no errors before committing - Run
make buildafter schema changes (schemas are embedded via//go:embed)
Generated by Plan Command for issue #discussion #17876
- expires on Feb 25, 2026, 12:04 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.