Skip to content

Bridges write signed audit lines without message text - #443

Merged
AVADSA25 merged 1 commit into
mainfrom
bridges-audit
Oct 7, 2026
Merged

AVADSA25 merged 1 commit into
mainfrom
bridges-audit

Conversation

@AVADSA25

@AVADSA25 AVADSA25 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

What

The iMessage and Telegram bridges each had their own audit(msg) that appended a plain-text line to ~/.codec/audit.log, for example [time] IMESSAGE: RECEIVED from=... text=<first 100 characters>. Those lines have no JSON or HMAC, so verify_audit_log() counted each one as broken and Settings > Audit reported a failed integrity check after every bridge restart (the "2 broken lines" seen on 6 and 7 Oct; docs/known-issues.md).

Both now emit through codec_audit.log_event: bridge_service_start / bridge_service_stop, bridge_message_received, bridge_reply_sent, bridge_photo_received, with the sender or chat and the length. The message text is no longer logged. Event table added to docs/codec-architecture.md; known issue marked fixed.

Checks

  • tests/test_bridge_audit.py: one structured line per event without text, no direct writer left, the log verifies with 0 broken lines. Negative control on main's bridges: 5 failed. Empty HOME: passed.
  • Bridge, lifecycle and secrets tests: 115 passed. ruff clean.

Deploy

No dashboard code. codec-imessage and codec-telegram keep writing the old lines until Mickael restarts them (both answer nobody today: no allowlist in config).

🤖 Generated with Claude Code

codec_imessage and codec_telegram each appended a plain-text line to
~/.codec/audit.log (`[time] IMESSAGE: RECEIVED from=... text=...`), with the
first 100 characters of each message. verify_audit_log() counted every one as
broken, so Settings > Audit reported a failed integrity check after each bridge
restart. They now emit bridge_service_start/stop, bridge_message_received,
bridge_reply_sent and bridge_photo_received through codec_audit.log_event: who
and how long, never the text. Event table in docs/codec-architecture.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AVADSA25
AVADSA25 merged commit 1537748 into main Oct 7, 2026
1 check passed
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.

2 participants