Skip to content

refactor(component): share one secret-mask helper - #1414

Closed
scttbnsn wants to merge 1 commit into
dev/v1.8from
refactor/v1.8-one-mask-helper
Closed

scttbnsn wants to merge 1 commit into
dev/v1.8from
refactor/v1.8-one-mask-helper

Conversation

@scttbnsn

Copy link
Copy Markdown
Contributor

DR-15. One secret-mask helper on the shared Component base. Held for 1.8.1.

Component.mask(value: unknown) returns [REDACTED] for any value that is present and non-empty after String() coercion, and undefined for null, undefined and ''. Numbers (0 included), booleans, objects, non-empty arrays and whitespace strings are all masked. New instance method Component.maskFields(fields) returns a copy of the configuration with those flat fields masked.

Removed: BaseRegistry.maskSensitiveFields, Trigger.maskFields, and the hand-rolled copies in Docr and Ecr. No aliases left.

Call sites, 50 total:

  • 31 maskFields([...]) calls: 14 registry providers (acr, alicr, custom, dhi, gar, gcr, ghcr, gitlab, hub, ibmcr, mau, ocir, quay, SelfHostedBasic), Docr and Ecr (previously hand-rolled), and 15 trigger providers (apprise, discord, googlechat, gotify, ifttt, matrix, mattermost, mqtt, portainer, pushover, slack, smtp, teams, telegram)
  • 19 direct Component.mask() calls for nested secrets: Agent, Basic, Oidc, Http, Kafka, Ntfy, Rocketchat, Docker watcher (call sites unchanged, new coercion rules)

Visible changes:

  • Trigger fields masked strings only. Non-string secrets (numbers, booleans) are now redacted too.
  • Registry fields masked on truthiness. 0 and false are now redacted.
  • Docr and Ecr no longer emit undefined keys for unset secret fields (invisible in JSON).
  • Output format is [REDACTED] everywhere already, so no format change.

Tests: table test for mask and maskFields in Component.test.ts. Existing maskConfiguration tests pass unchanged. Targeted run of registries, triggers, registry, agent, authentications and watchers: 222 files, 9116 passed. Push gate green including coverage.

Component.mask now redacts any present, non-empty value after String() coercion, and Component.maskFields replaces BaseRegistry.maskSensitiveFields, Trigger.maskFields and the hand-rolled Docr and Ecr copies.
@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 9:02pm UTC
drydockdemo-website Ready Ready Preview Oct 19, 2026 9:02pm UTC

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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.

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

scttbnsn added a commit that referenced this pull request Oct 20, 2026
* refactor(app): share error, sleep and status helpers (#1423)

* refactor(component): share one secret-mask helper (#1414)

* feat(api): name the caller behind removed-API hits (#1402)

* refactor(ui): share the search-from-query logic (#1418)

* refactor(ui): seed the operations store from the container list (#1428)

* build(docker): use Alpine's patched zlib and drop the custom build (#1417)

* chore(license): relicense from AGPL-3.0 to MIT (#1410)

* docs(changelog): one heading per section in Unreleased
@scttbnsn

Copy link
Copy Markdown
Contributor Author

Landed in #1434 as part of folding the reviewed 1.8 work into 1.8.0.

@scttbnsn scttbnsn closed this Oct 20, 2026
@scttbnsn
scttbnsn deleted the refactor/v1.8-one-mask-helper branch October 20, 2026 14:20

This branch was successfully deployed

2 active deployments
Preview – drydock-website — 91ed301f Deployed Oct 19, 2026 by vercel[bot]
Preview – drydockdemo-website — 91ed301f 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