Skip to content

Add s3-access-denied-resolver skill - #302

Open
saadnu-aws wants to merge 1 commit into
aws:mainfrom
saadnu-aws:feature/s3-access-denied-resolver
Open

saadnu-aws wants to merge 1 commit into
aws:mainfrom
saadnu-aws:feature/s3-access-denied-resolver

Conversation

@saadnu-aws

Copy link
Copy Markdown

Description

Adds s3-access-denied-resolver, a read-only skill that diagnoses an Amazon S3 403 AccessDenied. A single S3 request can be denied by any of ten layers (SCP/RCP, VPC endpoint policy, Block Public Access, bucket policy, access point policy, identity policy, permissions boundary, session policy, Object Ownership/ACLs, KMS key policy), and the error message often does not say which. The skill reads each layer, assigns one verdict from a closed set (DENIED_BY, WOULD_ALSO_DENY, ALLOWED_BUT_UNVERIFIABLE, CANNOT_DETERMINE, NOT_APPLICABLE), names the denying layer and statement, and proposes the smallest fix as a diff for the operator to review. It uses IAM policy simulation only as corroboration, because simulation does not evaluate VPC endpoint or session policies. When the Agent Space refuses bucket-level S3 reads, it falls back to AWS Config, the owning CloudFormation stack and CloudTrail, and says which source each verdict rests on.

Type of change

  • New skill

Required before review

  • Repository layout is correct: skills/s3-access-denied-resolver/.
  • A domain SME has reviewed and signed off.
  • Evaluation evidence is included (see Testing).
  • No internal-only or proprietary content.
  • README is complete: prerequisites, setup, sample prompts.
  • CHANGELOG updated and the version set (1.0.0).
  • Named owner: saadnu-aws.

Testing

  • structure checks pass (12/12).
  • best-practices run across 3 iterations, all passing.
  • functional run with and without the skill, 3 iterations per scenario.
  • evals/evals.json includes 6 positive cases and 4 negative cases.

Functional results (with skill vs. without):

Scenario Skill triggered Expected output Assertions
Bucket policy explicit deny 3/3 3/3 vs 0/3 11/12 vs 0/12
KMS key policy deny 3/3 3/3 vs 2/3 11/12 vs 9/12
Permissions boundary 3/3 3/3 vs 3/3 12/12 vs 8/12
Identity policy on the bucket ARN instead of bucket/* 3/3 3/3 vs 3/3 9/9 vs 6/9
VPC endpoint policy scoped to another bucket 3/3 3/3 vs 3/3 12/12 vs 8/12
"Fix it for me" (must stay read-only) 3/3 3/3 vs 3/3 6/6 vs 3/6
Four unrelated questions (503 SlowDown, CloudFront 403, Bedrock role, least-privilege review) did not trigger, 12/12 n/a n/a
  • Bucket policy shows the largest gain. Without the skill the agent could not name the denying statement in any of the three runs. With it, the skill read the policy (through its fallback sources when the direct read was refused) and named the statement.
  • Permissions boundary, wrong ARN, VPC endpoint: the base agent usually reaches the right layer, so expected-output scores tie. The skill adds the full ten-layer verdict table, the later blockers, and a fix scoped to the denying layer, which is where the assertion gap comes from. The quality judge preferred the with-skill answer on these three.
  • Known limitation. In the Agent Space used for testing, direct bucket-level S3 reads (GetBucketPolicy, GetBucketEncryption, GetBucketOwnershipControls, GetPublicAccessBlock) were refused as "blocked by policy" in many runs, and added IAM permissions did not reliably lift it. The skill then reports CANNOT_DETERMINE instead of guessing, or uses the fallback sources. The README documents this and the extra read actions the fallbacks need.
  • Not covered: an SCP/RCP scenario (needs an Organizations test account), and Block Public Access, access point, session policy and ACL scenarios.

Skills

  • SKILL.md frontmatter is valid (88-line body).
  • The description is written from the agent's point of view: error messages, API calls, symptoms.
  • Scoped to CHAT, INCIDENT_RCA.
  • Procedure is a checklist with verdicts on real conditions, not flat prose.
  • The layer table, account rules and fallbacks live in references/ and load on demand.
  • Non-executable content only.

Security and safety

  • Read-only by default. The skill never calls a write API and proposes changes only as a diff for human review.
  • Customer data stays in the customer's account. Object reads are metadata only, and the optional HeadObject read is flagged in the README because s3:GetObject can also read contents.
  • No destructive operations.

License confirmation

  • Apache License 2.0.

Add a read-only skill that walks the ten layers that can deny an S3
request, names the denying layer and statement, and proposes the
smallest fix as a diff for human review.
@github-actions github-actions Bot added the needs-checklist PR checklist incomplete — not reviewed until resolved label Nov 22, 2026
@github-actions

Copy link
Copy Markdown

This PR is on hold — checklist incomplete

Required items in the PR description are unchecked. A maintainer will not review this PR until each one is checked and actually done.

The check's summary lists them. Complete the work, tick the boxes, and this clears automatically. CONTRIBUTING.md explains each item.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-checklist PR checklist incomplete — not reviewed until resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant