Skip to content

fix(links): redact credential-shaped opts by pattern, not by allowlist (CON-877) - #200

Open
howethomas wants to merge 1 commit into
mainfrom
fix/redact-opts-in-vendor-schema
Open

howethomas wants to merge 1 commit into
mainfrom
fix/redact-opts-in-vendor-schema

Conversation

@howethomas

Copy link
Copy Markdown
Contributor

Summary

Links copy their opts into analysis[].vendor_schema (and into log lines), each with its own hand-kept list of option names to drop. Any credential option added later is not on any of those lists, so it is written verbatim into every vCon the link touches, stored in Postgres and delivered to every downstream storage. That is how an OpenAI-compatible provider key (LITELLM_MASTER_KEY) ended up in transcribed vCons. Nine links had the same shape of bug.

This replaces the nine allowlists with one shared redactor, common/lib/redaction.py, that drops options by name pattern (key, token, secret, password, passwd, credential, proxy_url) plus the internal usage-reporting endpoint by exact name. An unknown credential now fails closed. Public metadata such as policy_url is kept.

Links changed: analyze, analyze_and_label, analyze_vcon, check_and_tag, deepgram_link, detect_engagement, groq_whisper, hugging_face_whisper, openai_transcribe. The links.transcribe dispatcher delegates to these modules, so it is covered.

Tests

  • common/tests/test_redaction.py: credential-shaped names dropped, unknown credential dropped, public URL kept, empty input.
  • openai_transcribe unit test now runs the link with LITELLM_MASTER_KEY and asserts it is absent from the stored analysis.
  • Suites for all nine links pass locally.

Fixes CON-877.

🤖 Generated with Claude Code

Links copy their `opts` into `analysis[].vendor_schema` and into log lines, each
with its own hand-kept list of names to drop. A provider key added later is not on
any of those lists, so it was written verbatim into every transcribed vCon and
stored downstream.

Match on the option name instead: anything containing key, token, secret, password,
credential or proxy_url is dropped, so an unknown credential fails closed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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