feat(bootstrap): resource-action-map for synth-time validation#165
Open
scottschreckengaust wants to merge 7 commits into
Open
feat(bootstrap): resource-action-map for synth-time validation#165scottschreckengaust wants to merge 7 commits into
scottschreckengaust wants to merge 7 commits into
Conversation
d31fd4d to
d3a9804
Compare
Contributor
Author
Note: this branch currently sits on top of feat/bootstrap-template (#162). When #162 merges to main, I'll retarget and rebase per ADR-001 §8 — the scaffold commit |
Replace comment toggle with proper context gate. ECS resources only synthesize when compute_type=ecs is passed. Default (agentcore) behavior unchanged. Closes #164 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…are policy selection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Maps all CloudFormation resource types used by the ABCA stack to their required IAM actions per lifecycle phase (create/read/update/delete). Actions are sourced from CloudTrail-validated policies in DEPLOYMENT_ROLES.md. Tests validate structure, format, and policy coverage (with known gaps for SQS, S3 bucket lifecycle, and Lambda ESM/Layer actions documented). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Validates that all resource types in the synthesized CloudFormation template have entries in the resource-action-map. Tests agentcore from existing cdk.out and attempts ECS synth gracefully skipping when AWS credentials are unavailable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ed0cf6b to
ab01560
Compare
compute_type drives which compute policy is needed — agentcore and ecs are independent choices, not base+optional. An operator deploying only ECS should not require agentcore permissions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
krokoko
reviewed
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #124
Closes #164
Creates a mapping from CloudFormation resource types to required IAM actions (CRUD lifecycle), scoped to all resource types in this app's synthesized template. Introduces
getRequiredBootstrapPolicies()for downstream consumption by the Aspect (#125) and preflight validator (#126). Gates ECS construct oncompute_typecontext variable (replaces comment toggle).Stack position
PR 5 for #120 — least-privilege CDK bootstrap policies as code
Prior: Custom template generator + compute variants (PR #162, #123)
This PR: Resource-action-map + ECS context gate + required-policies module
Next: CDK Aspect for policy envelope checking (#125)
Key decisions
Deliverables
Test plan
Open questions
Implementation plan
See: docs/superpowers/plans/2026-05-21-resource-action-map.md
Blocked by: #123 (PR #162)
References: RFC #120, ADR-002
🤖 Generated with Claude Code