Skip to content

fix(store): keep the reveal control for URL credentials after storage (#1523) - #1538

Merged
scttbnsn merged 1 commit into
dev/v1.8from
fix/v1.8-url-env-reveal
Nov 2, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.8from
fix/v1.8-url-env-reveal

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Found while checking #1523 before the next candidate. A credential that's only detectable from the URL, like MY_DSN=postgres://u:p@h/db, lost its reveal control once stored: the store wrote [REDACTED] and dropped sensitive, so nothing could re-derive it. AgentClient stripped the marker the same way. Values were never exposed.

This keeps sensitive: true on redacted entries only, the way 1.7 does, and the agent normalizer keeps a marker that's exactly true. Tests check that no raw value lands in the stored JSON.

Rows already stored by rc.10 have no marker, so a URL-only entry stays unrevealable until the next watcher refresh re-stores it.

Push gate passed. API payload tested. The rendered button and a live agent round trip weren't exercised.

Changelog

  • 🔒 Fixed: Storage redacts sensitive environment values and retains sensitive: true, so URL credentials remain classified after their values become [REDACTED].
  • 🔧 Changed: isSensitiveEnvEntry recognizes [REDACTED] as sensitive only when sensitive is exactly true.
  • 🔧 Changed: ContainerRuntimeEnv accepts an optional sensitive flag. AgentClient.buildContainerReport preserves it only when it is exactly true.
  • 🧪 Tests cover storage, API serving, and agent normalization. Test-run results were not supplied.

Concerns

  • Existing stored entries without the marker remain unrevealable until a watcher refresh stores them again.
  • The rendered reveal control and a live agent round trip were not tested, according to the supplied PR description.

…als still reveal (#1523)

A URL-only credential is stored as [REDACTED], which the classifier can't
re-parse, and the storage redactor and agent normalizer dropped the marker.
Persist sensitive: true on redacted entries, keep it on the agent path, and
let the classifier trust it, as the 1.7 line does.
@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 facc8c3 and a089807.

Files ignored due to path filters: 1
  • CHANGELOG.md is excluded by !CHANGELOG.md
Files selected for processing: 8
  • app/agent/AgentClient.test.ts
  • app/agent/AgentClient.ts
  • app/api/container/shared.test.ts
  • app/api/container/shared.ts
  • app/model/container.ts
  • app/store/container.test.ts
  • app/store/update-operation.test.ts
  • app/watchers/providers/docker/Docker.inventory.test.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

Runtime environment entries now support an optional boolean sensitive marker. Agent report construction retains the marker only when it is true. Storage redaction adds sensitive: true to redacted entries, and sensitivity classification recognizes marked redacted values. Tests cover API responses, storage operations, snapshots, and Docker inventory events.

Possibly related issues

  • CodesWhat/drydock issue 1523: The issue reports plaintext sensitive values in details.env; this change preserves the redaction marker on sensitive entries and covers redaction through storage.

Possibly related PRs

  • CodesWhat/drydock#1533: This PR continues the storage redaction and AgentClient normalization work by retaining sensitive: true.
  • CodesWhat/drydock#1534: Both PRs change the sensitive environment-entry shape used by storage redaction.
  • CodesWhat/drydock#1527: This PR updates the redaction output and AgentClient normalization used by the environment redaction and reveal implementation.

Change: Bug fix

Merge Risk: Minimal · up to a0898

URL credentials retain their reveal marker after storage. No merge-blocking risk was identified.

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 a3b4026 into dev/v1.8 Nov 2, 2026
34 checks passed
@scttbnsn
scttbnsn deleted the fix/v1.8-url-env-reveal branch November 2, 2026 03:32
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