Proof Portal

Project overview

litellm

BerriAI117 findings · 107 requirements

LiteLLM Python->Rust migration audit (proof mirroring).

93 withheld (location undisclosed)

All requirements
RequirementSW-REQ-260812-JYJJSoftwareDraft

The master-key extractor shall compare the presented bearer token against the configured master key in constant time using subtle::ConstantTimeEq, so token acceptance timing does not leak the master key byte-by-byte

All automated checks pass and 2/2 obligations are satisfied. Human review is still pending.
PriorityshallTypeguaranteeCategoryfunctionalComponentrust_ai_gateway_authAssuranceEFindingsnone open

Specification

The requirement exactly as authored — its complete prose text and, where present, the formal FRETish sentence it compiles to.

Description

The master-key extractor shall compare the presented bearer token against the configured master key in constant time using subtle::ConstantTimeEq, so token acceptance timing does not leak the master key byte-by-byte

FRETish formula
when token_present the rust_ai_gateway_auth shall always satisfy constant_time_token_compare
View full formal model

Rationale & tags

Why this requirement exists, and how it is categorised.

auth/mod.rs uses subtle ct_eq (guarded); N5 records that the slice ct_eq short-circuits on a length mismatch, leaking only the non-secret configured key length

Verification & provenance

How this requirement was checked: the review trail, edit history, and the machine-analysis status terms (each ⓘ explains what it means).

Assurance levelE
Formalizationvalid
Strategyfretish

Review

Status
pending

History

Created
Aug 12, 2026, 15:01 UTC · Claude Opus 4 8 · AI agent
Modified
Aug 12, 2026, 15:01 UTC · Claude Opus 4 8 · AI agent

Change history

Every recorded revision of this requirement's source file — newest first, each with its commit message and the diff for that change.

Obligations

What this requirement must witness to be considered satisfied — the required evidence, and the tests that discharge each one.

2 obligations · 2 discharged

Browse the catalogue
Discharged

Cryptographic equality checks (MAC tags, signatures, secrets) shall use constant-time comparison.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered by 1 test
  • negativerecommendedpresent
    Covered by 1 test
Discharged

Happy-path behavior with valid inputs.

Discharging evidence1/1 required witnessed
  • nominalrequiredpresent
    Covered 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).

FRETish formula

when token_present the rust_ai_gateway_auth shall always satisfy constant_time_token_compare

MC/DC truth table· 3 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.

Covereda test exercises this rowExempteda reviewed mcdc:ignoreNo-actionfalse-result row satisfied by designUncoveredneeds a covering test
#constant_time_token_comparetoken_presentResultProvesCovering test
1FFTtoken_presentUncovered
2FTFconstant_time_token_compareUncovered
3TTTconstant_time_token_compareUncovered

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.

No implementation linked

No source files are traced to this requirement yet.

Impact

Blast radius — authored trace links only (automatically derived links come from the audit index and aren't shown here).

If you change this

Requirements
0
Files
1
Tests
0
At-risk contracts
0

Files to re-check (1)

  • mod.rslitellm-rust/crates/ai-gateway/src/auth/mod.rs

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.

Sign in to discuss this with the proof team.Sign in