Repository navigation
fix(cli): turn the shared graph cache off when its secret is too short - #264
Merged
adityankale190895 merged 2 commits intoNov 18, 2026
Merged
Conversation
A DIFFCI_GRAPH_CACHE_SECRET under 16 characters was ignored and the remote tier still uploaded graphs, with their file paths, as plaintext. Fixes DiffCI#263 Signed-off-by: FredApps <[email protected]>
…unset
A workflow's ${{ secrets.DIFFCI_GRAPH_CACHE_SECRET }} is an empty string when the secret is missing,
which turned the shared tier on without encryption. An empty value now turns it off with the same note
as a short one.
Refs DiffCI#263
Signed-off-by: FredApps <[email protected]>
Contributor
Author
|
Cross-review (FredApps, head a3cdf0b). Not an approval. Checked
Fixed: a3cdf0b
Open: none. |
FredApps
marked this pull request as ready for review
November 18, 2026 00:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #263
Changed behavior
When
DIFFCI_GRAPH_CACHE_SECRETis set but shorter than 16 characters,configureGraphCacheno longer creates an unencrypted remote tier. The shared tier is turned off with the noteshared graph cache off: DIFFCI_GRAPH_CACHE_SECRET must be at least 16 characters, as--redact-pathswithout a secret already does. The local tier is unaffected, and the--no-send, endpoint and token checks still come first.Validation
tests/client/shared-graph-cache.test.ts: a five-character secret with an https api-url and a token. On main a remote tier without a secret is created. With this change there is no remote tier and the note is shown, without echoing the secret.node --import tsx --test tests/client/shared-graph-cache.test.ts: 17 passed.tsc --noEmit -p packages/diffci-cli: clean.