Proof Portal
litellm
BerriAI117 findings · 107 requirementsLiteLLM Python->Rust migration audit (proof mirroring).
93 withheld (location undisclosed)
validate_environment resolves the effective api_key as the caller-supplied key when truthy, otherwise the DEEPGRAM_API_KEY environment value, and returns a headers dict carrying a `Token <key>` Authorization value so every /listen request is authenticated
Specification
The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.
validate_environment resolves the effective api_key as the caller-supplied key when truthy, otherwise the DEEPGRAM_API_KEY environment value, and returns a headers dict carrying a Token <key> Authorization value so every /listen request is authenticated
the deepgram_audio_transcription shall always satisfy deepgram_auth_header_set
Verification & provenance
How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).
Review
- Status
- pending
History
- Created
- Jul 31, 2026, 00:00 UTC · Claude Code · AI agent
- Modified
- Aug 1, 2026, 18:01 UTC · Claude Opus 4 8 · AI agent
Hazard review
- scenarioreviewednominalempty_input
nominal is the header assembly from a caller-supplied key; empty_input is the absent caller key falling back to the DEEPGRAM_API_KEY environment lookup, which still sets a (possibly None-valued) Token Authorization header rather than omitting it
- propertyreviewedsecrets_not_loggedpure_function_property_tested
validate_environment places the resolved secret into the returned headers dict for the out-of-scope handler to send and never logs it at this boundary (secrets_not_logged); the always-sets-Token property is property-testable; determinism follows from the deterministic or-fallback and totality is trivial over the caller-key/env-key partition
- structuralnot applicable
Garbage-collected Python dict construction with an f-string over a trusted Token template; no manual memory, pointer arithmetic, overflow, or user-controlled format string
- domainreviewed
The header attachment is the nominal guarantee already evidenced; auth_required as a request-rejection/enforcement control belongs to the Deepgram endpoint that validates the Token, not to this pure header assembler. The env read is a process-config lookup, not an external service call, so the TLS and external-call-observability classes bind to the out-of-scope Deepgram HTTP call. control_not_silently_disabled (the fail-closed-on-setup-failure lens): when no key is available the code assembles a non-authenticating 'Token None' header rather than falling back to a weaker authenticated path, and Deepgram rejects it with 401, so the control degrades to a provider-side reject, not a silent auth bypass; the pure header assembler cannot fail the request closed itself
Change history
Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.
Review history
Human and AI-agent approvals of this requirement — the 'why was this approved' lineage, each with the reviewer's justification and the code it cites.
- Claude Code · AI agentApprovedSpec conformanceJul 31, 2026 · 4 months agoREVIEW-34
validate_environment resolves 'api_key or get_secret_str("DEEPGRAM_API_KEY")' (254) and returns a headers dict with Authorization='Token <key>'. FRETish deepgram_auth_header_set holds: a Token Authorization header is always set from the caller key or the environment fallback.
Cited code (1)
Obligations
What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.
4 obligations · 4 discharged
Browse the catalogueHappy-path behavior with valid inputs.
- nominalrequiredpresentCovered by 1 test
Behavior when inputs are absent, nil, zero-length, or blank.
- nominalrequiredpresentCovered by 1 test
Authorization headers, session IDs, secrets, and PII never appear in logs.
The resolved Deepgram API key is spliced into a log line or an exception message and persists in log storage; an operator or log-pipeline reader harvests the plaintext key, then drives unauthorized billed transcription against the caller's Deepgram account and pivots to any other service sharing the credential
- nominalrequiredpresentCovered by 1 test
- negativerecommendedpresentCovered by 1 test
A function declared pure (no I/O, no global state, output is f(input) only) shall carry property-based tests that exercise its declared algebraic properties (determinism, totality, commutativity, monotonicity, idempotency — whichever apply); example-based tests alone shall not be sufficient evidence for a pure-function obligation.
- nominalrequiredpresentCovered by 1 test
Formula evidence
The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).
Formula evidence
The formal formula behind this requirement, the variables it is written over, and the tests that exercise it (each term is explained inline).
FRETish formula
the deepgram_audio_transcription shall always satisfy deepgram_auth_header_set
Witnesses· 1 scenario total
- test_caller_key_sets_token_headerexercises 1 condition scenario
MC/DC truth table· 2 rows
Each row assigns the formula's conditions (T/F) and shows the Result— the formula's value for that input row, not a test pass/fail. A row proves a condition when flipping only that condition flips the outcome. The test that covers each row is linked.
mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test| # | deepgram_auth_header_set | Result | Proves | Covering test |
|---|---|---|---|---|
| 1 | F | F | deepgram_auth_header_set | Exempted · defensive — validate_environment unconditionally writes the Token Authorization key, so a request without the auth header is unreachable in a correct build (reviewed: agent:claude-opus-4-8) |
| 2 | T | T | deepgram_auth_header_set |
Its place
How this requirement connects — what proves it, what it affects, and what it rests on. Authored links only here; automatically derived links come from the audit index.
Loading graph…
Trace evidence
The concrete artifacts linked to this requirement — implementing code, verifying tests, documents, and the findings raised against it.
Mirrors
Ports this requirement participates in — it carries a reviewed exemption on one side, or a finding raised against it is tracked as part of the port.
Mirrors
Ports this requirement participates in — it carries a reviewed exemption on one side, or a finding raised against it is tracked as part of the port.
- Deepgram audio transcription: Python -> RustMIR-005DiffersPython → RustView in Mirrors
Impact
Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).
Impact
Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).
If you change this
Files to re-check (1)
- transformation.pylitellm/llms/deepgram/audio_transcription/transformation.py
Tests to re-run (1)
- test_deepgram_audio_transcription_transform_baseline.pytests/test_litellm/llms/deepgram/audio_transcription/test_deepgram_audio_transcription_transform_baseline.py
What this rests on
Discussions
Discuss this with the proof team. Nothing changes in your audit automatically — you open a request and a staff member records any outcome inside the thread.