Guides · ← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team · 7 min read

Service-Wide IAM Wildcard ("s3:*") in an Eval Policy: How to Narrow It

"Just the storage service" sounds scoped until you list what the storage service can do — including deleting every object it holds.

The short answer: narrow it to the operations the eval performs. A service-wide wildcard — an Action element like "s3:*" — in a declared eval policy is EvalEgress's wildcard_iam_service class (HIGH, weight 15). It grants every operation the named service defines on the covered resources: for a storage service that includes reading every object, overwriting, deleting and changing access policies. List the calls your harness actually makes, write those as named actions on the dataset and results prefixes only, and verify with the free scan that no service wildcard remains in the declared set.

What is a service-wide IAM wildcard?

A service-wide IAM wildcard is an Action element that pairs one service prefix with a star — s3:*, dynamodb:*, logs:* — granting every operation that service exposes. It sits between a single named action and the full "Action": "*": narrower than the whole account, wider than any real workload. EvalEgress matches the service:* shape as class wildcard_iam_service, HIGH severity, and shows the structural line as written.

Why does a single-service wildcard still over-grant?

Because modern services are not single-purpose. The storage service an eval reads its dataset from is the same service that can delete the bucket, re-publish it, rewrite its policy and read every other prefix the account keeps there — including prefixes belonging to production. The wildcard does not distinguish the eval's dataset folder from the account's evidence archive; the Resource element might, but service wildcards are usually written beside a broad Resource too, copied from the same tutorial. The grant that results is 'everything about storage, everywhere' — for a workload that performs two reads and a write.

There is also a growth problem. Services add operations constantly, and a wildcard silently includes each new one the day it ships. A named-action policy means what it meant when you wrote it; a service wildcard means 'whatever this service becomes'. For an identity held by an automated agent, that open-endedness is the finding, and it is why the class exists separately from the full wildcard in the exposure model — the shape is common enough, and fixable enough, to deserve its own line.

How do you narrow s3:* to what an eval needs?

Start from the traffic, as with any scoping: the eval reads dataset objects (a Get on one prefix), writes results (a Put on another), perhaps lists a prefix to discover files (a List on the bucket, conditioned on the prefix). That is the typical whole of it — three or four named operations where the wildcard granted dozens. Write them explicitly, bind them to the two prefixes, and the policy becomes a description of the eval that a reviewer can check against the harness in minutes.

Expect one surprise: the operation you forgot is usually listing or a start-up read of a config object. Run the narrowed policy in staging once; each denial names its missing action, and you add it — named, on its resource, with a comment. What you never do is respond to a denial by widening back toward the star. The narrowed policy plus one logged staging run converges quickly, and the re-scan confirms the service-wildcard pattern is gone from the declared files.

Which services' wildcards deserve the fastest attention?

Storage first — it holds the data, and its wildcard covers reading and destroying it. Then any service whose operations include granting or logging: a wildcard over the identity service is effectively the full wildcard by instalments, since it can mint broader credentials; a wildcard over the logging service can silence the record. Model-invocation services sit lower for most evals because their operations are the eval's legitimate purpose — but even there, the wildcard usually covers account-level operations (deleting endpoints, changing provisioned capacity) that no eval run should hold.

Read the class in context with the rest of the report. A service wildcard beside a copied credentials file and an open ingress rule is one copied folder expressing itself three ways; the folder's provenance is the root fix. The classes were designed to be triaged together — the weights let you order them, and the checklist walks them in that order.

Worked example: Blue Mesa Energy, scored end to end

Example. Blue Mesa Energy, a fictional utility cooperative, evaluated a meter-reading assistant. The eval policy granted the storage service in full so the team would 'stop hitting permission errors', and the results bucket it wrote to was declared public-read for a dashboard experiment. The scan returned:

FindingClassSeverityWeight
Service-wide wildcard ("s3:*") in the eval policywildcard_iam_serviceHIGH15
Public-read ACL on the eval results bucketpublic_bucket_aclHIGH15
JWT token pasted into the eval environment filejwt_tokenMEDIUM8

The arithmetic: 15 + 15 + 8 = 38 points of exposure, so the score is 100 − 38 = 62/100, grade C. Scoring uses EvalEgress's published weights — CRITICAL 25, HIGH 15, MEDIUM 8, LOW 3 — with grades at A ≥ 90, B ≥ 75, C ≥ 50 and D ≥ 25.

A logged run showed the harness used four storage operations. The replacement policy names exactly those, split across the dataset prefix (read) and the results prefix (write), the bucket went private, and the pasted token was replaced with a start-up sign-in by an eval service account. The permission errors the team had feared turned out to be two missing named actions, added the same afternoon. The re-scan reported zero findings — and storage access for the eval is now a four-line policy anyone on the team can recite.

Narrow a service-wide wildcard: the five actions

Observed operations in, star out:

  1. Log one real eval run and list the operations it calls. Per service, per resource — the inventory comes from traffic, not from the service's documentation or memory.
  2. Write named actions bound to named resources. Dataset prefix read-only, results prefix write-only; the policy should read as a description of the eval itself.
  3. Remove the service wildcard entirely. Do not leave s3:* beside the scoped statements 'temporarily' — grants union, so the star would silently override your narrowing.
  4. Stage once and answer denials with single named actions. Each denial names what it needs; add that line with a comment, never a broader pattern.
  5. Re-scan the declared policies. Confirm wildcard_iam_service is absent and file the scoped policy with the run record, so the narrowing is reviewable later.

A service wildcard feels like a compromise and behaves like a grant. Narrowing it takes one logged run and an hour — the method generalises to every policy the eval holds, as the full-wildcard guide shows.

Keep checking the boundary

Run the free exposure scan on the files your next eval will run with. Compare plans, read the scoring documentation, and keep reading: what is eval-to-production exposure?, what is egress in AI evaluation?, pre-deployment eval safety checklist, how to stop an AI evaluation from reaching production secrets, AdministratorAccess on an eval role, wildcard principal in a resource policy, public-read bucket holding eval results. EvalEgress is one of the Ingenious AI platforms.

Sources

Frequently asked questions

Is s3:* really worse than the handful of actions I need?
It grants every storage operation on the covered resources — read all, overwrite, delete, re-publish — including operations the service adds in future. Your eval needs a handful; the wildcard grants the catalogue.

Why is this HIGH and not CRITICAL like AdministratorAccess?
It is bounded to one service, which is a real boundary — but within storage, that boundary contains the data itself. CRITICAL is reserved for grants that cross the whole account in one line: admin policies, wildcard principals, private keys.

My Resource element is narrow. Does that make the wildcard safe?
Safer, not safe: every operation on that resource is still granted, including deleting it and changing its policy. Narrow resources plus named actions is the end state; either alone is half the fix.

How do I discover the actions my eval uses?
Run it once with access logging under the current policy and harvest the called operations, or read the harness's storage calls directly. Then verify the narrowed policy with one staging run.

Does the finding include the resource it applies to?
The report shows the declared line as written — structural config is not redacted — so the action pattern is visible in context with its surrounding statement.