Skip to content

fix: declare explicit secrets contract for ctcOpen/ctcClose - #213

Merged
madhur310 merged 1 commit into
mainfrom
fix/ctc-explicit-secrets
Nov 24, 2026
Merged

madhur310 merged 1 commit into
mainfrom
fix/ctc-explicit-secrets

Conversation

@madhur310

Copy link
Copy Markdown
Contributor

Summary

  • Adds a secrets: block under on.workflow_call to ctcOpen.yml and ctcClose.yml, declaring SF_CHANGE_CASE_SFDX_AUTH_URL, SF_CHANGE_CASE_TEMPLATE_ID, and SF_CHANGE_CASE_CONFIGURATION_ITEM as required secrets.
  • Previously these reusable workflows had no secrets: contract, so every caller was forced to use secrets: inherit -- GitHub Actions rejects an explicit secrets: { 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.
  • This is backward compatible: existing secrets: inherit callers are unaffected. Callers can now optionally switch to passing only the three named secrets explicitly.

Test plan

  • actionlint passes on both workflow files with no new errors (only pre-existing, unrelated warnings for the custom runner label and shellcheck nits)
  • Verified an explicit secrets: { NAME: ... } map is now accepted by GitHub Actions' schema validation (confirmed error before this change, confirmed resolved after)

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
madhur310 requested a review from a team as a code owner November 24, 2026 01:04
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]>
@madhur310
madhur310 merged commit 7a73e06 into main Nov 24, 2026
4 checks passed
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.

2 participants