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
[Bug]: Credential-masking snapshot cache misses same-length store rewrites within mtime granularity (Windows) #6923
Follow-up to #6918, which added exact masking of configured credentials in upstream diagnostics. The credential snapshot it reads from the config and auth stores is cached. If a store is rewritten with the same byte length within the filesystem's mtime granularity, which is coarse on Windows, the cache keeps returning the previous view.
This was observed on Windows CI. tests/usage/upstream-failure-diagnostics.test.ts:740, "an existing store with an unexpected shape is incomplete", failed on windows 4/9 (Cross-platform CI run 38092953319, attempt 1, on PR #6913's head; that PR does not touch this code). The test rewrites providers: [] as {}: the same length, within the same mtime tick.
Impact: for one granularity window, the masking set can lag a credential store change. The guard is meant to fail closed when a store is malformed, but it can instead keep serving the stale, complete-looking view. Expected: cache validation must not depend only on (mtime, size). Add a content hash, or invalidate on every write the proxy itself performs, so a same-length rewrite is always seen.
Reproduction
On Windows (NTFS), or any filesystem with coarse mtime: rewrite the provider config with a same-length but differently shaped providers value within one mtime tick, then evaluate the diagnostics guard. It returns the old snapshot instead of failing closed. Run bun test tests/usage/upstream-failure-diagnostics.test.ts -t "unexpected shape" repeatedly on a Windows runner.
Acknowledged, @lidge-jun. I am keeping this report open for explicit maintainer boundary review rather than treating a passing fixture or test-only follow-up as proof of remediation.
This is receipt/coordination only: I have not run a security/privacy scan, reproduced or assessed the report, implemented a fix, or supplied an approval. It should not be interpreted as accepted impact, verified remediation or release clearance.
Please keep any new undisclosed technical detail, sensitive evidence or follow-up to a private report in the private reporting channel described in SECURITY.md. No new technical details are requested for this public thread.
Activity
Ingwannu commentedon Oct 11, 2026
Acknowledged, @lidge-jun. I am keeping this report open for explicit maintainer boundary review rather than treating a passing fixture or test-only follow-up as proof of remediation.
This is receipt/coordination only: I have not run a security/privacy scan, reproduced or assessed the report, implemented a fix, or supplied an approval. It should not be interpreted as accepted impact, verified remediation or release clearance.
Please keep any new undisclosed technical detail, sensitive evidence or follow-up to a private report in the private reporting channel described in SECURITY.md. No new technical details are requested for this public thread.
fix: verify configured credentials by content, route the tray to the …
lidge-jun commentedon Oct 11, 2026
Fixed on dev by #6949 (b1f39cd): credential snapshot freshness now uses a content digest.