Skip to content

v0.71.5 dropped --ignore-scripts from compiled npm install steps for claude-code / codex CLIs (supply-chain regression) #30832

@jbaruch

Description

@jbaruch

Summary

gh aw compile in v0.71.5 emits npm install -g @anthropic-ai/claude-code@<version> (and the equivalent @openai/codex@<version> for the codex engine) WITHOUT the --ignore-scripts flag in the generated lock files. v0.71.0 emitted npm install --ignore-scripts -g @anthropic-ai/claude-code@<version>. Comparing two compiled .lock.yml files from the same source markdown:

- run: npm install --ignore-scripts -g @anthropic-ai/claude-code@2.1.112
+ run: npm install -g @anthropic-ai/claude-code@2.1.126

Why this matters

The npm install step runs on the host runner BEFORE the awf firewall sandbox starts. Without --ignore-scripts, postinstall scripts in the dependency tree of @anthropic-ai/claude-code (or @openai/codex) execute with full host-runner access — including all secrets the workflow has loaded for itself (ANTHROPIC_API_KEY / OPENAI_API_KEY / CODEX_API_KEY / TESSL_TOKEN / GITHUB_TOKEN). A compromised transitive dependency in either CLI's tree could exfiltrate those secrets between npm-install and firewall-start, with no network egress restriction yet in place.

This is the exact supply-chain attack class --ignore-scripts was added to mitigate. The v0.71.0 lock files had it; the v0.71.5 lock files do not.

Reproduction

gh extension install githubnext/gh-aw --pin v0.71.0
gh aw compile review-anthropic.md
grep "npm install.*claude-code" review-anthropic.lock.yml
# → npm install --ignore-scripts -g @anthropic-ai/claude-code@2.1.112

gh extension remove gh-aw
gh extension install githubnext/gh-aw --pin v0.71.5
gh aw compile review-anthropic.md
grep "npm install.*claude-code" review-anthropic.lock.yml
# → npm install -g @anthropic-ai/claude-code@2.1.126

The flag drop is in the compiled-template path, not in the source markdown — the source has the same engine: claude block in both runs.

Fix

Restore --ignore-scripts to the npm install steps in the compiled-template generation for both the claude and codex engines. This is a per-engine compile-template change, no source-markdown impact for consumers.

Workaround we're shipping

In jbaruch/coding-policy-evals PR #12 we re-add the flag via a post-compile sed on the four affected lock files. We'll drop the workaround once a gh-aw release with the flag restored ships.

sed -i 's|npm install -g @anthropic-ai/claude-code|npm install --ignore-scripts -g @anthropic-ai/claude-code|g; s|npm install -g @openai/codex|npm install --ignore-scripts -g @openai/codex|g' .github/workflows/*.lock.yml

Affected versions

Confirmed in v0.71.5 (latest stable). v0.71.6 and v0.72.0 are pre-release; haven't checked whether the regression persists there.

Related context

Discovered while bumping jbaruch/coding-policy-evals from v0.71.0 to v0.71.5 to pick up working AWF binaries (the v0.25.28 release v0.71.0 pinned was yanked from github/gh-aw-firewall, breaking install on a 404). Now we're between two regressions — older gh-aw is broken on AWF download, newer gh-aw is broken on supply-chain hardening — and have to patch one. Patching --ignore-scripts back is the smaller surface; we'd like to retire the workaround when this is fixed upstream.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions