Skip to content

internal: Add support for 'sensitive' JSON tag for bundle config fields#5896

Open
andrewnester wants to merge 9 commits into
mainfrom
feat/sensitive-fields
Open

internal: Add support for 'sensitive' JSON tag for bundle config fields#5896
andrewnester wants to merge 9 commits into
mainfrom
feat/sensitive-fields

Conversation

@andrewnester

Copy link
Copy Markdown
Contributor

Changes

Add support for 'sensitive' JSON tag for bundle config fields

Why

This allows us to mark certain fields (for example, secrets.value) as sensitive and let CLI handle masking it in command outputs.

Used in #5861

Tests

Added unit tests. Will be tests end to end with unit tests with UC secrets

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

Based on git history, these people are best suited to review:

  • @pietern -- recent work in libs/dyn/, libs/dyn/convert/, libs/dyn/yamlsaver/
  • @denik -- recent work in libs/dyn/, libs/dyn/convert/, libs/dyn/dynvar/

Eligible reviewers: @anton-107, @janniklasrose, @renaudhartert-db, @shreyas-goenka, @simonfaltum

Suggestions based on git history. See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: f52fb6a

Run: 29333406765

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 230 1087 5:35
💚​ aws windows 4 4 232 1085 7:13
💚​ aws-ucws linux 4 4 316 1004 9:06
💚​ aws-ucws windows 4 4 318 1002 8:28
🔄​ azure linux 2 2 4 230 1086 8:06
🟨​ azure windows 3 1 4 232 1084 10:15
💚​ azure-ucws linux 4 4 318 1001 8:26
💚​ azure-ucws windows 4 4 320 999 8:50
💚​ gcp linux 4 4 229 1088 5:08
💚​ gcp windows 4 4 231 1086 7:09
8 interesting tests: 4 SKIP, 3 KNOWN, 1 RECOVERED
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 🟨​K 💚​R 💚​R 💚​R 💚​R
🟨​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 🔄​f 🟨​K 💚​R 💚​R 💚​R 💚​R
🟨​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 🔄​f 🟨​K 💚​R 💚​R 💚​R 💚​R
Top 13 slowest tests (at least 2 minutes):
duration env testname
6:16 gcp windows TestAccept
6:11 azure-ucws windows TestAccept
6:08 aws windows TestAccept
6:08 aws-ucws windows TestAccept
6:08 azure windows TestAccept
2:58 aws-ucws linux TestAccept
2:58 azure linux TestAccept
2:55 gcp linux TestAccept
2:52 aws linux TestAccept
2:44 azure-ucws linux TestAccept
2:42 aws-ucws windows TestFilerWorkspaceFilesExtensionsRead
2:09 azure-ucws windows TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform
2:00 aws-ucws linux TestFilerRecursiveDelete/workspace_files_extensions

Comment thread bundle/config/mask.go Outdated
Comment thread bundle/config/mask.go Outdated
Comment thread cmd/bundle/validate.go Outdated
Comment thread libs/dyn/convert/struct_info.go
Comment thread libs/dyn/convert/struct_info.go Outdated
}
return si.Sensitive
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a few unit tests here in dyn/convert that demonstrates that this works in cases with embedded structs, anonymous structs, etc. Would also be good to include a user of these fields in the same package.

Comment thread cmd/bundle/validate.go Outdated
Comment thread bundle/config/mask_test.go Outdated
Comment thread bundle/config/validate/no_reference_to_sensitive_fields.go Outdated
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.

4 participants