Skip to content

fix(store): redact *_KEY env values in the JSON store (#1523) - #1535

Merged
scttbnsn merged 2 commits into
dev/v1.7from
fix/v1.7-key-env-redaction
Nov 2, 2026
Merged

scttbnsn merged 2 commits into
dev/v1.7from
fix/v1.7-key-env-redaction

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Same fix as the 1.8 PR, for the 1.7 JSON store (#1523). KEY is now an exact sensitive segment, plus CLIENTKEY, SIGNINGKEY and ACCESSKEY, and the missing eye icon is added.

1.7 has no scrub marker. The scrub runs on every start and only rewrites changed docs, so stores cleaned by rc.4 pick up the new names automatically. A test seeds an rc.4-shaped store and checks the secrets are gone and a second start logs nothing.

Old store backups aren't scrubbed. Push gate passed. Reveal icon checked by tests and reading callers, not rendered.

Changelog

  • 🔒 Security: Extend sensitive-key detection to include exact KEY segments and the ACCESSKEY, CLIENTKEY, and SIGNINGKEY names. Add startup redaction for persisted container environment values, with counts-only logging and saves only when startup cleanup changes the store.
  • ✨ Added: Add regression tests for key redaction, startup cleanup, repeat-start logging, and redacted runtime-detail comparisons.
  • 🐛 Fixed: Add the eye icon mapping for supported icon libraries. Add icon mapping tests.

Concerns

  • The tests verify icon mappings, but do not verify that the environment reveal button or login password toggle renders the icon.
  • Test execution and push-gate results were not established by the supplied change summary.

The env reveal button and the login password toggle asked for 'eye', which
had no entry, so icon() returned the raw name and nothing rendered.
ENCRYPTION_KEY, LITELLM_MASTER_KEY and similar stayed plaintext because the
container redaction list had no KEY rule while the debug dump did. Add KEY as
an exact segment plus the CLIENTKEY, SIGNINGKEY and ACCESSKEY compounds. HASH
is left out: GIT_COMMIT_HASH style names are ordinary.

The startup scrub runs on every start, so stores rc.4 already cleaned pick up
the new names on the next start. It now logs how many values in how many
containers it redacted, counts only.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 2b351e6 and 9b03544.

Files ignored due to path filters: 1
  • CHANGELOG.md is excluded by !CHANGELOG.md
Files selected for processing: 8
  • app/api/container/shared.test.ts
  • app/api/container/shared.ts
  • app/store/index.runtime-env.test.ts
  • app/store/index.ts
  • app/watchers/providers/docker/runtime-details.test.ts
  • ui/src/icons.ts
  • ui/tests/composables/useIcons.spec.ts
  • ui/tests/icons.spec.ts

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

Walkthrough

The change expands sensitive-key detection to cover additional key names. On startup, the store redacts matching values in persisted container environments, reports newly redacted values and affected containers, and saves startup repairs. Tests cover startup cleanup and redacted runtime-value comparisons. The UI icon map adds eye entries for supported libraries, with tests for icon resolution and bundle references.

Possibly related issues

Possibly related PRs

  • CodesWhat/drydock#1533 — Adds write-time redaction and startup scrubbing for container runtime environment values in the same store; this change expands the key detection and startup repair behavior.
  • CodesWhat/drydock#1527 — Adds sensitive environment redaction and comparison of redacted runtime details; this change expands the key patterns and tests that comparison.

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: Minimal · up to 9b035

No actionable merge-blocking risk remains from the reviewed changes.

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
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

@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn
scttbnsn merged commit b8c29f0 into dev/v1.7 Nov 2, 2026
29 checks passed
@scttbnsn
scttbnsn deleted the fix/v1.7-key-env-redaction branch November 2, 2026 01:28
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