Skip to content

fix(workflows)!: require explicit signer key delivery - #3348

Open
Bill Berry (WilliamBerryiii) wants to merge 1 commit into
mainfrom
fix/3117-signer-key-contract
Open

Bill Berry (WilliamBerryiii) wants to merge 1 commit into
mainfrom
fix/3117-signer-key-contract

Conversation

@WilliamBerryiii

Copy link
Copy Markdown
Member

Pull Request

Description

Require an explicit governance-key binding when calling the extension provenance signer. Reject an empty key before generating the GitHub App token, with a diagnostic that does not print the value.

  • Declare only RELEASE_APP_PRIVATE_KEY as the required reusable-workflow secret.
  • Keep key use in checkout-free authorization, separate from read-only packaging and attestation.
  • Execute missing-key and present-key tests against the actual workflow step.

This changes the reusable workflow's interface. Current release callers remain pinned to their existing revision and are not changed here. A follow-up must use the reviewed immutable signer revision and its named secret binding together. No release is activated by this pull request.

Related Issue(s)

Related to #3117

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Infrastructure & Configuration:

  • GitHub Actions workflow
  • Linting configuration (markdown, PowerShell, etc.)
  • Security configuration
  • DevContainer configuration
  • Dependency update

AI Artifacts:

  • Reviewed contribution with hve-builder and addressed all actionable findings
  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot agent (.github/agents/*.agent.md)
  • Copilot skill (.github/skills/*/SKILL.md)
  • Copilot hook (.github/hooks/*/*.json)
  • Eval spec added/updated for changed AI artifacts (evals/)

Note for AI Artifact Contributors:

  • Agents: Research, indexing/referencing other project (using standard VS Code GitHub Copilot/MCP tools), planning, and general implementation agents likely already exist. Review .github/agents/ before creating new ones.
  • Skills: Must include both bash and PowerShell scripts. See Skills.
  • Model Versions: Contributions MUST target models listed in the model catalog (scripts/linting/model-catalog.json) whose provider appears in providerAllowlist and whose status is ga or preview. Run npm run lint:models to validate references.
  • See Agents Not Accepted and Model Version Requirements.

Other:

  • Script/automation (.ps1, .sh, .py)
  • Other (please describe):

Testing

Validated the two-file commit 8971f4c11945aebfb41ff6e7eeacd88f54e76e53, based on main at f425e943bf228052a23e6bc4810b5faef030314f. In these commands, $worktree is the isolated PR checkout, $report is its workflow SARIF output, and $shellcheck[0].FullName is the installed ShellCheck 0.11.0 executable.

  • npm --prefix $worktree run test:ps -- -TestPath scripts\tests\extension\ExtensionProvenanceSigner.Tests.ps1: passed, 20 tests, zero skipped, using the checkout's pinned Pester 6.2.0.
  • npm --prefix $worktree run test:ps -- -TestPath scripts\tests\security\GitHubAppTokenScope.Tests.ps1: passed, 213 tests, zero skipped, using Pester 6.2.0.
  • npm --prefix $worktree run lint:permissions -- -Path "$worktree\.github\workflows\extension-provenance-signer.yml": passed, all four workflow/job checks.
  • Invoke-ScriptAnalyzer -Path "$worktree\scripts\tests\extension\ExtensionProvenanceSigner.Tests.ps1" -Settings "$worktree\scripts\linting\PSScriptAnalyzer.psd1": passed, zero findings, using PSScriptAnalyzer 1.25.0.
  • git -C $worktree diff f425e943bf228052a23e6bc4810b5faef030314f...HEAD --check: passed.
  • npm run lint:workflows -- --repo-root $worktree --sarif $report --shellcheck $shellcheck[0].FullName: completed with exit 1 for eight existing generated-workflow SC2154 findings; no signer-workflow finding.
  • npm --prefix $worktree run security:codeql-gate -- -SarifPath $report -Threshold All: passed. All eight findings match existing tracked generated-code exceptions for Track upstream fixes for generated agentic-workflow scan findings #3137; no exception was added or changed.

The full local aggregate, broad suites, hosted checks, environment-secret placement audit and actual signing/publication were not run. Fixtures use a fake key and do not mint an App token.

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

AI Artifact Contributions

  • Used hve-builder review mode to review contribution
  • Addressed all actionable findings from the hve-builder review
  • Verified contribution follows common standards and type-specific requirements

Required Local Checks

The following local-safe validation commands must pass before merging:

  • Local validation aggregate: npm run validate:local
  • Documentation validation (if docs changed): npm run validate:docs
  • Spell checking: npm run spell-check
  • Link validation: npm run lint:md-links

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege

Additional Notes

Do not update consumers to a moving branch or add the new binding to the old frozen workflow. After review and merge, record the actual landed commit and coordinate caller/verifier pins separately.

Before activation, an administrator must verify environment-only key placement and independent approval controls without inspecting secret values. This pull request does not change credentials, App grants, branch/tag protections, releases or Marketplace listings.

- declare the named governance key for reusable callers
- reject empty delivery before generating an App token
- cover missing and present keys without printing values

🔐 - Generated by Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@WilliamBerryiii
Bill Berry (WilliamBerryiii) requested a review from a team as a code owner November 7, 2026 01:41
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Eval Execution

⚠️ No eval summary was produced.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 23.40%. Comparing base (f425e94) to head (8971f4c).

❗ There is a different number of reports uploaded between BASE (f425e94) and HEAD (8971f4c). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (f425e94) HEAD (8971f4c)
pester 2 1
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #3348       +/-   ##
===========================================
- Coverage   87.57%   23.40%   -64.17%     
===========================================
  Files          91       91               
  Lines       14896    14896               
===========================================
- Hits        13045     3487     -9558     
- Misses       1851    11409     +9558     
Flag Coverage Δ
pester 10.45% <ø> (-76.62%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 81 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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