Security: Harden GitHub Actions workflows for public hook submissions#444
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wraps curl + parse_etherscan.py into a standalone script for use in the hardened analyze-hook workflow. Includes unit tests with mock responses. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
marktoda
force-pushed
the
security/workflow-hardening
branch
from
April 2, 2026 20:28
69838a8 to
f90f2b1
Compare
msarkor718
self-requested a review
April 2, 2026 20:33
msarkor718
approved these changes
Apr 3, 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.
Security: Harden GitHub Actions workflows for public hook submissions
Problem
The current
analyze-hook.ymlgives Claudecontents: write,git,gh, andpython3access — triggered by anyone opening an issue. This means arbitrary repo writes, shell injection via hook names, validator/prompt tampering from PR head checkout, and API key exposure to the LLM.Solution
Split Claude's god-mode into a read-only analysis step (structured JSON output,
Read/Greponly) plus deterministic script steps for all writing, git, and PR operations.Workflow changes:
gh pr merge --auto.hooks/.--body-file(not shell-interpolated--body). Real--approvefor auto-merge.New scripts:
prefilter.py,fetch_source.py,compute_flags.py,assemble_hook.py,sync_chains.py— 28 new tests.Other fixes:
id-token: writeremoved from all workflowsETHERSCAN_API_KEYscoped only to fetch steps, never passed to Claudeclaude-code-actionupgraded from v1.0.75 to latestchains.json(removedxlayer,tempo)Branch protection required after merge
validate,review