Skip to content

fix: anchor allowlist host pattern and surface caveman stderr (#3, #5) - #8

Merged
Gmulti merged 1 commit into
developfrom
fix/issues-3-5
Apr 30, 2026
Merged

fix: anchor allowlist host pattern and surface caveman stderr (#3, #5)#8
Gmulti merged 1 commit into
developfrom
fix/issues-3-5

Conversation

@Gmulti

@Gmulti Gmulti commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Two small, independent security/DX fixes from the v0.1.0 read-through.

# What File
#3 Anchor curl allowlist host (medium-severity token-leak hardening) .claude/settings.json, src/skills/umbrella/references/permissions.md
#5 Stop swallowing caveman stderr in build script scripts/build.sh

#3 — Allowlist host pattern

*public-api.wp-umbrella.com* matched lookalike hosts where public-api.wp-umbrella.com appears anywhere in the URL string:

  • https://public-api.wp-umbrella.com.attacker.tld/... (suffix attack)
  • https://attackerpublic-api.wp-umbrella.com/... (prefix attack)
  • https://example.com/?leak=public-api.wp-umbrella.com (hostname in query string)

A prompt-injected response that nudged the agent toward one of those URLs would auto-approve and leak the bearer token. Anchored to https://public-api.wp-umbrella.com/* in both the project allowlist and the user-facing copy in permissions.md.

Heads-up for existing installs: users who copy-pasted the loose pattern into ~/.claude/settings.json should update theirs to the new form. Worth a one-liner in the next release notes.

#5 — Caveman stderr

compress_file did >/dev/null 2>&1, hiding the underlying caveman error on every failure — only the generic ERROR: caveman compression failed for $file line surfaced. The comment above the redirect only ever mentioned silencing stdout, so the 2>&1 was unintentional. Dropped it. Stdout still goes to /dev/null (matches original intent), stderr now passes through.

Build verification

  • UMBRELLA_SKIP_COMPRESS=1 bash scripts/build.sh✓ Build complete — 8 markdown file(s) copied
  • diff -r src/skills skills → empty (v0 parity preserved)
  • Only the expected 4 files in the diff: .claude/settings.json, scripts/build.sh, src/skills/umbrella/references/permissions.md, skills/umbrella/references/permissions.md

Test plan

  • Verify allowlist still auto-approves a real call to https://public-api.wp-umbrella.com/projects with a Bearer token
  • Verify allowlist now prompts for https://public-api.wp-umbrella.com.example.com/
  • Trigger a caveman failure (e.g. claude not on PATH won't trigger this since the script short-circuits — easiest is to temporarily make claude -p exit 1) and confirm the underlying message reaches the build log

Closes #3, closes #5.

Closes #3, closes #5.

#3 — `*public-api.wp-umbrella.com*` matched lookalike hosts
(`public-api.wp-umbrella.com.attacker.tld`, `attackerpublic-api.wp-umbrella.com`,
or any URL with the hostname in the query string), so a prompt-injected URL
could exfiltrate the bearer token without a confirmation prompt. Anchored to
`https://public-api.wp-umbrella.com/*` in both `.claude/settings.json` and
`src/skills/umbrella/references/permissions.md`. Users who copy-pasted the
loose pattern into `~/.claude/settings.json` should update it.

#5 — `compress_file` redirected `>/dev/null 2>&1`, but the comment only
mentioned silencing stdout. When caveman failed, the underlying error was
hidden and the build only printed the generic wrapper message. Dropped
`2>&1` so stderr flows through to the build log on failure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Gmulti
Gmulti merged commit 7ae09bc into develop Apr 30, 2026
1 check passed
@Gmulti
Gmulti deleted the fix/issues-3-5 branch April 30, 2026 03:46
Gmulti added a commit that referenced this pull request Apr 30, 2026
fix: anchor allowlist host pattern and surface caveman stderr (#3, #5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant