Skip to content

fix: allow community submission archive validation - #4622

Open
mnriem wants to merge 1 commit into
github:mainfrom
mnriem:mnriem-archive-validation-access
Open

mnriem wants to merge 1 commit into
github:mainfrom
mnriem:mnriem-archive-validation-access

Conversation

@mnriem

@mnriem mnriem commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #4589.

Run 34898212927 denied the archive curl command because it was absent from the shell tool allowlist. The resolved firewall configuration also omitted codeload.github.com and release-assets.githubusercontent.com, so permitting the command alone would leave the accepted download URLs blocked at their redirect destinations.

  • Permit curl and only the required GitHub download hosts alongside the existing default network policy in the extension, preset, and bundle submission workflows, which share the same validation requirements and configuration gap.
  • Require HTTPS-only redirects, a 60-second timeout, and direct archive HTTP evidence; blocked requests or repository/release metadata cannot count as successful downloads. Downloaded content must not be executed.
  • Regenerate the three workflow locks and add regression coverage for tool permissions, redirect hosts, and direct-evidence instructions. Existing repository/tag pinning checks, optional checksum validation, action pins, read-only permissions, and safe-output restrictions are preserved.

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

Workflow-only change; CLI/sample-project checks and the full suite were not run. Targeted validation used this worktree's own virtualenv:

  • .venv/bin/python -m pytest tests/test_github_workflows.py -q: 14 passed. All three new regression checks failed before the fix.
  • gh aw compile add-community-extension add-community-preset add-community-bundle --strict --no-check-update: all three compiled with zero errors or warnings using v0.79.8, matching their existing compiler metadata. Unrelated compiler drift was removed to retain existing action pins and repository configuration.
  • Semantic comparison of the generated workflows confirmed only download-domain configuration and the curl tool permission changed; existing action/container pins and policies remain unchanged.
  • A direct GET of the reported archive returned HTTP 200 after redirecting to codeload.github.com.
  • git diff --check passed.

The hosted workflow has not been rerun; end-to-end confirmation is needed after merge and a new submission-label trigger.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

GitHub Copilot (model: GPT-6 Astra), acting on behalf of @mnriem, investigated the run, authored the fix and regression coverage, and performed the local validation autonomously. @mnriem requested the work and authorized the commit and upstream PR; the changes have not been represented as human-authored or line-by-line human-reviewed.

Permit curl and the GitHub archive/release redirect hosts in all three community submission workflows. Require direct download evidence, preserve existing pinning checks, and cover the source and compiled configuration with regression checks.

Closes github#4589

Assisted-by: GitHub Copilot (model: GPT-6 Astra, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 17, 2026 18:50

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

The bundle workflow unnecessarily allows codeload access despite accepting only release assets.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Enables direct archive validation in community submission workflows while constraining downloads to HTTPS GitHub hosts.

Changes:

  • Allows curl and GitHub archive redirect hosts.
  • Adds timeout, status verification, and non-execution safeguards.
  • Regenerates workflow locks and adds regression tests.
File Description
.github/​workflows/​add-community-extension.md Enables guarded archive downloads.
.github/​workflows/​add-community-extension.lock.yml Regenerates the extension workflow.
.github/​workflows/​add-community-preset.md Enables guarded archive downloads.
.github/​workflows/​add-community-preset.lock.yml Regenerates the preset workflow.
.github/​workflows/​add-community-bundle.md Enables release-asset downloads.
.github/​workflows/​add-community-bundle.lock.yml Regenerates the bundle workflow.
tests/​test_github_workflows.py Verifies permissions, hosts, and download safeguards.

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

allowed:
- defaults
- github.com
- codeload.github.com
Comment on lines +316 to +320
download_hosts = {
"github.com",
"codeload.github.com",
"release-assets.githubusercontent.com",
}
@mnriem mnriem added the triage-must-have Verdict: high-value, important work for Spec Kit — do first label Sep 17, 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.

[aw] Add Community Extension from Issue Submission is missing required tool

2 participants