Skip to content

Support explicit secret scoping on custom jobs#2306

Open
shaanmajid wants to merge 4 commits into
axodotdev:mainfrom
shaanmajid:custom-job-secrets
Open

Support explicit secret scoping on custom jobs#2306
shaanmajid wants to merge 4 commits into
axodotdev:mainfrom
shaanmajid:custom-job-secrets

Conversation

@shaanmajid

Copy link
Copy Markdown

Closes #2282.

Summary

Adds github-custom-job-secrets (v0) / secrets (v1) to scope which secrets are passed to custom CI jobs, replacing the blanket secrets: inherit. Follows the pattern from github-custom-job-permissions (#1179).

  • Unconfigured jobs keep secrets: inherit (preserving backwards compatibility)
  • Empty list/map omits secrets: entirely
  • Supports both list (["TOKEN"]) and map ({ TOKEN = "ORG_TOKEN" }) formats
  • Unknown job names are rejected with a diagnostic error

@shaanmajid shaanmajid changed the title Custom job secrets Support explicit secret scoping on custom jobs Feb 23, 2026
@shaanmajid

Copy link
Copy Markdown
Author

This adds unknown-job-name validation for secrets (i.e. error on typos). The existing github-custom-job-permissions doesn't have this, however. I leaned toward loud failure, since secrets feel more security-sensitive, but happy to drop the validation if you'd prefer consistency with permissions, or to add it for permissions too as a follow-up.

@shaanmajid
shaanmajid force-pushed the custom-job-secrets branch from eeafa84 to 6842f5f Compare April 7, 2026 10:35
@shaanmajid

Copy link
Copy Markdown
Author

Hey @mistydemeo -- no rush, but just wanted to check if you're still open to this PR. If y'all don't have the bandwidth that's no problem-- I'll go ahead and close. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Support explicit secret scoping on custom jobs

1 participant