Skip to content

0.3.5: stop pre-denying heredoc-fed file writes in Bash - #3

Merged
TAJD merged 1 commit into
mainfrom
dev-heredoc-audit-fix
Oct 5, 2026
Merged

TAJD merged 1 commit into
mainfrom
dev-heredoc-audit-fix

Conversation

@TAJD

@TAJD TAJD commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • bashWriteIntent no longer flags a redirect or tee fed by a heredoc as an in-place edit requiring Edit/Write — it now falls through to the existing pre/post snapshot audit, same as any other Bash command.
  • sed/perl in-place edits and interpreter one-liners that call a write API are unaffected — still denied.
  • Added a version-parity bump (package.json + plugin.json to 0.3.3) and CHANGELOG entry.

Why

Flagged as a live false-positive during the DEV harness work: a heredoc-based script-generation approach was blocked mid-task even though the post-audit mechanism (added in 0.3.0) already diffs the resulting file correctly for comment additions.

Test plan

  • node --test tests/bash.test.mjs tests/hook.test.mjs — 154/154 pass
  • New end-to-end test: heredoc write allowed pre-emptively, then caught post-hoc if it adds a comment

🤖 Generated with Claude Code

https://claude.ai/code/session_01HWGRbfkVDRi5NfDCwudC5C

A heredoc redirect or tee (e.g. cat <<EOF > script.sh) was being
flagged the same as sed/perl in-place edits and pre-emptively denied,
forcing Edit/Write for a case the existing pre/post snapshot audit
already handles correctly. Reported as live friction: it blocked a
working script-generation approach mid-task.

Rebased onto 0.3.4 (temp-dir exemption + all-targets check); renumbered
from 0.3.3, which #4 already used.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcfZR5roFkrPHCxKBUgdoC
@TAJD
TAJD force-pushed the dev-heredoc-audit-fix branch from b09f71d to c3e0cd4 Compare October 5, 2026 07:18
@TAJD TAJD changed the title 0.3.3: stop pre-denying heredoc-fed file writes in Bash 0.3.5: stop pre-denying heredoc-fed file writes in Bash Oct 5, 2026
@TAJD
TAJD merged commit f061739 into main Oct 5, 2026
7 checks passed
@TAJD
TAJD deleted the dev-heredoc-audit-fix branch October 5, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant