Skip to content

Fixes #28299: mask service version secrets from 2.1.0 too - #38187

Closed
Khairajani wants to merge 1 commit into
mainfrom
mask-versions-from-2.1.0
Closed

Khairajani wants to merge 1 commit into
mainfrom
mask-versions-from-2.1.0

Conversation

@Khairajani

@Khairajani Khairajani commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #28299

Follow-up to #37975, from the review of its backports.

  • Runs from 2.1.0 too: a database that recorded 2.1.0 before the 2.0.9 step existed (a 2.1 release candidate) never runs 2.0.9's data migration again, so its version history stayed plain text. The step now also runs from the 2.1.0 migration. It only changes plain text values, so running it twice changes nothing.
  • secret: values are masked: the database secrets manager reads a value starting with secret: as part of a password, so skipping that prefix left such passwords in plain text. A secret manager reference in an old version is never resolved, so masking it loses nothing.
  • ServiceVersionSecretsMaskingTest failed first on a secret:prod-password token, and passes now (MySQL and Postgres). MigrationCodeFingerprintTest passes.
  • End-to-end: a 2.0.7 database with 248 seeded services, upgraded to the current 2.1 branch (records 2.1.0, 450 plain text markers left in version rows), then to this branch. 2.0.9's data migration was skipped, the 2.1.0 step masked 146 of 490 versions, and no plain text marker is left in any version row.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

This PR extends masking of secrets in service version history to databases already at 2.1.0 and to values beginning with secret:.

  • 2.1.0 upgrades now mask secrets in saved service versions.
  • Saved service versions now hide secret: values too.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "Mask service version secrets from 2.1.0 ..." · Reviewed by Greptile

@gitar-bot

gitar-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk

The 2.1.0 migration irreversibly masks plaintext secrets, including secret: values, in historical service versions, making original values unavailable if later needed.

Extends the service version secrets masking migration to run from 2.1.0 as well as 2.0.9, so databases that recorded 2.1.0 before the 2.0.9 step existed also get their version history masked, and includes secret: prefixed values in the masking. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@Khairajani

Copy link
Copy Markdown
Contributor Author

Folded into #38117.

@Khairajani Khairajani closed this Nov 19, 2026
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.

Sftp Service connection details contain unmasked password

1 participant