Skip to content

feat(secrets): declarative secrets management with !secret, CRUD CLI, and masking - #1911

Merged
Andriy Knysh (aknysh) merged 62 commits into
mainfrom
osterman/secrets-management
Jun 15, 2026
Merged

Andriy Knysh (aknysh) merged 62 commits into
mainfrom
osterman/secrets-management

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Dec 23, 2025 •

Copy link
Copy Markdown
Member

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 !secret YAML function.

Stores (pkg/store)

  • StoreConfig gains secret: true (subsystem membership) and kind (cloud/thing) with legacy type mapping; !store against a secret: true store is now an error ("use !secret").
  • New DeletableStore / StatusStore / SecretAwareStore interfaces; AWS SSM writes SecureString when used as a secret backend and gains Delete/Has.
  • New store backends: AWS Secrets Manager and HashiCorp Vault (KV v2). Registry refactored to a table-driven builder map; kind↔type compatibility.

Secrets core (pkg/secrets)

  • service, declaration registry, resolver, validator, kinds, and a leaf pkg/secrets/providers/ subpackage with a store-adapter (track 1) and a native SOPS provider (track 2: age/aws-kms/gcp-kms/gpg).
  • SOPS providers can be defined in 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.
  • Mask-without-retrieval: inspection commands (describe, list) resolve !secret to <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_MASK only controls redaction of display output.
  • Sensitive Terraform outputs (sensitive = true) auto-register with the masker as they flow through !terraform.output / atmos.Component() / describe.

CLI (cmd/secret)

init, set (alias add), get, delete (alias rm), list, pull, push, import, validate.

Stack processing

secrets is now a first-class inheritable component section, plus a global stack-level secrets: block that merges into every component.

Docs + example

  • Full Docusaurus docs: atmos secret overview + all 9 subcommands, secrets configuration page, !secret function page; blog post (with an embedded example) and a roadmap milestone.
  • examples/sops-secrets/ — fully self-contained, age-encrypted, no cloud credentials. Bundled atmos test custom 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

  • PRD: docs/prd/secrets-management.md and docs/prd/secrets-masking/
  • Example: examples/sops-secrets/ (run atmos test)

notes / follow-ups

  • Fixed a pre-existing init-ordering bug where the global --mask=false flag did not disable the early-initialized I/O masker (only ATMOS_MASK=false did). io.ReconcileMasking() now reconciles the masker after flags are parsed, so --mask=false and ATMOS_MASK=false behave identically.
  • pkg/store backend implementations could be moved into a pkg/store/providers/ subpackage (mirroring pkg/secrets/providers/) — deferred to a dedicated follow-up PR since it touches ~30 external call-sites.
  • Base-component (metadata.component) inheritance of the secrets section is not wired yet (component-level + import: + global-stack inheritance all work).

🤖 Generated with Claude Code

@github-actions github-actions Bot added the size/l Large size PR label Dec 23, 2025
@github-actions

github-actions Bot commented Dec 23, 2025 •

Copy link
Copy Markdown

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 16 package(s) with unknown licenses.
See the Details below.

License Issues

go.mod

PackageVersionLicenseIssue Type
github.com/1Password/connect-sdk-go1.5.3NullUnknown License
github.com/1password/onepassword-sdk-go0.3.1NullUnknown License
github.com/aws/aws-sdk-go-v2/service/kms1.51.1NullUnknown License
github.com/blang/semver3.5.1+incompatibleNullUnknown License
github.com/cpuguy83/go-md2man/v22.0.7NullUnknown License
github.com/google/shlex0.0.0-20191202100458-e7afc7fbc510NullUnknown License
github.com/huaweicloud/huaweicloud-sdk-go-v30.1.195NullUnknown License
github.com/json-iterator/go1.1.13-0.20220915233716-71ac16282d12NullUnknown License
github.com/lib/pq1.12.3NullUnknown License
github.com/opentracing/opentracing-go1.2.0NullUnknown License
github.com/russross/blackfriday/v22.1.0NullUnknown License
github.com/tetratelabs/wazero1.11.0NullUnknown License
github.com/tjfoc/gmsm1.4.1NullUnknown License
github.com/uber/jaeger-client-go2.30.0+incompatibleNullUnknown License
github.com/uber/jaeger-lib2.4.1+incompatibleNullUnknown License
github.com/urfave/cli1.22.17NullUnknown License
Allowed Licenses: MIT, MIT-0, Apache-2.0, BSD-2-Clause, BSD-2-Clause-Views, BSD-3-Clause, ISC, MPL-2.0, 0BSD, Unlicense, CC0-1.0, CC-BY-3.0, CC-BY-4.0, CC-BY-SA-3.0, Python-2.0, OFL-1.1, LicenseRef-scancode-generic-cla, LicenseRef-scancode-unknown-license-reference, LicenseRef-scancode-unicode, LicenseRef-scancode-google-patent-license-golang
Excluded from license check: pkg:golang/modernc.org/libc

