Skip to content

state-sync.sh pushes full raw logs and transcripts to the state repository with no redaction pass

Id: TD-PPagop-26082410 · Status: resolved · Filed: 2026-08-24 · Resolved: 2026-09-08 · Ref: https://github.com/Pullwright/agent-ops/pull/1295 · Review: reviews/project-review-2026-08-23 R-05 F-DATA-01

Severity: Medium

scripts/state-sync.sh’s push path commits log.jsonl, review-log.jsonl, cycles/, reviews/, and cron logs — full per-stage transcripts — to the private agent-ops-state repository, with no call to anything resembling scripts/publish-dashboard.sh’s redact(), which already strips GitHub/Anthropic token-shaped strings and home-directory paths from the dashboard’s published payload as defence-in-depth. log.jsonl is deliberately never rotated, so this is a long-lived, growing surface.

The dashboard path got a redaction pass because it publishes to a semi-public (Tailscale-exposed) surface; the state-sync path was likely never revisited with the same lens because its destination (a private repository) felt lower-risk, even though it carries much more raw content.

Ongoing cost: nothing backstops a token or secret that ends up in a stage’s stdout/stderr (a verbose git/curl error, an accidental set -x, a future bug) before it is committed, unredacted, to a second repository and retained indefinitely.

Suggested fix: apply scripts/publish-dashboard.sh’s existing redact() (or an equivalent, transcript-shaped pass) to whatever state-sync.sh pushes, reusing its pattern set rather than writing a second implementation. Add a unit test mirroring the dashboard’s own redaction test.

Migrated to https://github.com/Poetic-Poems/agent-ops/issues/966.