Skip to content

fix(workflows): harden community submission workflows - #4510

Open
mnriem wants to merge 3 commits into
github:mainfrom
mnriem:mnriem-harden-community-workflows
Open

fix(workflows): harden community submission workflows#4510
mnriem wants to merge 3 commits into
github:mainfrom
mnriem:mnriem-harden-community-workflows

Conversation

@mnriem

@mnriem mnriem commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

A focused hardening change to the community catalog submission workflows
(bundle, extension, preset).

  • Threat detection is configured to block safe outputs instead of only
    emitting a warning.
  • Adds a regression test that keeps this fail-closed behavior from silently
    reverting on a future regeneration.

Generated workflow files were regenerated to match; action pins are unchanged
from the base. No catalog data changes and no change to the maintainer
PR-review step.

Note on review feedback

An earlier revision also switched issue parsing to the sanitized event
snapshot. That was reverted: the snapshot redacts URLs on hosts outside the
workflow's allowed-domains list, which would corrupt valid submissions whose
metadata legitimately points at non-GitHub hosts. Reading the triggering issue
is retained, with the separate maintainer review remaining the control for any
post-label edits.


Opened on behalf of @mnriem by GitHub Copilot (model: Claude Opus 4.8).

…view

Address two hardening suggestions from a GitHub Security Lab PVR against the
community catalog submission workflows (bundle, extension, preset):

1. Validate the sanitized event snapshot instead of the live issue. Step 1 now
   consumes ${{ steps.sanitized.outputs.text }} — the documented gh-aw sanitized
   full-context output — rather than instructing the agent to re-fetch the issue
   body, which could change between the maintainer applying the label and the
   agent reading it. This ties validation to the triggering submission.

2. Make threat detection block safe outputs. Add
   safe-outputs.threat-detection.continue-on-error: false so a detected threat
   fails the run instead of only warning and still producing a draft PR.

Recompiled the three .lock.yml files with gh-aw v0.79.8.

(Finding #2, create-pull-request allowed-files, is already implemented on all
three workflows upstream, so no change was needed there.)

Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 10, 2026 13:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Sanitization corrupts accepted external URLs, generated locks downgrade actions unexpectedly, and fail-closed behavior lacks regression coverage.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 2 High severity · 3 Medium severity · 1 Low severity

New issues introduced by this change (6)
Severity Finding
High severity .github/​workflows/​add-community-bundle.md — This sanitized text cannot preserve all fields this workflow accepts. gh-aw v0.79.8 redacts HTTPS…
High severity .github/​workflows/​add-community-extension.md — This is not a lossless snapshot of extension submissions. In gh-aw v0.79.8, the sanitized output…
Medium severity .github/​workflows/​add-community-bundle.lock.yml — The regenerated lock unexpectedly downgrades actions/checkout from v7.0.1 to v6.0.3 and…
Medium severity .github/​workflows/​add-community-extension.lock.yml — The regenerated lock unexpectedly downgrades actions/checkout from v7.0.1 to v6.0.3 and…
Medium severity .github/​workflows/​add-community-preset.lock.yml — The regenerated lock unexpectedly downgrades actions/checkout from v7.0.1 to v6.0.3 and…
Low severity .github/​workflows/​add-community-extension.md — The new fail-closed contract has no regression assertion even though…
What changed in this PR

Hardens community submission workflows by using triggering-event snapshots and fail-closed threat detection.

Changes:

  • Uses sanitized issue snapshots as authoritative inputs.
  • Blocks safe outputs when threat detection fails.
  • Regenerates corresponding lock workflows.
File Description
.github/​workflows/​add-community-bundle.md Adds snapshot parsing and fail-closed detection.
.github/​workflows/​add-community-bundle.lock.yml Regenerates the bundle workflow.
.github/​workflows/​add-community-extension.md Adds snapshot parsing and fail-closed detection.
.github/​workflows/​add-community-extension.lock.yml Regenerates the extension workflow.
.github/​workflows/​add-community-preset.md Adds snapshot parsing and fail-closed detection.
.github/​workflows/​add-community-preset.lock.yml Regenerates the preset workflow.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/add-community-bundle.md Outdated
Comment thread .github/workflows/add-community-extension.md Outdated
Comment thread .github/workflows/add-community-bundle.lock.yml Outdated
Comment thread .github/workflows/add-community-extension.lock.yml Outdated
Comment thread .github/workflows/add-community-preset.lock.yml Outdated
Comment on lines +29 to +30
threat-detection:
continue-on-error: false
mnriem and others added 2 commits September 10, 2026 11:41
Address PR review feedback:

