Skip to content

test(api): pin env redaction on preview and SSE payloads - #1408

Merged
scttbnsn merged 1 commit into
dev/v1.8from
fix/v1.8-redact-preview-sse-env
Oct 19, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.8from
fix/v1.8-redact-preview-sse-env

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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.preview test that pins the six-field output and checks that runtime environment secrets are not exposed.
🔒 Added tests for removed and unhealthy SSE payloads. They check that sensitive values are redacted and non-sensitive entries remain unchanged.

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.
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: CodesWhat/drydock/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: db2df396-b101-4719-b6c3-a28e3dc00009
📥 Commits

Reviewing files that changed from the base of the PR and between d22ed83 and dfc484e.

📒 Files selected for processing: 2
  • app/store/container.test.ts
  • app/triggers/providers/docker/Docker.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

📝 Walkthrough

Added tests for redaction of sensitive environment values in container-removal and unhealthy-transition event payloads. Added a Docker preview test that checks the output fields and excludes a secret from serialized output.

Priority: ⬇️ Low

Change: Other

Merge Risk: ⚪ Minimal · up to dfc48

This change adds regression coverage for secret redaction in container events and Docker preview output without changing runtime behavior. No actionable merge risk remains.

Pre-merge checks: Passed 2
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
drydock-website Ready Ready Preview Oct 19, 2026 8:15pm UTC
drydockdemo-website Ready Ready Preview Oct 19, 2026 8:15pm UTC

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch was successfully deployed

2 active deployments
Preview – drydock-website — dfc484e1 Deployed Oct 19, 2026 by vercel[bot]
Preview – drydockdemo-website — dfc484e1 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant