fix(bootstrap): least-privilege policies grant no agent-registry actions — deliberate exclusion or coverage gap?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- aws, typescript
- Domain
- authorization, cloud, infrastructure
Research direction
Start with cdk/src/bootstrap/policies/ and cdk/src/constructs/registry.ts:90-104, comparing the deploy-role policy scope with the custom resource Lambda role. Run the two grep commands in the issue, then read cdk/test/bootstrap/synth-coverage.test.ts to understand its resource-to-action mapping. Done means the intended ownership is established and either the required actions are covered or the exclusion is documented, with coverage behavior addressed if appropriate.
Written by the indexing model from the issue text.
Description
Component: cdk (bootstrap policies)
Describe the bug
The least-privilege bootstrap policies grant no agent-registry:* actions at all, even though the stack creates an AWS::CloudFormation::Stack containing a Custom::AgentRegistry resource whose backing registry is a real, billable AWS resource.
$ grep -rc 'agent-registry' cdk/src/bootstrap/policies/
0
Nothing is broken today, which is why this has gone unnoticed: the registry's control-plane calls (CreateRegistry, GetRegistry, UpdateRegistry, DeleteRegistry) run under the custom resource's Lambda execution role, granted at cdk/src/constructs/registry.ts:90-104 — not under the CloudFormation execution role the bootstrap policies scope.
The question is whether that's the intended design. If deploy-role coverage is meant to span every resource type the stack creates, this is a gap. If routing resource creation through a custom resource's own role is an accepted pattern for preview services, it's worth saying so explicitly, because the asymmetry currently reads as an oversight.
Expected behavior
One of:
- The bootstrap policies cover
agent-registryactions, consistent with every other resource type the stack provisions; or - A comment in
cdk/src/bootstrap/policies/(ordocs/design/DEPLOYMENT_ROLES.md) records that custom-resource-provisioned services are deliberately out of scope for the deploy role, and why.
Current behavior
No agent-registry actions anywhere in cdk/src/bootstrap/. A reader auditing the deploy role against the synthesized template finds a resource type with no corresponding grant and no explanation.
Reproduction steps
grep -rn 'agent-registry' cdk/src/bootstrap/ # no hits
grep -n 'agent-registry' cdk/src/constructs/registry.ts # grants on the Lambda role instead
Possible solution
Decide which of the two above is intended, then either add the actions or document the exclusion. Worth checking at the same time whether cdk/test/bootstrap/synth-coverage.test.ts can be taught to notice this class of gap — it currently maps CloudFormation resource types to required actions, and a Custom:: resource whose real work happens under a different role is exactly the case it cannot see.
Notes
Found during review of #868 by @isadeks, who confirmed via git log -S that it is pre-existing and untouched by that diff, so it was deliberately kept off that PR.
Related: #865 — the same bootstrap policies also fail to authorize nested-stack resources, because they scope every ARN to the backgroundagent-dev-* prefix that nested-stack physical names do not carry. Both are bootstrap-coverage gaps found the same way and may be worth resolving together.
Environment
- Commit
e96dc21e
- Dominant language
- TypeScript
- Stars
- 158
- Forks
- 49
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 17
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/sample-autonomous-cloud-coding-agents
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws-samples/sample-autonomous-cloud-coding-agents#908 ·
Maintainers usually reply within 1 day
-
bug v1
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws-samples/sample-autonomous-cloud-coding-agents#886 ·
Maintainers usually reply within 1 day
-
bug v1
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
aws-samples/sample-autonomous-cloud-coding-agents#861 ·
Maintainers usually reply within 1 day
-
documentation P2 security
Difficulty 2/5 1-2 days Newbie friendliness 74/100
aws-samples/sample-autonomous-cloud-coding-agents#793 ·
Maintainers usually reply within 1 day
-
Docs: How to clear previously set attributes for a blueprintMay be free again @rkumarus-aws claimed this 43 days ago, and no pull request is open. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aws-samples/sample-autonomous-cloud-coding-agents#767 · 2 comments ·
Maintainers usually reply within 1 day
All issues in aws-samples/sample-autonomous-cloud-coding-agents
Similar issues
-
Add: VIVE TVOpenapproved check:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
iptv-org/iptv#55293 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Fission-AI/OpenSpec#2084 ·
Maintainers usually reply within 2 days
-
Contrib indemnité de départ à la retraite : faire le pont avec le simulateur sur la page génériqueOpenP1
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
SocialGouv/code-du-travail-numerique#7561 ·
Maintainers usually reply within 1 day
-
beginner bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
hiero-ledger/hiero-sdk-js#4517 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
kubernetes-sigs/headlamp#7950 ·
Maintainers usually reply within 3 days