- Restore actions/checkout (v7.0.1) and actions/setup-node (v7.0.0) pins in the
  three regenerated lock files. A local recompile had resolved older cached
  pins; the lock files now differ from the base only by the intended snapshot
  and threat-detection changes.
- Add a regression test asserting each community submission workflow enables
  threat detection with continue-on-error: false in source and compiles to the
  fail-closed detection gate, so a later regeneration cannot silently restore
  warning-only behavior.

Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…tion

The regenerated sanitized snapshot (steps.sanitized.outputs.text) redacts any
HTTPS host absent from the workflow's allowed-domains list. These submission
workflows record off-allowlist URLs verbatim (extension homepage/documentation/
changelog, bundle required component catalogs, and the proposed catalog-entry
JSON), so a snapshot input would corrupt otherwise-valid submissions.

Revert Step 1 to reading the triggering issue and keep the separate maintainer
PR review as the control for issue edits. The fail-closed threat-detection
change (continue-on-error: false) and its regression test are retained.

Recompiled the three lock files; action pins and the pin database are unchanged
from the base.

Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 10, 2026 16:46
@mnriem

mnriem commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the review — addressed in a6d5207 (and the two preceding commits).

Sanitized-snapshot input (High, bundle + extension). You're right that the regenerated snapshot redacts HTTPS hosts outside the workflow's allowed-domains list. These workflows record off-allowlist URLs verbatim (extension homepage/documentation/changelog, bundle required component catalogs, and the proposed catalog-entry JSON), so the snapshot would corrupt valid submissions. I reverted the snapshot change and kept reading the triggering issue; the separate maintainer review remains the control for any post-label edits.

Action pin downgrade (Medium ×3). Unintended side effect of the regeneration. The lock files now restore the base actions/checkout (v7.0.1) and actions/setup-node (v7.0.0) pins, and the pin database is unchanged from the base. The only remaining lock delta versus base is the threat-detection change.

Missing fail-closed regression coverage (Low). Added a test that asserts each workflow source sets threat-detection.continue-on-error: false and each lock compiles the fail-closed detection gate, so a later regeneration can't silently restore warning-only behavior.

Net change is now scoped to fail-closed threat detection plus that test.

Posted on behalf of @mnriem by GitHub Copilot (model: Claude Opus 4.8), acting autonomously.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The source workflows, generated outputs, and regression test consistently enforce fail-closed threat detection.

Review tier: Balanced
Findings: 1 Low severity

Pre-existing issues (1)
Severity Finding
Low severity .github/​workflows/​add-community-extension.md — The new fail-closed contract has no regression assertion even though… View comment
Issues resolved since last review (5)
Severity Finding
Medium severity .github/​workflows/​add-community-preset.lock.yml — The regenerated lock unexpectedly downgrades actions/checkout from v7.0.1 to v6.0.3 and… View resolved comment
Medium severity .github/​workflows/​add-community-extension.lock.yml — The regenerated lock unexpectedly downgrades actions/checkout from v7.0.1 to v6.0.3 and… View resolved comment
Medium severity .github/​workflows/​add-community-bundle.lock.yml — The regenerated lock unexpectedly downgrades actions/checkout from v7.0.1 to v6.0.3 and… View resolved comment
High severity .github/​workflows/​add-community-extension.md — This is not a lossless snapshot of extension submissions. In gh-aw v0.79.8, the sanitized output… View resolved comment
High severity .github/​workflows/​add-community-bundle.md — This sanitized text cannot preserve all fields this workflow accepts. gh-aw v0.79.8 redacts HTTPS… View resolved comment

@mnriem mnriem added the triage-must-have Verdict: high-value, important work for Spec Kit — do first label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-must-have Verdict: high-value, important work for Spec Kit — do first

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants