WEB-11460: Add SSM secret seeding and placeholder-guard make helpers - #4
Conversation
Add ssm.mk with ssm_put (create/update a single SecureString), ssm_sync (seed placeholder SecureStrings for missing keys from a committed key-name list, never overwriting existing values) and ssm_guard (fail when any referenced key is missing or still holds the PENDING sentinel). Parameters follow the RFC #356.1 convention /ecs/<env>/<service>/<KEY>, service defaulting to the repo name. Add a Docker/AWS-free test harness (test/ssm.sh) wired into CI, and document the targets in docs/ssm.md and the README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 Walkthrough
WalkthroughChangesThe change adds AWS SSM SecureString Make helpers, usage documentation, offline validation, and a CI workflow step. SSM Parameter Store integration
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@docs/ssm.md`:
- Line 21: Update the setup section in docs/ssm.md to include a Makefile example
that opts into ssm.mk through MAKE_FILES before the configuration sections. Show
consumers where to add ssm to MAKE_FILES so the documented targets become
available.
- Around line 59-64: Update the fenced code block containing the ssm.keys
example to specify the text language on its opening fence, while leaving the
listed keys unchanged.
In `@test/ssm.sh`:
- Around line 90-93: Extend the `ssm_guard` test in `test/ssm.sh` to execute the
exported guard program with a fake `aws` command returning a known placeholder,
capture both stdout and stderr, and assert neither contains the placeholder
value. Preserve the existing decryption and comparison assertions while adding
explicit output-leak checks.
🪄 Autofix
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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: d0ffdc2e-936f-461a-b9ea-b3b96032a7ba
📒 Files selected for processing (5)
.github/workflows/test.yamlREADME.mddocs/ssm.mdssm.mktest/ssm.sh
- docs/ssm.md: document the MAKE_FILES opt-in step and tag the ssm.keys fenced block with `text` (markdownlint MD040). - test/ssm.sh: run ssm_guard end-to-end against a fake aws returning a canary value and assert the decrypted value never reaches stdout/stderr. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Adds shared
makehelpers to support the RFC #356.1 model: seed AWS SSM Parameter Store secrets out-of-band and guard a deploy against unset placeholders. Living in the shared helpers means every repo inherits it. Parameters follow the RFC convention/ecs/<env>/<service>/<KEY>, with the service segment defaulting to the repo name so no per-repo config is needed.Changes
make ssm_sync:ssm_sync/ssm_sync_<env>reads a committed key-name list and, per key, creates a placeholderSecureStringonly when the parameter is missing (checked viaget-parameter); the seedput-parameterdeliberately omits--overwrite, so an existing value is never touched.make ssm_put:ssm_put/ssm_put_<env>runsput-parameter --type SecureString --overwritefor a singleKEY/VALUE— create-or-update.PENDINGsentinel (SSM_PLACEHOLDER, overridable).ssm_guard/ssm_guard_<env>fails (non-zero) when any referenced key is missing or still holds the sentinel, so a placeholder cannot reach a deployed task. It reads values--with-decryptionand never prints them.docs/ssm.mddocuments every target and config knob; the README "further reading" list gains anssmentry.test/ssm.sh(mirrorstest/php_tests_worktree.sh) wired into.github/workflows/test.yaml.Out of scope: no
ssm.keysfile is committed here — the key-name list belongs to each consuming repo.How to test
./test/ssm.sh— all assertions pass (also runs in CI).make -f ssm.mk -n ssm_sync_production→ confirm the/ecs/production/<service>path andPENDINGsentinel.make ssm_sync_<env>seeds missing keys only;make ssm_guard_<env>exits non-zero while any key is stillPENDING;KEY=... VALUE=... make ssm_put_<env>sets a real value.Deployment notes
Consuming repos opt in by adding
ssmto theirMAKE_FILESand committing anssm.keyslist.ssm_guardin CI needsssm:GetParameter+ KMS decrypt;ssm_sync/ssm_putneedssm:PutParameter.Closes WEB-11460