Install
$ agentstack add skill-anyshift-io-sre-skills-s3-estate-calibration-auditor ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
s3-estate-calibration-auditor
Effective-exposure audit skill for an estate of AWS S3 buckets. Takes the config layers for every bucket in the estate (public-access-block.json, bucket-policy.json, bucket-acl.json, and access-points.json where present), resolves each bucket's effective verdict by composing all four layers, then answers one question a per-layer read cannot: across 8-12 buckets that mostly READ as exposed, which one is genuinely live, and is the estate otherwise clean. It returns the live bucket as the headline, ranked by severity, with a fix, then names exactly where the bucket configs stop being able to answer the question.
Effective S3 exposure is a join across four layers that each get read wrong one at a time. A public-looking bucket policy is inert under RestrictPublicBuckets; a cross-account grant survives BPA-all-on; a public-group ACL is dead under IgnorePublicAcls but a cross-account canonical user beside it is not; a clean bucket can still be public through an access point. In an estate, the trap doubles: several buckets carry a Principal '*' policy, an AllUsers ACL, or a wide-open look that is genuinely neutralised, and exactly one bucket carries a real live grant that reads just like its neutralised siblings. This skill composes the layers per bucket instead of clearing each layer in isolation, then calibrates the estate: it does not over-flag the neutralised baits, and it does not miss the buried needle.
When to invoke
- An agent is asked to review an S3 bucket fleet for public exposure, cross-account
access, or "is anything in this account public."
- An estate is being shipped or changed and the question is whether any bucket is
effectively exposed, not just whether a Principal '*' or an AllUsers grant appears somewhere in the configs.
- An estate looks exposed (several Principal '*' policies, AllUsers ACLs) and the claim
"but BPA is on / it is scoped" needs to be confirmed against the effective verdict rather than taken on trust.
- An estate looks locked down (BPA all on everywhere) and the claim "the account is
closed" needs to be checked against the cross-account grants BPA does not touch.
What this skill reads, and what it does not
It reads the static configuration of an estate of buckets: per bucket, any subset of the Block Public Access booleans, the bucket policy, the bucket ACL, and the access points. Those are S3 control-plane reads (get-public-access-block, get-bucket-policy, get-bucket-acl, list-access-points + get-access-point-policy). That is the entire input. The audit is correct and complete for what the bucket configs can tell you, and it is explicit about the rest. Reachability-on-paper is not exposure-in-fact, and every audit ends by naming the joins it cannot make:
- It does not see per-object ACLs. An individual object can carry its own
public-read grant even when the bucket is private. Join: bucket config to its per-object ACLs.
- It does not see CloudFront / CDN fronting. A bucket can be private while its data
is served publicly through a CloudFront distribution with Origin Access Control. Join: bucket to its CDN distribution.
- It does not contain the privileges of a trusted principal. A cross-account or
conditional grant only matters in proportion to what the trusted account/role can do and whether it re-shares onward, which lives in that account. Join: this bucket to the identity policies of the principals it trusts.
- It does not see VPC-endpoint policies or org SCPs, which can further restrict
access this config Allows. Join: bucket to its VPC-endpoint policies and the org SCPs.
- A flagged grant's exploitability depends on the data sensitivity of the objects,
which is not in the config.
A clean (deceptive-clean) estate still gets a boundary section, because a BPA-neutralised estate is not a proven-safe system: turning BPA off would expose the latent statements.
The model
For every bucket in the estate, build the effective verdict by composing four layers. Never read one layer alone. A finding is LIVE only when a real public or cross-account grant survives the layer that would neutralise it:
- Block Public Access (BPA) -- four booleans that neutralise otherwise-public
policy and ACL grants, but do NOT touch cross-account grants.
- The bucket policy -- a resource policy whose Principal can be public ('*'), a named
other account, or '*' narrowed by a Condition.
- The bucket ACL -- legacy grants to canonical users, or to the AllUsers /
AuthenticatedUsers public groups.
- Access points -- each with its OWN BPA and policy, able to expose data
independent of (but not exceeding) the bucket.
The estate is clean iff no bucket is live. The needle is whichever bucket carries a live finding among many neutralised/scoped lookalikes.
The methodology, in order
1. Parse all four layers for every bucket
Before any judgment, read each layer for each bucket. Process EVERY bucket in the estate, not the first couple:
- BPA: read the four booleans from
public-access-block.json. An absent file means
all four are False (no BPA). The two that neutralise existing grants are RestrictPublicBuckets / BlockPublicPolicy (for a public policy) and IgnorePublicAcls (for a public-group ACL). BlockPublicAcls only blocks new public ACLs and does not disable an existing one.
- Policy: read each
Statementinbucket-policy.json. ADenygrants nothing and
cannot make a bucket public; classify only the Allow statements. For each Allow, read the Principal (public '', a named AWS account, or '' with a Condition) and the Condition.
- ACL: read each grant in
bucket-acl.json. A Grantee that is the AllUsers or
AuthenticatedUsers Group URI is a public-group grant; a CanonicalUser that is not the bucket owner is a cross-account grant; an owner-only ACL produces nothing.
- Access points: read each entry in
access-points.json. Each AP has its OWN
PublicAccessBlock and Policy; resolve the AP policy exactly like a bucket policy, against the AP's own BPA.
Recognise the BPA switches by name, and recognise a narrowing Condition: aws:PrincipalOrgID, aws:PrincipalOrgPaths, aws:PrincipalAccount, aws:PrincipalArn, aws:SourceArn, aws:SourceAccount, aws:SourceVpc, aws:SourceVpce, aws:SourceIp, aws:VpcSourceIp, sts:ExternalId, and the access-point delegation keys s3:DataAccessPointAccount / s3:DataAccessPointArn / s3:AccessPointNetworkOrigin. Any of these on a Principal '*' scopes it to a bounded caller set.
Read each bucket's BPA booleans verbatim — do not let a bucket's name or its grants tell you what they are. Each boolean being true is the safe direction: IgnorePublicAcls: true means an existing public ACL is ignored (dead); RestrictPublicBuckets: true means a public policy is denied. Do not invert it. The dominant miscalibration is asserting a boolean value to fit an expectation: a bucket named exports, public, share, partner, or cdn, or any bucket carrying an AllUsers / AuthenticatedUsers grant, invites the assumption that it must be the exposed one — and that assumption makes you misread its IgnorePublicAcls as false. In these estates the common case is the opposite: a shareable-sounding bucket with an AllUsers grant and IgnorePublicAcls: true, which is neutralised, not live. The presence of a grant is not evidence about the boolean. To keep the transcription faithful: for any bucket carrying an AllUsers / AuthenticatedUsers ACL grant or a Principal '*' policy, paste that bucket's entire public-access-block.json as a verbatim JSON block before you classify it, and read the four booleans out of the pasted block. Pasting the raw object is harder to get wrong than filling a value in from memory, which is where the misread creeps in.
2. Resolve each bucket's effective verdict (the composition)
Compose the layers; do not condemn a bucket on "Principal '*' is present" alone, and do not clear it on "BPA is on" alone. The codes:
- POLICY-PUBLIC (critical, LIVE) -- the bucket policy allows Principal '*' with NO
narrowing Condition, and BPA is NOT restricting (RestrictPublicBuckets and BlockPublicPolicy both off). Live public exposure: anyone on the internet can perform the granted actions.
- AP-PUBLIC (critical, LIVE) -- an access point's own policy allows Principal '*' with
no Condition and the AP's own BPA is not restricting. Data is reachable publicly through the access point even when the bucket policy and bucket BPA are clean. Auditing only the bucket misses this.
- XACCT-POLICY (high, LIVE) -- the bucket policy grants a named other account. This is
NOT public, so BPA does not govern it: a cross-account grant stays fully live even with all four BPA switches on. The classic misread is seeing BPA-all-on and calling the bucket locked down.
- XACCT-ACL (high, LIVE) -- the bucket ACL grants a canonical user that is not the
bucket owner. IgnorePublicAcls neutralises the public GROUPS, not a named canonical user, so this grant survives BPA-all-on. A TLS-only Deny in the policy does not address it.
- ACL-PUBLIC (high, LIVE) -- the bucket ACL grants the AllUsers / AuthenticatedUsers
group and IgnorePublicAcls is OFF. Live public via ACL, independent of the bucket policy.
These five are the only codes that count as live exposure. The next three READ as exposed but are NOT live, and must never be reported as a live public/exposed bucket:
- POLICY-PUBLIC-BLOCKED (info, neutralised) -- a Principal '*' policy that
RestrictPublicBuckets / BlockPublicPolicy renders inert. Effective verdict: NOT public. Note it as latent risk (turning BPA off would expose it), not as live exposure.
- ACL-PUBLIC-IGNORED (info, neutralised) -- a public-group ACL grant that
IgnorePublicAcls makes ineffective. Effective verdict: NOT public via this ACL.
- COND-SCOPED (low, scoped) -- a Principal '*' narrowed by a Condition (org / IP /
source account or VPC / ExternalId / access-point delegation). This is conditional or org-scoped sharing, NOT public: a caller outside the condition is denied. Reading Principal '*' and stopping there is the misread this guards against.
3. Surface the buried live needle (LOAD-BEARING)
On a NEEDLE estate, name the ONE genuinely live bucket as A (the) PRIMARY finding, with the reason it is live, instead of burying it among the neutralised lookalikes or missing it. The live bucket reads just like its neutralised/scoped siblings; the pass is naming exactly that one and why:
- A cross-account policy or ACL survives BPA-all-on (XACCT-POLICY / XACCT-ACL): BPA only
neutralises public grants.
- A missing Condition makes a Principal '*' policy public (POLICY-PUBLIC) when its
scoped-looking siblings carry an org id / ExternalId / SourceIp.
- A named canonical user survives IgnorePublicAcls (XACCT-ACL) when the AllUsers grants
beside it are correctly ignored.
State the live bucket by name, the code, and the layer it is grounded in.
4. Stay quiet on the deceptive-clean estate (LOAD-BEARING)
This is the half the naive read gets wrong in the other direction. An estate where every bucket is neutralised or scoped is CLEAN, and the audit must say so instead of manufacturing a finding. The composition in step 2 is what proves it. Specifically:
- A public-looking ACL with IgnorePublicAcls on is not live. Do not report it as a
public bucket.
- A **Principal '' policy with RestrictPublicBuckets / BlockPublicPolicy on* is not live.
Do not report it as a public bucket.
- A **Principal '' narrowed by org / IP / external-id / access-point delegation* is scoped
sharing, not public. Do not read Principal '*' and call it public.
- Do not drown the clean verdict, or the one real finding, in a wall of nitpicks about the
correctly-neutralised buckets.
On a clean estate the audit reports: NO live exposure anywhere, why the exposed-looking buckets are neutralised or scoped (the BPA switch or the Condition), and the boundary. It does not invent a critical. Noting the neutralised statements as latent / defence-in-depth is fine; asserting live public exposure is not.
5. Rank and report, then name the boundary
Order findings by severity (critical for a public policy or public access point, high for a cross-account or public-group grant). Rank the live needle as the headline; do NOT headline a neutralised/scoped bucket, and on a clean estate do not invent a critical. For each finding: the bucket and layer it is grounded in, what the exposure is, and the fix. Then list the boundary from "What this skill reads." A clean estate still gets a boundary section.
Recommendations
Fix the live bucket; do not rip out intentional scoped sharing or the BPA-neutralised buckets as if they were live leaks:
- POLICY-PUBLIC / AP-PUBLIC: remove the public statement, or replace Principal '*' with
the specific accounts/roles that need access. If public read is genuinely intended (a static site), front it with CloudFront + Origin Access Control instead of a public bucket or access point, and turn RestrictPublicBuckets on.
- XACCT-POLICY / XACCT-ACL: confirm the other account is a deliberate, current trust and
the actions are minimal; scope to specific prefixes and prefer an aws:PrincipalOrgID / sts:ExternalId condition over a bare account root. For an ACL grant, express the sharing as a scoped bucket policy and disable ACLs with Bucket Owner Enforced. BPA-all-on does not make a cross-account bucket safe.
- ACL-PUBLIC: remove the public ACL grant and set IgnorePublicAcls + BlockPublicAcls;
prefer bucket policies over ACLs.
- Neutralised / scoped buckets (POLICY-PUBLIC-BLOCKED, ACL-PUBLIC-IGNORED, COND-SCOPED):
no live fix. As defence in depth, optionally remove the latent public statement or ignored ACL so the bucket does not depend on BPA staying on as its only guardrail; for a scoped bucket, confirm the condition value (the org id, the ExternalId, the SourceIp CIDRs) is the intended one and leave the grant in place if the scope is correct.
Severity model
| Severity | Meaning | |---|---| | critical | Live public exposure: a Principal '' bucket policy with BPA not restricting (POLICY-PUBLIC), or a public access-point policy (AP-PUBLIC). | | high | Live cross-account or public-group exposure that BPA does not close: cross-account policy (XACCT-POLICY), cross-account canonical-user ACL (XACCT-ACL), public-group ACL with IgnorePublicAcls off (ACL-PUBLIC). | | low | A Principal '' scoped by a Condition (COND-SCOPED): conditional sharing to verify, not public exposure. | | info | A neutralised grant present but inert (POLICY-PUBLIC-BLOCKED, ACL-PUBLIC-IGNORED): latent risk if BPA is turned off, not live exposure. |
Only the critical and high bands are LIVE exposure and count toward the estate verdict. The low and info bands are exposed-looking-but-not-live; they are notes, never the headline.
Rule reference
| Code | Rule | Severity | Live | Grounded in | |---|---|---|---|---| | POLICY-PUBLIC | Bucket policy Principal '', no Condition, BPA not restricting | critical | yes | bucket policy x BPA | | AP-PUBLIC | Access-point policy Principal '', AP BPA not restricting | critical | yes | access-point policy x AP BPA | | XACCT-POLICY | Bucket policy grants a named other account | high | yes | bucket policy (BPA does not touch it) | | XACCT-ACL | Bucket ACL grants a non-owner canonical user | high | yes | bucket ACL (IgnorePublicAcls does not touch it) | | ACL-PUBLIC | Bucket ACL grants AllUsers / AuthenticatedUsers, IgnorePublicAcls off | high | yes | bucket ACL x BPA | | COND-SCOPED | Principal '*' narrowed by a Co
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: anyshift-io
- Source: anyshift-io/sre-skills
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.