You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shared graph cache: a too-short DIFFCI_GRAPH_CACHE_SECRET falls back to plaintext uploads #263
When DIFFCI_GRAPH_CACHE_SECRET is set but shorter than 16 characters, the shared graph cache ignores the secret and still enables the remote tier, so dependency graphs (which carry repository file paths) are uploaded as plaintext JSON under unhashed keys.
In configureGraphCache (packages/diffci-cli/src/client/shared-graph-cache.ts, lines 356–362), a short secret becomes undefined with the note DIFFCI_GRAPH_CACHE_SECRET ignored: it must be at least 16 characters, and RemoteGraphCache is then created with secret: undefined unless --redact-paths is also set. encodeEnvelope then writes encoding: "json" with the plain payload, and remoteCacheKey returns the local key unchanged.
A user who sets the secret is asking for client-side encryption. A typo or a short value silently turns that into plaintext uploads, and the note is easy to miss in CI logs.
This corresponds to DIFFCI_GRAPH_CACHE_SECRET=short diffci observe --shared-graph-cache with an https api-url and an api-token.
Environment
Linux, Node 24.
Output
The returned cache has a remote tier with no secret, and its uploads use encoding: "json".
What you expected
A secret that is set but too short should turn the shared tier off (with a note), the same way --redact-paths without a secret does, rather than fall back to plaintext uploads. The local tier can stay on.
Activity
fix(cli): treat an empty DIFFCI_GRAPH_CACHE_SECRET as too short, not …
fix(cli): turn the shared graph cache off when its secret is too short (