Skip to content

fix: allow community submission archive validation - #4622

Merged
mnriem merged 3 commits into
github:mainfrom
mnriem:mnriem-archive-validation-access
Sep 18, 2026
Merged

mnriem merged 3 commits 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: 37 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.88.7, matching their compiler metadata and the version enforced by the workflow regression tests.
  • 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.

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.

Comment thread .github/workflows/add-community-bundle.md Outdated
Comment thread tests/test_github_workflows.py Outdated
@mnriem mnriem added the triage-must-have Verdict: high-value, important work for Spec Kit — do first label Sep 17, 2026
Copilot AI review requested due to automatic review settings September 18, 2026 20:06
@mnriem

mnriem commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the review in commit 828822b0.

  • Removed codeload.github.com from the bundle workflow source and generated lock while preserving the release-asset redirect host.
  • Changed the regression to model redirect hosts per workflow and verify unnecessary hosts are absent from compiled agent configuration.
  • Validated with .venv/bin/python -m pytest tests/test_github_workflows.py -q (14 passed) and git diff --check.

Posted on behalf of @mnriem by GitHub Copilot (model: GPT-5.6 Sol).

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

Two regression assertions can miss removal of the executable curl permission or redirect-following flag.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Comment thread tests/test_github_workflows.py Outdated
mnriem and others added 3 commits September 18, 2026 15:23
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>
Remove codeload.github.com from bundle validation while retaining it for extension and preset tag archives. Model the required redirect hosts per workflow in regression coverage and update the generated bundle lock without compiler drift.

Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Inspect the non-comment Copilot harness command before asserting the curl tool permission, and require the explicit curl redirect-following flag in archive guidance.

Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 18, 2026 20:24
@mnriem
mnriem force-pushed the mnriem-archive-validation-access branch from 828822b to c2e24d8 Compare September 18, 2026 20:24
@mnriem

mnriem commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased the branch onto current upstream/main and addressed the latest review in commit c2e24d84.

  • The curl permission regression now extracts the single non-comment copilot_harness.cjs command before asserting shell(curl:*), so the generated tool-inventory comment cannot mask a missing executable argument.
  • The archive guidance regression now requires --location together with the HTTPS protocol restrictions.
  • Regenerated the community workflow locks with the upstream v0.88.7 compiler during conflict resolution.
  • Validated with .venv/bin/python -m pytest tests/test_github_workflows.py -q (37 passed) and git diff --check.

Posted on behalf of @mnriem by GitHub Copilot (model: GPT-5.6 Sol).

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 implementation and regression coverage are consistent; only the PR’s stated compiler version needs correction.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (1)

Comment thread .github/workflows/add-community-extension.lock.yml
@mnriem

mnriem commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the latest review by correcting the PR testing disclosure. It now records gh-aw v0.88.7, matching the generated lock metadata and regression enforcement, and the current targeted result of 37 passed.

No code change was required; the branch head remains c2e24d84.

Posted on behalf of @mnriem by GitHub Copilot (model: GPT-5.6 Sol).

@mnriem
mnriem requested a balanced review from Copilot September 18, 2026 20:39
@mnriem
mnriem merged commit 130480b into github:main Sep 18, 2026
15 checks passed
@mnriem
mnriem deleted the mnriem-archive-validation-access branch September 18, 2026 20:40

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 focused workflow fix is consistently applied, reflected in generated locks, and protected by targeted regression tests.

Review effort: Balanced
Findings: None

Resolved since last review (1)

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