Repository navigation
test(api): pin env redaction on preview and SSE payloads - #1408
Conversation
SEC-20b audit: preview output is built from named scalar fields and the lifecycle events are redacted in the store before the SSE layer sees them. Neither leaks. These tests fail if a field or an unredacted emit path is added.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Change: Other Merge Risk: ⚪ Minimal · up to
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
SEC-20b audit. Neither surface leaks runtime env.
Preview output is built from named scalar fields (containerName, currentImage, newImage, updateKind, isRunning, networks) plus fixed compose and portainer metadata. No details.env.
SSE lifecycle events (added, updated, removed, unhealthy) get their payload from store/container.ts, which already runs redactContainerRuntimeEnv at every emit site, the same helper GET /containers uses. Added and updated were already pinned. This adds tests for the removed and unhealthy payloads and for the exact preview field set.
Test only, held for 1.8.1.
🔒 Added a
Docker.previewtest that pins the six-field output and checks that runtime environment secrets are not exposed.🔒 Added tests for
removedandunhealthySSE payloads. They check that sensitive values are redacted and non-sensitive entries remain unchanged.