Skip to content

fix: sync hardening + env-gate from the shipped plugin (incl. answer-question.sh injection fix)#2

Merged
msolanas merged 2 commits into
mainfrom
sync/plugin-hardening
Jun 10, 2026
Merged

fix: sync hardening + env-gate from the shipped plugin (incl. answer-question.sh injection fix)#2
msolanas merged 2 commits into
mainfrom
sync/plugin-hardening

Conversation

@msolanas

Copy link
Copy Markdown
Contributor

Summary

Reverse-sync from the shipped plugin source, which is the source of truth — the public repo had fallen behind it everywhere. Highlights:

  • Security: replaces answer-question.sh (added in 4c4b682) — that version passed --answer through awk -v, which expands escape sequences, letting a crafted answer forge new ### Q-… / - **Answer:** blocks in inbox.md. The replacement enforces single-line answers and writes the canonical shape. Also adds the UNTRUSTED-title paraphrase guardrails to INCORPORATE/TRIAGE//redeye:tasks.
  • Concurrency: archive-task.sh now holds one project-wide lock across read-range → append → rewrite (the per-month lock raced the tasks.md rewrite); create-task.sh always takes its internal mkdir lock (the lock.sh-exists shortcut left ID allocation racing); digest.sh uses mktemp temp names.
  • Robustness: stop-hook frontmatter extraction survives missing keys under set -euo pipefail; init-project.sh works in non-git directories, supports first_task_description, and gitignores .redeye/env-status.json.
  • env-gate: BUILD/DEPLOY mark .redeye/env-status.json stable:false on entry; VERIFY marks stable:true only when assessed healthy.
  • Codex/CT write path: add-steering.sh (+ steer/pause/stop/status wiring), edit-schedule.sh, AGENTS.md.
  • CI: bats workflow + the missing test files.

Test plan

  • bats tests/ 193/193 on this tree
  • CI on this PR

🤖 Generated with Claude Code

Bitmia and others added 2 commits June 10, 2026 11:58
Brings the public repo to parity with the shipped plugin (which is the
source of truth): UNTRUSTED-title guardrails in INCORPORATE/TRIAGE/tasks,
stop-hook set -e resilience, create-task lock fix (always take the
internal mkdir lock), archive-task single project-wide lock (fixes a
cross-month rewrite race), create-question parameter-expansion trim,
digest mktemp temp files, init-project non-git guard +
first_task_description + env-status gitignore, env-gate writes in
BUILD/DEPLOY/VERIFY, deterministic steering write path (add-steering.sh
+ steer/pause/stop/status wiring), edit-schedule.sh, AGENTS.md, and a
hardened answer-question.sh replacing the awk -v variant (which expanded
escape sequences from --answer; the replacement enforces single-line
answers). Adds the bats CI workflow and the missing test files;
bats tests/ = 193/193.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@msolanas
msolanas merged commit df333d6 into main Jun 10, 2026
1 check passed
@msolanas
msolanas deleted the sync/plugin-hardening branch June 10, 2026 10:05
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