Repository navigation
feat(secrets): declarative secrets management with !secret, CRUD CLI, and masking - #1911
Conversation
Dependency ReviewThe following issues were found:
License Issuesgo.mod
Scanned Files
|
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (5)
⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds secrets-management docs, schemas, runtime, CLI, masking, Terraform handling, and supporting tests and examples. ChangesSecrets management rollout
Possibly related PRs
Estimated code review effort ✨ Finishing Touches🧪 Generate unit tests (beta)
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1911 +/- ##
==========================================
+ Coverage 79.17% 79.44% +0.26%
==========================================
Files 1298 1347 +49
Lines 123772 127229 +3457
==========================================
+ Hits 98000 101078 +3078
- Misses 20290 20501 +211
- Partials 5482 5650 +168
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
📝 WalkthroughWalkthroughA comprehensive PRD document introducing Atmos Secrets Management—a GitOps-style, multi-cloud secrets system with declarative secret registration, CRUD operations, multiple backend support (AWS SSM/Secrets Manager, SOPS, Vault, Azure Key Vault, GCP Secret Manager), CLI commands, YAML function integration, and phased implementation roadmap. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)docs/prd/**/*.md📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-01-25T03:51:57.689ZApplied to files:
📚 Learning: 2025-12-13T06:07:34.794ZApplied to files:
📚 Learning: 2025-04-25T20:54:19.701ZApplied to files:
📚 Learning: 2025-11-08T19:56:18.660ZApplied to files:
🪛 LanguageTooldocs/prd/secrets-management.md[grammar] ~26-~26: Please add a punctuation mark at the end of paragraph. (PUNCTUATION_PARAGRAPH_END) [typographical] ~28-~28: In American English, use a period after an abbreviation. (MISSING_PERIOD_AFTER_ABBREVIATION) [typographical] ~472-~472: Insert a space between the numerical value and the unit symbol. (UNIT_SPACE) [typographical] ~584-~584: Consider using typographic quotation marks here. (EN_QUOTES) [typographical] ~628-~628: To join two clauses or introduce examples, consider using an em dash. (DASH_RULE) [typographical] ~629-~629: To join two clauses or introduce examples, consider using an em dash. (DASH_RULE) [grammar] ~660-~660: Please add a punctuation mark at the end of paragraph. (PUNCTUATION_PARAGRAPH_END) [typographical] ~760-~760: Consider using a typographic opening quote here. (EN_QUOTES) [typographical] ~779-~779: To join two clauses or introduce examples, consider using an em dash. (DASH_RULE) [typographical] ~780-~780: To join two clauses or introduce examples, consider using an em dash. (DASH_RULE) [typographical] ~781-~781: To join two clauses or introduce examples, consider using an em dash. (DASH_RULE) [typographical] ~782-~782: To join two clauses or introduce examples, consider using an em dash. (DASH_RULE) [typographical] ~783-~783: To join two clauses or introduce examples, consider using an em dash. (DASH_RULE) [typographical] ~784-~784: To join two clauses or introduce examples, consider using an em dash. (DASH_RULE) 🪛 markdownlint-cli2 (0.18.1)docs/prd/secrets-management.md366-366: Fenced code blocks should have a language specified (MD040, fenced-code-language) 588-588: Fenced code blocks should have a language specified (MD040, fenced-code-language) 668-668: Fenced code blocks should have a language specified (MD040, fenced-code-language) ⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (4)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/prd/secrets-management.md (1)
365-372: Minor markdownlint MD040 issues (non-blocking per precedent).Three fenced code blocks lack language specifiers (lines 366, 588, 668). Per prior learnings from PR 1686, markdownlint formatting issues can be addressed in a dedicated documentation cleanup commit and shouldn't block this PRD. If you'd prefer to address them now, add
yaml,go, andtextlanguage tags respectively.Also applies to: 587-603, 667-681
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
docs/prd/secrets-management.md
🧰 Additional context used
📓 Path-based instructions (1)
docs/prd/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
All Product Requirement Documents (PRDs) MUST be placed in docs/prd/ with kebab-case filenames
Files:
docs/prd/secrets-management.md
🧠 Learnings (5)
📓 Common learnings
Learnt from: Listener430
Repo: cloudposse/atmos PR: 934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.
Learnt from: osterman
Repo: cloudposse/atmos PR: 1686
File: docs/prd/tool-dependencies-integration.md:58-64
Timestamp: 2025-12-13T06:07:37.766Z
Learning: cloudposse/atmos: For PRD docs (docs/prd/*.md), markdownlint issues like MD040/MD010/MD034 can be handled in a separate documentation cleanup commit and should not block the current PR.
Learnt from: mcalhoun
Repo: cloudposse/atmos PR: 963
File: website/docs/core-concepts/projects/configuration/stores.mdx:286-286
Timestamp: 2025-04-25T20:54:19.701Z
Learning: For the AWS SSM Parameter Store implementation in Atmos, support for `read_role_arn` and `write_role_arn` options is essential to enable cross-account access, allowing users to run operations like `terraform plan` in multiple accounts while accessing values across keystores. Azure Key Vault would need similar capabilities for cross-tenant/subscription authentication.
📚 Learning: 2025-01-25T03:51:57.689Z
Learnt from: Listener430
Repo: cloudposse/atmos PR: 934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.
Applied to files:
docs/prd/secrets-management.md
📚 Learning: 2025-04-25T20:54:19.701Z
Learnt from: mcalhoun
Repo: cloudposse/atmos PR: 963
File: website/docs/core-concepts/projects/configuration/stores.mdx:286-286
Timestamp: 2025-04-25T20:54:19.701Z
Learning: For the AWS SSM Parameter Store implementation in Atmos, support for `read_role_arn` and `write_role_arn` options is essential to enable cross-account access, allowing users to run operations like `terraform plan` in multiple accounts while accessing values across keystores. Azure Key Vault would need similar capabilities for cross-tenant/subscription authentication.
Applied to files:
docs/prd/secrets-management.md
📚 Learning: 2025-11-08T19:56:18.660Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1697
File: internal/exec/oci_utils.go:0-0
Timestamp: 2025-11-08T19:56:18.660Z
Learning: In the Atmos codebase, when a function receives an `*schema.AtmosConfiguration` parameter, it should read configuration values from `atmosConfig.Settings` fields rather than using direct `os.Getenv()` or `viper.GetString()` calls. The Atmos pattern is: viper.BindEnv in cmd/root.go binds environment variables → Viper unmarshals into atmosConfig.Settings via mapstructure → business logic reads from the Settings struct. This provides centralized config management, respects precedence, and enables testability. Example: `atmosConfig.Settings.AtmosGithubToken` instead of `os.Getenv("ATMOS_GITHUB_TOKEN")` in functions like `getGHCRAuth` in internal/exec/oci_utils.go.
Applied to files:
docs/prd/secrets-management.md
📚 Learning: 2025-12-13T06:07:34.794Z
Learnt from: osterman
Repo: cloudposse/atmos PR: 1686
File: docs/prd/tool-dependencies-integration.md:58-64
Timestamp: 2025-12-13T06:07:34.794Z
Learning: For docs in the cloudposse/atmos repository under docs/prd/, markdownlint issues MD040, MD010, and MD034 should be deferred to a separate documentation cleanup commit and must not block the current PR. If needed, address these issues in a follow-up PR dedicated to documentation improvements.
Applied to files:
docs/prd/secrets-management.md
🪛 LanguageTool
docs/prd/secrets-management.md
[grammar] ~26-~26: Please add a punctuation mark at the end of paragraph.
Context: ...- Not just Terraform, but all component types ## Stores vs Secrets - Clear Separatio...
(PUNCTUATION_PARAGRAPH_END)
[typographical] ~28-~28: In American English, use a period after an abbreviation.
Context: ...orm, but all component types ## Stores vs Secrets - Clear Separation Atmos maint...
(MISSING_PERIOD_AFTER_ABBREVIATION)
[typographical] ~472-~472: Insert a space between the numerical value and the unit symbol.
Context: ... secrets, cost-effective - Limitations: 10KB max value size, no automatic rotation ...
(UNIT_SPACE)
[typographical] ~584-~584: Consider using typographic quotation marks here.
Context: ...not dev/staging ``` This addresses the "secrets sprawl" problem from the deployments PRD. ## P...
(EN_QUOTES)
[typographical] ~628-~628: To join two clauses or introduce examples, consider using an em dash.
Context: ...action - AWS SSM backend (aws/ssm) - reusing/extending pkg/store/ code - **...
(DASH_RULE)
[typographical] ~629-~629: To join two clauses or introduce examples, consider using an em dash.
Context: ...WS Secrets Manager backend** (aws/asm) - new implementation - Path extraction for...
(DASH_RULE)
[grammar] ~660-~660: Please add a punctuation mark at the end of paragraph.
Context: ...t backend - Azure Key Vault, GCP Secret Manager ## Documentation Deliverables ### CLI...
(PUNCTUATION_PARAGRAPH_END)
[typographical] ~760-~760: Consider using a typographic opening quote here.
Context: ...uctured secrets** - Path extraction via | path ".foo.bar" modifier and --path CLI fla...
(EN_QUOTES)
[typographical] ~779-~779: To join two clauses or introduce examples, consider using an em dash.
Context: .../copilot-cli/docs/commands/secret-init/) - YAML-based declarations - [Vercel Enviro...
(DASH_RULE)
[typographical] ~780-~780: To join two clauses or introduce examples, consider using an em dash.
Context: ...//vercel.com/docs/environment-variables) - CLI-first DX - [Turborepo env](https://t...
(DASH_RULE)
[typographical] ~781-~781: To join two clauses or introduce examples, consider using an em dash.
Context: ...-repository/using-environment-variables) - Scoped env vars - [Chamber](https://gith...
(DASH_RULE)
[typographical] ~782-~782: To join two clauses or introduce examples, consider using an em dash.
Context: ...r](https://github.com/segmentio/chamber) - Service-based SSM secrets - [Doppler](ht...
(DASH_RULE)
[typographical] ~783-~783: To join two clauses or introduce examples, consider using an em dash.
Context: ...s - Doppler - Project/environment scoping - [helmfile/...
(DASH_RULE)
[typographical] ~784-~784: To join two clauses or introduce examples, consider using an em dash.
Context: .../vals](https://github.com/helmfile/vals) - Read-only configuration loader (20+ back...
(DASH_RULE)
🪛 markdownlint-cli2 (0.18.1)
docs/prd/secrets-management.md
366-366: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
588-588: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
668-668: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Summary
🔇 Additional comments (11)
docs/prd/secrets-management.md (11)
1-10: Well-structured PRD that cleanly addresses secrets sprawl.The document clearly separates Stores (infrastructure state via Terraform) from Secrets (human-managed configuration), which elegantly solves the core problem. The GitOps-friendly approach with explicit YAML declarations is solid.
457-489: Clarify cross-account/cross-tenant access patterns for AWS and Azure backends.The PRD delegates AWS account access to the
identityfield (good), but per prior learnings, explicit support for cross-account operations should be documented. AWS SSM often needs separateread_role_arnandwrite_role_arnto enable operations liketerraform planacross multiple accounts, and Azure Key Vault needs similar cross-subscription support.Consider expanding the options sections for
aws/ssm,aws/asm, andazure/keyvaultto explicitly mention whether role/identity ARN fields are supported, or confirm theidentityfield provides sufficient abstraction.
85-175: Configuration schema is well-designed and consistent with Atmos patterns.The
kindfield naming (cloud/thingformat), optionalidentityintegration, and flexible!includesupport align nicely with existing auth and configuration patterns. The backwards-compatibility mapping for legacytypefield is thoughtful.Note: Implementation should follow the Atmos pattern (from learning) of reading backend config values from
atmosConfig.Settingsin business logic rather than directos.Getenv()calls.
260-414: CLI command specifications are comprehensive and well-thought-out.Clear separation of primary commands and aliases, non-interactive modes for CI, component type disambiguation strategy, and structured secret extraction via
--pathflag all demonstrate solid design. The commands follow patterns from Vercel and Doppler while maintaining Atmos conventions.
416-453: !secret YAML function spec is clear with good support for structured secrets.Path extraction, defaults, and automatic masking registration provide flexibility and security. The JSONPath parsing for nested values (e.g.,
| path ".credentials.password") will need careful implementation, but the spec communicates intent well.
586-620: Package structure follows Atmos conventions and reuses existing infrastructure.The design leverages existing
pkg/store/for SSM/Azure/GCP implementations, separates backends via abstraction, and follows command/service/registry patterns already established in the codebase. Good foundation for implementation.
622-661: Implementation phases are realistic and well-sequenced.Starting with AWS backends (leveraging existing
pkg/store/infrastructure), then CLI surface, YAML integration, and DX features—this tracks well with the existing codebase and team expertise. Phase 5's additional backends are a natural expansion. The component type resolution and path extraction logic in Phase 2–3 will be the most complex, but specs are clear enough to guide implementation.
763-791: Prior art and alternatives are well-researched and justify design decisions.The explanation of why helmfile/vals was ruled out (read-only vs. CRUD needs) demonstrates thoughtful evaluation. References to Copilot, Vercel, and Chamber provide good context. Integrations with I/O masking, auth, and deployments are clearly mapped to existing Atmos systems.
542-584: Integration points are clearly mapped to existing Atmos systems.I/O masking, auth identity reuse, and deployments scoping all follow established patterns. The example showing automatic masking registration and auth identity inheritance is clear. Worth documenting in Phase 4: the mechanism for how deployments restrict secret loading (likely resolved at stack-to-component scope time) should be spelled out in implementation details.
662-751: Documentation plan is thorough and follows Atmos conventions.Structured coverage of CLI commands, configuration, tutorials, and blog announcement with clear mandatory frontmatter requirements ensures consistent documentation. The schema updates across packages are well-accounted for.
752-761: Open questions are resolved with sound reasoning and Atmos-consistent decisions.The three-tier component type resolution (auto → selector → flag),
kindfield naming consistency with auth, and flexible !include organization all demonstrate pragmatic trade-offs between usability and implementation simplicity. The decision to keep Stores and Secrets as separate systems is well-justified.
Adds comprehensive PRD for GitOps-friendly, multi-cloud secrets management in Atmos with Vercel-like developer experience. Covers declarative secret declarations, CRUD CLI commands (init, add, get, rm, list, pull, push, validate), integration with existing store and auth infrastructure, and support for AWS SSM, ASM, SOPS, Vault, Azure Key Vault, and GCP Secret Manager backends. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Haiku 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Adds import command that creates declarations and sets values from .env/JSON/YAML files. Includes prior art research from Doppler, Chamber, and Vercel. Key differences: - push: requires pre-declared secrets (fails on undeclared) - import: creates declarations as needed (bootstrap workflow) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Rename all occurrences of "backend/backends" to "provider/providers" and restructure defaults to match auth patterns from auth-default-settings.md. Changes: - `secrets.default_backend` → `secrets.defaults.provider` - `secrets.backends` → `secrets.providers` - `backend:` → `provider:` in secret declarations - Backend → Provider in headings and descriptions - Add references to I/O handling strategy and auth defaults PRDs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
16966f3 to
f0b8b9a
Compare
Rename provider configuration field from `options` to `spec` for consistency with the logs PRD (atmos-logs.md) pattern. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Erik Osterman (Cloud Posse) (@osterman), |
Addresses gap in secrets management PRD for machine-generated sensitive outputs flowing between components via !terraform.output and atmos.Component(). Terraform already provides sensitive metadata; Atmos I/O masking layer is ready — this PRD wires them together. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Warning This PR exceeds the recommended limit of 1,000 lines.Large PRs are difficult to review and may be rejected due to their size. Please verify that this PR does not address multiple issues. |
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…option
One secret value shared by many consumers is a scope problem, not an
addressing problem. Complete the scope ladder (instance -> stack -> global):
a global declaration's coordinate omits both the stack and component
segments ({prefix}/{NAME}), so every importer of a shared catalog fragment
converges on the same backend path by construction. An explicit
`scope: global` survives the positional stamp at either declaration
position; SOPS declares no global support yet (file placement is
scope-keyed), gated by SupportsScope.
Migration from legacy `!store <store> <stack> <component> <key>` paths is a
one-shot CLI adoption instead of permanent config vocabulary:
`atmos secret import NAME --from-stack=... --from-component=...` copies the
value from its legacy coordinate into the declaration's computed coordinate
(like `terraform import`, the source is never modified or deleted).
--from-store defaults to the declaration's own store, --from-key to the
secret name, and the segments are raw path strings transcribed from the old
expression. `import` keeps its FILE mode unchanged and becomes the general
surface for bringing existing secrets under management.
Store key builders (SSM, ASM, GSM, keychain) now omit empty stack/component
segments instead of rejecting them, so scoped coordinates compose cleanly;
key-only validation remains. list/enumerate dedupe global rows to one `*/*`
row; set's success message names the shared blast radius for stack/global
scopes. Both manifest JSON schemas gain the scope enum (the website copy was
missing `scope` entirely).
Co-Authored-By: Claude Fable 5 <[email protected]>
…gement # Conflicts: # .github/workflows/test.yml # lychee.toml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/test.yml:
- Line 81: Replace all third-party GitHub Actions that use version tag pins
(such as `@v6`, `@v8`, `@v4`, `@v2`, `@v1`) with their corresponding
40-character commit SHAs at all affected lines: 81, 102, 137, 160, 167, 175,
189, 220, 272, 329, 363, 377, 383, 427, 442, 507, 526, 533, 606, 612, 618, 654,
668 in .github/workflows/test.yml. For each action (such as actions/setup-go,
actions/checkout, actions/upload-artifact, etc.), look up the specific commit
SHA corresponding to the version tag being used and replace the tag reference
with the full 40-character commit hash to strengthen supply-chain integrity.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 33a9f7bb-0e20-45f2-a84c-23e9ce490542
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (51)
.github/workflows/test.ymlcmd/root.gocmd/secret/deps.gocmd/secret/fake_service_test.gocmd/secret/import.gocmd/secret/import_test.gocmd/secret/list.gocmd/secret/set.gocmd/terraform/utils.godocs/prd/secrets-management.mderrors/errors.gogo.modinternal/exec/describe_affected_components.gointernal/exec/describe_stacks_component_processor.gointernal/exec/stack_processor_process_stacks_helpers_inheritance.gointernal/exec/stack_processor_utils.gointernal/exec/terraform_execute_helpers.gointernal/exec/terraform_execute_helpers_exec.gointernal/exec/terraform_shell.gointernal/exec/yaml_func_utils.golychee.tomlpkg/datafetcher/schema/atmos/manifest/1.0.jsonpkg/schema/schema.gopkg/schema/secrets.gopkg/secrets/errors.gopkg/secrets/import.gopkg/secrets/import_test.gopkg/secrets/providers/provider.gopkg/secrets/providers/sops.gopkg/secrets/providers/store.gopkg/secrets/registry.gopkg/secrets/scope.gopkg/secrets/scope_test.gopkg/secrets/service_test.gopkg/secrets/types.gopkg/store/aws_secrets_manager_store.gopkg/store/aws_secrets_manager_store_test.gopkg/store/aws_ssm_param_store.gopkg/store/aws_ssm_param_store_test.gopkg/store/azure_keyvault_store.gopkg/store/google_secret_manager_store.gopkg/store/google_secret_manager_store_test.gopkg/store/keychain_store.gopkg/store/keychain_store_test.gopkg/store/registry.gopkg/store/secrets_stores_extra_test.gopkg/store/store.gopkg/utils/yaml_utils.gopkg/utils/yaml_utils_test.gotests/snapshots/TestCLICommands_atmos_describe_config.stdout.goldentests/snapshots/TestCLICommands_secrets-masking_describe_config.stdout.golden
💤 Files with no reviewable changes (11)
- pkg/schema/secrets.go
- pkg/secrets/errors.go
- pkg/secrets/import_test.go
- pkg/secrets/import.go
- pkg/secrets/registry.go
- pkg/secrets/providers/store.go
- pkg/secrets/scope.go
- pkg/schema/schema.go
- pkg/datafetcher/schema/atmos/manifest/1.0.json
- pkg/secrets/providers/provider.go
- pkg/secrets/providers/sops.go
✅ Files skipped from review due to trivial changes (2)
- lychee.toml
- cmd/terraform/utils.go
🚧 Files skipped from review as they are similar to previous changes (11)
- errors/errors.go
- internal/exec/stack_processor_process_stacks_helpers_inheritance.go
- cmd/secret/deps.go
- internal/exec/describe_affected_components.go
- internal/exec/terraform_shell.go
- internal/exec/stack_processor_utils.go
- internal/exec/terraform_execute_helpers_exec.go
- internal/exec/describe_stacks_component_processor.go
- internal/exec/terraform_execute_helpers.go
- cmd/secret/list.go
- cmd/secret/fake_service_test.go
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/test.yml:
- Line 81: Replace all third-party GitHub Actions that use version tag pins
(such as `@v6`, `@v8`, `@v4`, `@v2`, `@v1`) with their corresponding
40-character commit SHAs at all affected lines: 81, 102, 137, 160, 167, 175,
189, 220, 272, 329, 363, 377, 383, 427, 442, 507, 526, 533, 606, 612, 618, 654,
668 in .github/workflows/test.yml. For each action (such as actions/setup-go,
actions/checkout, actions/upload-artifact, etc.), look up the specific commit
SHA corresponding to the version tag being used and replace the tag reference
with the full 40-character commit hash to strengthen supply-chain integrity.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 33a9f7bb-0e20-45f2-a84c-23e9ce490542
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (51)
.github/workflows/test.ymlcmd/root.gocmd/secret/deps.gocmd/secret/fake_service_test.gocmd/secret/import.gocmd/secret/import_test.gocmd/secret/list.gocmd/secret/set.gocmd/terraform/utils.godocs/prd/secrets-management.mderrors/errors.gogo.modinternal/exec/describe_affected_components.gointernal/exec/describe_stacks_component_processor.gointernal/exec/stack_processor_process_stacks_helpers_inheritance.gointernal/exec/stack_processor_utils.gointernal/exec/terraform_execute_helpers.gointernal/exec/terraform_execute_helpers_exec.gointernal/exec/terraform_shell.gointernal/exec/yaml_func_utils.golychee.tomlpkg/datafetcher/schema/atmos/manifest/1.0.jsonpkg/schema/schema.gopkg/schema/secrets.gopkg/secrets/errors.gopkg/secrets/import.gopkg/secrets/import_test.gopkg/secrets/providers/provider.gopkg/secrets/providers/sops.gopkg/secrets/providers/store.gopkg/secrets/registry.gopkg/secrets/scope.gopkg/secrets/scope_test.gopkg/secrets/service_test.gopkg/secrets/types.gopkg/store/aws_secrets_manager_store.gopkg/store/aws_secrets_manager_store_test.gopkg/store/aws_ssm_param_store.gopkg/store/aws_ssm_param_store_test.gopkg/store/azure_keyvault_store.gopkg/store/google_secret_manager_store.gopkg/store/google_secret_manager_store_test.gopkg/store/keychain_store.gopkg/store/keychain_store_test.gopkg/store/registry.gopkg/store/secrets_stores_extra_test.gopkg/store/store.gopkg/utils/yaml_utils.gopkg/utils/yaml_utils_test.gotests/snapshots/TestCLICommands_atmos_describe_config.stdout.goldentests/snapshots/TestCLICommands_secrets-masking_describe_config.stdout.golden
💤 Files with no reviewable changes (11)
- pkg/schema/secrets.go
- pkg/secrets/errors.go
- pkg/secrets/import_test.go
- pkg/secrets/import.go
- pkg/secrets/registry.go
- pkg/secrets/providers/store.go
- pkg/secrets/scope.go
- pkg/schema/schema.go
- pkg/datafetcher/schema/atmos/manifest/1.0.json
- pkg/secrets/providers/provider.go
- pkg/secrets/providers/sops.go
✅ Files skipped from review due to trivial changes (2)
- lychee.toml
- cmd/terraform/utils.go
🚧 Files skipped from review as they are similar to previous changes (11)
- errors/errors.go
- internal/exec/stack_processor_process_stacks_helpers_inheritance.go
- cmd/secret/deps.go
- internal/exec/describe_affected_components.go
- internal/exec/terraform_shell.go
- internal/exec/stack_processor_utils.go
- internal/exec/terraform_execute_helpers_exec.go
- internal/exec/describe_stacks_component_processor.go
- internal/exec/terraform_execute_helpers.go
- cmd/secret/list.go
- cmd/secret/fake_service_test.go
🛑 Comments failed to post (1)
.github/workflows/test.yml (1)
81-81:
⚠️ Potential issue | 🟠 Major🧩 Analysis chain
🏁 Script executed:
#!/bin/bash set -euo pipefail file=".github/workflows/test.yml" echo "Unpinned actions in ${file} (ref not pinned to a 40-char commit SHA):" awk ' /^[[:space:]]*uses:[[:space:]]*/ { raw=$0 ref=raw sub(/^[[:space:]]*uses:[[:space:]]*/, "", ref) split(ref, parts, "@") r=parts[2] gsub(/[[:space:]]+$/, "", r) if (r !~ /^[0-9a-f]{40}([[:space:]]*#.*)?$/) { printf("Line %d: %s\n", NR, raw) } } ' "$file"Repository: cloudposse/atmos
Length of output: 1354
Pin all third-party GitHub Actions to commit SHAs.
The workflow uses tag-pinned actions (e.g.,
@v6,@v8,@v4,@v2,@v1) instead of 40-character commit SHAs. This weakens supply-chain integrity across multiple lines.Affected: 81, 102, 137, 160, 167, 175, 189, 220, 272, 329, 363, 377, 383, 427, 442, 507, 526, 533, 606, 612, 618, 654, 668.
🧰 Tools
🪛 zizmor (1.25.2)
[error] 81-81: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 81-81: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default
(cache-poisoning)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/test.yml at line 81, Replace all third-party GitHub Actions that use version tag pins (such as `@v6`, `@v8`, `@v4`, `@v2`, `@v1`) with their corresponding 40-character commit SHAs at all affected lines: 81, 102, 137, 160, 167, 175, 189, 220, 272, 329, 363, 377, 383, 427, 442, 507, 526, 533, 606, 612, 618, 654, 668 in .github/workflows/test.yml. For each action (such as actions/setup-go, actions/checkout, actions/upload-artifact, etc.), look up the specific commit SHA corresponding to the version tag being used and replace the tag reference with the full 40-character commit hash to strengthen supply-chain integrity.Source: Linters/SAST tools
…fixture dirs Add README.md to both the sops-secrets example and the secrets-helmfile test fixture explaining that the committed age private key is a throwaway for self-contained demos only, and that real projects must keep the key out of the repo (SOPS_AGE_KEY_FILE / OS keychain) and commit only the encrypted file. Add a matching "DEMO KEY ONLY" warning header to each keys.txt, and trim the unused DATADOG_API_KEY/REDIS_URL entries from the example's dev.enc.yaml. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏 |
|
💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏 |
…gement # Conflicts: # .github/workflows/test.yml
|
💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏 |
…gement # Conflicts: # internal/exec/terraform_execute_helpers.go
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/test.yml (1)
675-680:⚠️ Potential issue | 🟠 MajorPass only required secrets to
shared-go-auto-release.yml.Line 680 uses
secrets: inherit, which exposes all repository secrets to the reusable workflow. The called workflow consumes only three specific secrets:BOT_GITHUB_APP_PRIVATE_KEY,GPG_PRIVATE_KEY, andGPG_PRIVATE_KEY_PASSPHRASE. Replacesecrets: inheritwith explicit secret passing to maintain least-privilege boundaries.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/test.yml around lines 675 - 680, In the shared-go-auto-release.yml workflow call in test.yml, replace the `secrets: inherit` statement (line 680) with explicit secret passing. Instead of inheriting all repository secrets, pass only the three specific secrets required by the shared-go-auto-release.yml workflow: BOT_GITHUB_APP_PRIVATE_KEY, GPG_PRIVATE_KEY, and GPG_PRIVATE_KEY_PASSPHRASE. This maintains least-privilege access by ensuring only the necessary secrets are exposed to the reusable workflow.Source: Linters/SAST tools
🧹 Nitpick comments (1)
.github/workflows/test.yml (1)
83-83: Consider disablingsetup-gocaching on PR runs for defense-in-depth.Lines 83 and 222 use
actions/setup-go@v6with caching enabled by default. While GitHub Actions isolates fork PR caches from the base repository, disabling cache in PR workflows provides an extra layer of isolation: setcache: falseif you want to ensure zero cross-run cache artifacts in external PRs.Suggested patch.
- name: Set up Go if: ${{ ! ( matrix.target == 'windows' && github.event.pull_request.draft ) }} # setup-go v6 requires runner v2.327.1+ and can affect toolchain handling. uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 with: go-version-file: "go.mod" + cache: false id: go @@ - name: Set up Go # setup-go v6 requires runner v2.327.1+ and can affect toolchain handling. uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} with: go-version-file: "go.mod" + cache: false id: goAlso applies to: 222-222
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/test.yml at line 83, The actions/setup-go@v6 action is configured with caching enabled by default at two locations in the test.yml workflow (line 83 and line 222). To provide defense-in-depth security isolation for PR runs, disable the cache by adding `cache: false` as a parameter to both instances of the setup-go action. This ensures that external PR workflows do not share cached artifacts with the base repository.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/test.yml:
- Around line 675-680: In the shared-go-auto-release.yml workflow call in
test.yml, replace the `secrets: inherit` statement (line 680) with explicit
secret passing. Instead of inheriting all repository secrets, pass only the
three specific secrets required by the shared-go-auto-release.yml workflow:
BOT_GITHUB_APP_PRIVATE_KEY, GPG_PRIVATE_KEY, and GPG_PRIVATE_KEY_PASSPHRASE.
This maintains least-privilege access by ensuring only the necessary secrets are
exposed to the reusable workflow.
---
Nitpick comments:
In @.github/workflows/test.yml:
- Line 83: The actions/setup-go@v6 action is configured with caching enabled by
default at two locations in the test.yml workflow (line 83 and line 222). To
provide defense-in-depth security isolation for PR runs, disable the cache by
adding `cache: false` as a parameter to both instances of the setup-go action.
This ensures that external PR workflows do not share cached artifacts with the
base repository.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 09506a2a-1ed4-4684-95a0-7022d9eb3640
📒 Files selected for processing (7)
.github/workflows/test.ymlcmd/root.goerrors/errors.gointernal/exec/terraform_execute_helpers.gointernal/exec/terraform_execute_helpers_exec.gopkg/datafetcher/schema/stacks/stack-config/1.0.jsonpkg/schema/schema.go
🚧 Files skipped from review as they are similar to previous changes (5)
- pkg/datafetcher/schema/stacks/stack-config/1.0.json
- errors/errors.go
- internal/exec/terraform_execute_helpers_exec.go
- pkg/schema/schema.go
- internal/exec/terraform_execute_helpers.go
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
Warning Release Documentation RequiredThis PR is labeled
|
|
These changes were released in v1.222.0-rc.1. |
what
Implements the Secrets Management PRD end to end — a GitOps-friendly, multi-cloud secrets workflow built on top of the existing store registry (not a parallel backend). Secrets are declared in stack config (committed to git) and their values live in a cloud secret backend or a SOPS-encrypted file, managed with a Vercel-like CLI and resolved at runtime with a new
!secretYAML function.Stores (
pkg/store)StoreConfiggainssecret: true(subsystem membership) andkind(cloud/thing) with legacytypemapping;!storeagainst asecret: truestore is now an error ("use!secret").DeletableStore/StatusStore/SecretAwareStoreinterfaces; AWS SSM writesSecureStringwhen used as a secret backend and gainsDelete/Has.kind↔typecompatibility.Secrets core (
pkg/secrets)service, declarationregistry,resolver,validator,kinds, and a leafpkg/secrets/providers/subpackage with a store-adapter (track 1) and a native SOPS provider (track 2:age/aws-kms/gcp-kms/gpg).atmos.yaml, globally in a stack (secrets:top-level merges into every component), or under a single component.!secret+ masking (the headline)!secret NAME [| path ...] [| default ...]wired into the live YAML pipeline, with automatic masker registration.describe,list) resolve!secretto<MASKED>without contacting the backend when masking is on (the default) — so you can inspect a stack with no cloud credentials. Value-producing commands (secret get,terraform plan/apply) always retrieve;--mask/ATMOS_MASKonly controls redaction of display output.sensitive = true) auto-register with the masker as they flow through!terraform.output/atmos.Component()/describe.CLI (
cmd/secret)init,set(aliasadd),get,delete(aliasrm),list,pull,push,import,validate.Stack processing
secretsis now a first-class inheritable component section, plus a global stack-levelsecrets:block that merges into every component.Docs + example
atmos secretoverview + all 9 subcommands, secrets configuration page,!secretfunction page; blog post (with an embedded example) and a roadmap milestone.examples/sops-secrets/— fully self-contained, age-encrypted, no cloud credentials. Bundledatmos testcustom command (.atmos.d/test.yaml) proves the full lifecycle end to end (set → encrypted-at-rest → get → list → validate → masked-without-credentials inspection → reveal-needs-key).why
There was no unified way to manage human-provisioned secrets in Atmos — stores were designed for machine-written Terraform outputs, and the historical workaround (Chamber) was AWS-only. This adds explicit, declarative secret registration so a secret must be declared before it can be set, read, or resolved, and makes "inspect a stack" decoupled from "authenticate to the secret backend."
references
docs/prd/secrets-management.mdanddocs/prd/secrets-masking/examples/sops-secrets/(runatmos test)notes / follow-ups
--mask=falseflag did not disable the early-initialized I/O masker (onlyATMOS_MASK=falsedid).io.ReconcileMasking()now reconciles the masker after flags are parsed, so--mask=falseandATMOS_MASK=falsebehave identically.pkg/storebackend implementations could be moved into apkg/store/providers/subpackage (mirroringpkg/secrets/providers/) — deferred to a dedicated follow-up PR since it touches ~30 external call-sites.metadata.component) inheritance of thesecretssection is not wired yet (component-level +import:+ global-stack inheritance all work).🤖 Generated with Claude Code