Scanned Files

  • go.mod

@coderabbitai

coderabbitai Bot commented Dec 23, 2025 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (5)
  • tests/snapshots/TestCLICommands_atmos_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_--help_config_aliases_section.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_config.stdout.golden
  • tests/snapshots/TestCLICommands_help_flag_works.stdout.golden
  • tests/snapshots/TestCLICommands_secrets-masking_describe_config.stdout.golden
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 837eb87e-4046-4644-8f90-0cce3a09d97d

📥 Commits

Reviewing files that changed from the base of the PR and between b981129 and 4a39a8f.

📒 Files selected for processing (5)
  • tests/snapshots/TestCLICommands_atmos_--help.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_--help_config_aliases_section.stdout.golden
  • tests/snapshots/TestCLICommands_atmos_describe_config.stdout.golden
  • tests/snapshots/TestCLICommands_help_flag_works.stdout.golden
  • tests/snapshots/TestCLICommands_secrets-masking_describe_config.stdout.golden

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds secrets-management docs, schemas, runtime, CLI, masking, Terraform handling, and supporting tests and examples.

Changes

Secrets management rollout

Layer / File(s) Summary
Docs, schema, and config
docs/prd/*, website/blog/*, pkg/schema/*, pkg/datafetcher/schema/*, tests/fixtures/schemas/*, pkg/datafetcher/schema_*_test.go, go.mod, NOTICE, .golangci.yml, .github/workflows/test.yml, errors/errors.go
Secrets-management and masking PRDs, blog/docs, schema types, manifest schemas, schema validation, dependencies, CI metadata, and shared errors add the secrets configuration and masking contracts.
Secrets domain model and service
pkg/secrets/types.go, pkg/secrets/errors.go, pkg/secrets/registry.go, pkg/secrets/scope.go, pkg/secrets/service.go, pkg/secrets/import.go, pkg/secrets/collision.go, and matching tests
Core secrets types, declaration parsing, scope stamping, service orchestration, import, collision detection, and coverage add the secrets runtime.
Providers and backing stores
pkg/secrets/providers/*, pkg/store/*, pkg/keyring/*, and matching tests
Store-backed, SOPS-backed, Azure, AWS, GitHub, 1Password, Vault, and keyring-backed provider implementations and tests add the backend runtime.
Secret CLI commands
cmd/secret/*, cmd/auth/exec.go, cmd/auth/exec_test.go, cmd/auth/testmain_test.go, cmd/root.go, cmd/testing_main_test.go
The atmos secret command family, command seams, auth execution changes, and test harness and startup plumbing are added.
Masking and Terraform runtime
pkg/io/*, internal/exec/terraform_*, internal/exec/describe_*, internal/exec/stack_processor_*, internal/exec/yaml_func_utils.go
Global masking helpers, YAML secret resolution, inspect-mode secret masking, Terraform secret partitioning, and runtime secret handling are updated.
Command plumbing and examples
cmd/cmd_utils.go, cmd/cmd_utils_test.go, cmd/custom_command_integration_test.go, examples/custom-components/*, examples/sops-secrets/*, internal/exec/helmfile_secrets_test.go, main_hooks_and_keychain_store_integration_test.go
Shared command execution plumbing, custom component env export, examples, and command-level integration tests are updated.

Possibly related PRs

Estimated code review effort
🎯 5 (Critical) | ⏱️ ~120 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/secrets-management

@osterman Erik Osterman (Cloud Posse) (osterman) added the no-release Do not create a new release (wait for additional code changes) label Dec 23, 2025
@codecov

codecov Bot commented Dec 23, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.83146% with 405 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.44%. Comparing base (e4f6a0e) to head (4a39a8f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/secrets/providers/sops.go 82.70% 28 Missing and 27 partials ⚠️
pkg/secrets/providers/sops_keygen.go 85.58% 19 Missing and 12 partials ⚠️
cmd/secret/shared.go 72.52% 16 Missing and 9 partials ⚠️
cmd/secret/init.go 84.25% 13 Missing and 7 partials ⚠️
pkg/auth/credentials/keyring_store.go 84.11% 12 Missing and 5 partials ⚠️
cmd/secret/list.go 86.88% 11 Missing and 5 partials ⚠️
internal/exec/describe_affected_components.go 50.00% 14 Missing and 2 partials ⚠️
pkg/io/global.go 61.53% 13 Missing and 2 partials ⚠️
cmd/secret/envfile.go 76.08% 6 Missing and 5 partials ⚠️
cmd/secret/keygen.go 87.35% 9 Missing and 2 partials ⚠️
... and 43 more
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 79.44% <84.83%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/cmd_utils.go 60.83% <100.00%> (+4.64%) ⬆️
cmd/markdown_help.go 88.88% <ø> (ø)
cmd/root.go 68.26% <100.00%> (+0.03%) ⬆️
cmd/secret/deps.go 100.00% <100.00%> (ø)
cmd/terraform/generate/varfile.go 77.61% <100.00%> (+1.42%) ⬆️
cmd/terraform/shell.go 74.62% <100.00%> (+1.61%) ⬆️
errors/errors.go 100.00% <ø> (ø)
internal/exec/describe_component.go 77.59% <100.00%> (+1.05%) ⬆️
...ternal/exec/describe_stacks_component_processor.go 95.42% <100.00%> (+0.02%) ⬆️
...nal/exec/stack_processor_process_stacks_helpers.go 86.66% <ø> (ø)
... and 92 more

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai

coderabbitai Bot commented Dec 23, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A 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

Cohort / File(s) Summary
Secrets Management PRD
docs/prd/secrets-management.md
New design document covering problem statements (secrets sprawl, unified CLI, declarative registry), design principles (DX, GitOps, cloud-native), configuration schemas for backends, global and component-level secret declarations, CLI surface (init, set, get, delete, list, pull, push, validate), YAML !secret function, backend implementations overview, integration points, phased rollout plan, and documentation structure.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

no-release

Suggested reviewers

  • aknysh

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and directly summarizes the main change: adding a comprehensive secrets management PRD document to the docs directory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch osterman/secrets-management

📜 Recent 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.

📥 Commits

Reviewing files that changed from the base of the PR and between acaba0f and a94847f.

📒 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.
Learnt from: CR
Repo: cloudposse/atmos PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T18:20:55.630Z
Learning: Atmos uses Gitleaks pattern library (120+ patterns) for secret masking; disable with atmos terraform plan --mask=false
📚 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-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
📚 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
🪛 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). (2)
  • GitHub Check: Acceptance Tests (windows)
  • GitHub Check: Summary
🔇 Additional comments (4)
docs/prd/secrets-management.md (4)

95-107: Cross-account/cross-tenant auth patterns are underspecified.

The PRD documents an optional identity field for backend auth, but AWS SSM/ASM should support read_role_arn and write_role_arn for cross-account access, and Azure Key Vault needs similar cross-tenant/subscription patterns. Verify these are planned for Phase 1 or clarify the scope limitation.

Based on learnings, cross-account access is essential for typical multi-account deployments (e.g., running terraform plan in multiple accounts while accessing centralized secrets).


455-490: Verify AWS SSM path pattern consistency.

Lines 470 and 487 show different path formats:

  • AWS SSM: /{prefix}/{stack}/{component}/{secret_name} (with leading /)
  • AWS ASM: {prefix}/{stack}/{component}/{secret_name} (without leading /)

Confirm this difference is intentional and consistent with how pkg/store/ currently generates SSM paths. Ensure the format doesn't create unexpected collisions.


618-750: Clarify schema location and command pattern details.

Two potential inconsistencies:

  1. Schema location (lines 619 vs 746): Package structure shows pkg/schema/secrets.go (line 619) but documentation deliverables reference pkg/datafetcher/schema/ (line 746). Confirm the correct location and whether both are needed.

  2. Command patterns (line 638-639): Phase 2 references "command registry pattern" and "flag handler pattern" from pkg/flags/. Verify these utilities exist in the codebase and document expected usage.


1-790: PRD scope and completeness are sound; defer minor linting issues to follow-up.

The document comprehensively covers the PR objectives: declarative secrets, CRUD CLI (8 commands), multi-cloud backends (6+), integration with auth/I/O/deployments, and phased implementation. Design decisions are well-justified and prior art is considered.

Minor grammar/typography issues flagged by static analysis (missing code block languages on lines 366/588/668, punctuation, typographic quotes) can be addressed in a separate documentation cleanup commit without blocking this PR. Based on learnings from PR 1686, markdownlint issues (MD040, MD010, MD034) are acceptable in PRDs and should not impede review.


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 and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Dec 23, 2025

@coderabbitai coderabbitai Bot left a comment

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.

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, and text language 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.

📥 Commits

Reviewing files that changed from the base of the PR and between acaba0f and a94847f.

📒 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 identity field (good), but per prior learnings, explicit support for cross-account operations should be documented. AWS SSM often needs separate read_role_arn and write_role_arn to enable operations like terraform plan across multiple accounts, and Azure Key Vault needs similar cross-subscription support.

Consider expanding the options sections for aws/ssm, aws/asm, and azure/keyvault to explicitly mention whether role/identity ARN fields are supported, or confirm the identity field provides sufficient abstraction.


85-175: Configuration schema is well-designed and consistent with Atmos patterns.

The kind field naming (cloud/thing format), optional identity integration, and flexible !include support align nicely with existing auth and configuration patterns. The backwards-compatibility mapping for legacy type field is thoughtful.

Note: Implementation should follow the Atmos pattern (from learning) of reading backend config values from atmosConfig.Settings in business logic rather than direct os.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 --path flag 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), kind field 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]>
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]>
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]>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jan 11, 2026
@afeblot

Copy link
Copy Markdown

Erik Osterman (Cloud Posse) (@osterman),
You seem to make the foundational statement that stores are for machine read/write, while the secret management system would be for human interactions on secrets.
But not all secrets are human generated.
How would you want to handle the use case where Terraform provisions a RDS instance, and must make the database password available to an application?

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]>
@mergify

mergify Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

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.
Consider refactoring it into smaller, more focused PRs to facilitate a smoother review process.

…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

@coderabbitai coderabbitai Bot left a comment

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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d75d09c and c8206ff.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (51)
  • .github/workflows/test.yml
  • cmd/root.go
  • cmd/secret/deps.go
  • cmd/secret/fake_service_test.go
  • cmd/secret/import.go
  • cmd/secret/import_test.go
  • cmd/secret/list.go
  • cmd/secret/set.go
  • cmd/terraform/utils.go
  • docs/prd/secrets-management.md
  • errors/errors.go
  • go.mod
  • internal/exec/describe_affected_components.go
  • internal/exec/describe_stacks_component_processor.go
  • internal/exec/stack_processor_process_stacks_helpers_inheritance.go
  • internal/exec/stack_processor_utils.go
  • internal/exec/terraform_execute_helpers.go
  • internal/exec/terraform_execute_helpers_exec.go
  • internal/exec/terraform_shell.go
  • internal/exec/yaml_func_utils.go
  • lychee.toml
  • pkg/datafetcher/schema/atmos/manifest/1.0.json
  • pkg/schema/schema.go
  • pkg/schema/secrets.go
  • pkg/secrets/errors.go
  • pkg/secrets/import.go
  • pkg/secrets/import_test.go
  • pkg/secrets/providers/provider.go
  • pkg/secrets/providers/sops.go
  • pkg/secrets/providers/store.go
  • pkg/secrets/registry.go
  • pkg/secrets/scope.go
  • pkg/secrets/scope_test.go
  • pkg/secrets/service_test.go
  • pkg/secrets/types.go
  • pkg/store/aws_secrets_manager_store.go
  • pkg/store/aws_secrets_manager_store_test.go
  • pkg/store/aws_ssm_param_store.go
  • pkg/store/aws_ssm_param_store_test.go
  • pkg/store/azure_keyvault_store.go
  • pkg/store/google_secret_manager_store.go
  • pkg/store/google_secret_manager_store_test.go
  • pkg/store/keychain_store.go
  • pkg/store/keychain_store_test.go
  • pkg/store/registry.go
  • pkg/store/secrets_stores_extra_test.go
  • pkg/store/store.go
  • pkg/utils/yaml_utils.go
  • pkg/utils/yaml_utils_test.go
  • tests/snapshots/TestCLICommands_atmos_describe_config.stdout.golden
  • tests/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

@coderabbitai coderabbitai Bot left a comment

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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d75d09c and c8206ff.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (51)
  • .github/workflows/test.yml
  • cmd/root.go
  • cmd/secret/deps.go
  • cmd/secret/fake_service_test.go
  • cmd/secret/import.go
  • cmd/secret/import_test.go
  • cmd/secret/list.go
  • cmd/secret/set.go
  • cmd/terraform/utils.go
  • docs/prd/secrets-management.md
  • errors/errors.go
  • go.mod
  • internal/exec/describe_affected_components.go
  • internal/exec/describe_stacks_component_processor.go
  • internal/exec/stack_processor_process_stacks_helpers_inheritance.go
  • internal/exec/stack_processor_utils.go
  • internal/exec/terraform_execute_helpers.go
  • internal/exec/terraform_execute_helpers_exec.go
  • internal/exec/terraform_shell.go
  • internal/exec/yaml_func_utils.go
  • lychee.toml
  • pkg/datafetcher/schema/atmos/manifest/1.0.json
  • pkg/schema/schema.go
  • pkg/schema/secrets.go
  • pkg/secrets/errors.go
  • pkg/secrets/import.go
  • pkg/secrets/import_test.go
  • pkg/secrets/providers/provider.go
  • pkg/secrets/providers/sops.go
  • pkg/secrets/providers/store.go
  • pkg/secrets/registry.go
  • pkg/secrets/scope.go
  • pkg/secrets/scope_test.go
  • pkg/secrets/service_test.go
  • pkg/secrets/types.go
  • pkg/store/aws_secrets_manager_store.go
  • pkg/store/aws_secrets_manager_store_test.go
  • pkg/store/aws_ssm_param_store.go
  • pkg/store/aws_ssm_param_store_test.go
  • pkg/store/azure_keyvault_store.go
  • pkg/store/google_secret_manager_store.go
  • pkg/store/google_secret_manager_store_test.go
  • pkg/store/keychain_store.go
  • pkg/store/keychain_store_test.go
  • pkg/store/registry.go
  • pkg/store/secrets_stores_extra_test.go
  • pkg/store/store.go
  • pkg/utils/yaml_utils.go
  • pkg/utils/yaml_utils_test.go
  • tests/snapshots/TestCLICommands_atmos_describe_config.stdout.golden
  • tests/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]>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 14, 2026
@mergify

mergify Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 14, 2026
@mergify

mergify Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

…gement

# Conflicts:
#	.github/workflows/test.yml
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 14, 2026
@mergify

mergify Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

💥 This pull request now has conflicts. Could you fix it Erik Osterman (Cloud Posse) (@osterman)? 🙏

…gement

# Conflicts:
#	internal/exec/terraform_execute_helpers.go

@coderabbitai coderabbitai Bot left a comment

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.

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 | 🟠 Major

Pass 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, and GPG_PRIVATE_KEY_PASSPHRASE. Replace secrets: inherit with 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 disabling setup-go caching on PR runs for defense-in-depth.

Lines 83 and 222 use actions/setup-go@v6 with 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: set cache: false if 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: go

Also 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

📥 Commits

Reviewing files that changed from the base of the PR and between 497eb72 and b981129.

📒 Files selected for processing (7)
  • .github/workflows/test.yml
  • cmd/root.go
  • errors/errors.go
  • internal/exec/terraform_execute_helpers.go
  • internal/exec/terraform_execute_helpers_exec.go
  • pkg/datafetcher/schema/stacks/stack-config/1.0.json
  • pkg/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

@atmos-pro

atmos-pro Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@github-actions

Copy link
Copy Markdown

Warning

Release Documentation Required

This PR is labeled minor or major and requires documentation updates:

  • Changelog entry - Add a blog post in website/blog/YYYY-MM-DD-feature-name.mdx
  • Roadmap update - Update website/src/data/roadmap.js with the new milestone

Alternatively: If this change doesn't require release documentation, remove the minor or major label.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.222.0-rc.1.

This branch was successfully deployed

1 active deployment
preview — 4a39a8f3 Deployed Jun 14, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor New features that do not break anything size/xxl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants