Repository navigation
fix: declare explicit secrets contract for ctcOpen/ctcClose - #213
Merged
Merged
Conversation
Callers currently must use `secrets: inherit` because these reusable
workflows don't declare a `secrets:` block under `on.workflow_call` --
GitHub Actions rejects an explicit `secrets: { NAME: ... }` map unless
the callee declares matching names. Declaring the three CTC secrets
here lets callers pass only what's needed instead of their entire
secret set, satisfying least-privilege SAST checks like
base.yaml.github-actions.security.secrets-inherit.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
madhur310
added a commit
to forcedotcom/salesforcedx-vscode
that referenced
this pull request
Nov 24, 2026
salesforcecli/github-workflows#213 adds a `secrets:` contract to ctcOpen.yml/ctcClose.yml, letting callers pass only the three CTC secrets instead of `secrets: inherit`. Point ctc-open, ctcCloseSuccess, and ctcCloseFail at that PR's branch and switch to explicit secrets, resolving the SAST secrets-inherit finding instead of just triaging it. TODO once #213 merges to main: flip these three `uses:` refs from `@fix/ctc-explicit-secrets` back to `@main`. Co-Authored-By: Claude Sonnet 5 <[email protected]>
mshanemc
approved these changes
Nov 24, 2026
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
secrets:block underon.workflow_calltoctcOpen.ymlandctcClose.yml, declaringSF_CHANGE_CASE_SFDX_AUTH_URL,SF_CHANGE_CASE_TEMPLATE_ID, andSF_CHANGE_CASE_CONFIGURATION_ITEMas required secrets.secrets:contract, so every caller was forced to usesecrets: inherit-- GitHub Actions rejects an explicitsecrets: { NAME: ... }map unless the callee declares matching names. This tripped a SAST finding (base.yaml.github-actions.security.secrets-inherit) in a downstream caller (fix(release): restore approval gate for stable Open VSX publishes forcedotcom/salesforcedx-vscode#8641) that couldn't be remediated without this change.secrets: inheritcallers are unaffected. Callers can now optionally switch to passing only the three named secrets explicitly.Test plan
actionlintpasses on both workflow files with no new errors (only pre-existing, unrelated warnings for the custom runner label and shellcheck nits)secrets: { NAME: ... }map is now accepted by GitHub Actions' schema validation (confirmed error before this change, confirmed resolved after)