Repository navigation
fix(security): make the last sandbox-hostile gh calls plain, and fit the review block to PR imports - #1453
Merged
Conversation
…the review block to PR imports Follow-ups from the security-family optimization (apache#1344). - workflow-security-audit passed `--gh-token "$(gh auth token)"` to zizmor. Under the secure setup a `gh` inside `$(…)` stays sandboxed, cannot read its credentials, and fails. zizmor reads its token from GH_TOKEN / GITHUB_TOKEN / ZIZMOR_GITHUB_TOKEN, so the commands drop the flag. Without a token, the skill uses the clone path (a plain `gh repo clone`) or asks the user to run the remote scan. - security-issue-invalidate Step 1 redirected `gh issue view` into a file, which keeps the call sandboxed for the same reason. It now runs as a plain command, and the skill reads the JSON it prints. - The generated pre-PR adversarial-review block opened with "Before this skill opens a PR", which does not fit security-issue-import-from-pr: that skill opens no PR, it imports one. The block now also names the skill working from someone else's PR, verifying or importing it. Regenerated into every skill that carries it. Generated-by: Claude Code (Opus 5.5)
3 tasks done
potiuk
added a commit
that referenced
this pull request
Sep 28, 2026
Back-fill the specs for the one commit merged since the last sync: workflow-security-audit takes zizmor's token from the environment instead of a sandboxed `$(gh auth token)`, security-issue-invalidate runs its last redirected `gh` call as a plain command, and the pre-PR adversarial-review block also covers skills that verify or import someone else's PR. Advance .last-sync to the current main. Generated-by: Claude Opus 5
potiuk
added a commit
to potiuk/magpie
that referenced
this pull request
Sep 28, 2026
- adversarial-review: the shared pre-PR review block also covers a skill working from someone else's PR, verifying or importing it. - repo-health-family: how workflow-security-audit gets zizmor's GitHub token without `$(gh auth token)`, and the clone fallback. - security-issue-lifecycle: invalidate's issue read is no longer redirected into a file. apache#1446 (grok reviewer backend) carried its own spec update. This branch's first commit updates vetted-command-surface for the installed-path change. .last-sync moves to the current main tip, 3e11608. Generated-by: Claude Code (Opus 5.5)
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from the security-family optimization (#1344).
Summary
--gh-token "$(gh auth token)"to zizmor. Under the secure setup aghinside$(…)stays sandboxed, cannot read its credentials, and fails. zizmor reads its token fromGH_TOKEN/GITHUB_TOKEN/ZIZMOR_GITHUB_TOKEN(usage docs), so the commands drop the flag. Without a token, the skill uses the clone path (a plaingh repo clone) or asks the user to run the remote scan from their own terminal.gh issue viewinto a file, which keeps the call sandboxed for the same reason. It now runs as a plain command, and the skill reads the JSON it prints.tools/dev/blocks/pre-pr-adversarial-review.mdopened with "Before this skill opens a PR". That does not fitsecurity-issue-import-from-pr, which opens no PR but imports one. The block now also covers a skill working from someone else's PR, verifying or importing it. It is regenerated into all 14 skills that carry it.Test plan
prek run --all-files(check-shared-blocks, token stamps, lychee)main) and after, outside the sandbox. Results are identical: release-announce-draft step-3 3/3, release-prepare step-14 2/2 and step-2 4/4, issue-fix step-7 5/6 (the same pre-existing case), import-from-pr step-6 3/3, setup-override-upstream step-6 3/3, setup-upstream-fix step-5 4/4.Part of #1344.
Generated-by: Claude Code (Opus 5.5)
🤖 Generated with Claude Code