Guides · ← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team · 7 min read
Wildcard Principal ("Principal": "*") in a Resource Policy: What It Opens
One asterisk in the Principal field means 'anyone'. On a resource an eval touches, that includes every other agent and every anonymous caller on the internet.
The short answer: restrict the principal to the exact ARNs that need access. A statement declaring "Principal": "*" in your files is EvalEgress's wildcard_principal class (CRITICAL, weight 25). A principal of * means any identity — and, combined with an Allow effect on a resource policy, it can mean any caller at all, authenticated or not, depending on the service. Name the eval role and the specific services that legitimately act on the resource, remove the star, and verify with the free scan that the class is gone from the declared set.
What is a wildcard principal?
A principal is the identity a policy statement grants to — a role, a user, a service, an account. A wildcard principal writes that identity as *, which IAM reads as every identity; on resource-based policies, paired with Allow, it can extend the grant to anonymous callers. EvalEgress matches the "Principal": "*" shape in declared files as class wildcard_principal, CRITICAL severity, shown as written since it is structural config.
What does Principal "*" actually permit?
It permits the statement's actions to be exercised by whoever shows up. On an identity policy that means any identity the policy attaches to; on a resource policy — a bucket policy, a queue policy, a key policy — it means any identity in any account, and for several services, callers with no credentials at all once other conditions align. The dangerous combinations are quiet ones: the wildcard written for a public website asset, copied onto the bucket that later holds eval results; the wildcard added to 'fix' a cross-account eval read at midnight, still there when the bucket's contents became sensitive.
For eval work the exposure has a specific flavour. Eval results are a concentrated record — prompts, responses, the production samples inside both — and an agent-readable resource with a wildcard principal is readable by other teams' agents too, and by any automated scanner that finds the resource name. The CRITICAL weight, equal to the private-key and admin-policy classes, prices that: the star does not grant a path to the resource, it removes the concept of a path. Everyone is already in.
Who should the principals on eval resources be?
A short, boring list: the eval role itself, the role or service that writes the dataset, and — for results — the specific human roles or review tools that read outputs. Each named by ARN. Anything cross-account gets the other account's role ARN, never a star with a condition someone half-remembers writing. If a public grant is genuinely intended — a published demo dataset — it belongs on a dedicated resource containing only public material, with the decision written beside the policy, so a reviewer never has to guess whether a star is a mistake.
Conditions can narrow a wildcard — source network, organisation, request tags — and a conditioned star is a lesser finding in spirit. It is still flagged, correctly: conditions are the most commonly mis-written element in all of policy authoring, and a scanner that trusted them would miss the classic failures. Narrow the principal first; use conditions as a second layer, never as the justification for keeping the star where a name would do.
Why does this class so often arrive by copying?
Resource policies accumulate. The bucket policy that works gets cloned to the next bucket; the statement that 'fixed the demo' rides along. Eval infrastructure is especially prone because it is built from the application's infrastructure as a starting point and then drifts as experiments demand access the original never did. Each drift is a small, reasonable edit; the accumulated policy grants the union of every experiment's needs to everyone. Periodic declared-file scanning is the counter-habit: the class is a one-line pattern, so the check is cheap, and the pre-deployment checklist puts it in the permissions block where it belongs.
When you find one, read the statement's actions before you edit. A wildcard principal with read actions on a results bucket is a publication; the same star with write or delete actions is an invitation to tamper with the eval record itself — the integrity problem the evidence-pack guides return to. Fix order follows the actions: write-capable stars close today.
Worked example: Copper Canyon Rail, scored end to end
Example. Copper Canyon Rail, a fictional freight operator, evaluated a scheduling assistant. Its dataset bucket policy had been cloned from a public timetable-asset bucket — wildcard principal included — and the harness's network config opened ingress to the world so a contractor could watch runs. The scan returned:
| Finding | Class | Severity | Weight |
|---|---|---|---|
| Wildcard principal ("*") in the cloned bucket policy | wildcard_principal | CRITICAL | 25 |
| Ingress open to 0.0.0.0/0 in the harness network config | open_ingress | HIGH | 15 |
| Service bound to 0.0.0.0 in the harness config | open_binding | MEDIUM | 8 |
The arithmetic: 25 + 15 + 8 = 48 points of exposure, so the score is 100 − 48 = 52/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.
The bucket policy now names three principals: the eval role (read the dataset prefix), the data-engineering role (write it) and the review service (read results). The public timetable assets moved to their own bucket, where the wildcard is intentional and documented. Ingress was restricted to the contractor's office range for the engagement's duration, and the harness rebound to the private interface. The re-scan reported zero findings — and the cloned-policy habit was replaced with a rule: policies are written per resource, cloned never.
Close a wildcard_principal finding: the five actions
Name names — all of them, only them:
- List who legitimately acts on the resource. The eval role, the dataset writers, the results readers — by role, before you open the policy file.
- Replace the star with those exact ARNs. Cross-account access names the other account's role; public access, if truly intended, moves to a dedicated public-only resource.
- Keep conditions as a second layer, not a substitute. Network or organisation conditions can stay, but they defend a named principal — they no longer carry the grant alone.
- Read the statement's actions before re-deploying. Write or delete actions under a formerly-wild principal deserve a look at access logs for the exposure window.
- Re-scan the declared policies. Confirm wildcard_principal is absent, and file the report so the scoping survives the next cloned bucket.
A wildcard principal is the loudest line a policy can contain. Naming the real principals takes minutes once the list exists — and the list is worth having for every resource the eval touches, as the exposure guide sets out.
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, public-read bucket holding eval results, open ingress in an eval network configuration, binding an eval harness to localhost. EvalEgress is one of the Ingenious AI platforms.
Sources
- EvalEgress scoring documentation — the 16 finding classes, severity weights and declared-surface scope every judgement in this guide applies, published 2026.
- What Is Eval-to-Production Exposure? — the companion guide this page builds on, published November 7, 2026.
- AWS IAM User Guide — IAM JSON policy elements reference — AWS's reference for the Action, Principal and Resource elements these findings are read from, current edition.
Frequently asked questions
Our wildcard has a condition on it. Is it still a finding?
Yes — the class matches the star, because conditions are frequently mis-scoped and cannot be judged from the declaration alone. Narrow the principal to named ARNs and keep the condition as defence in depth.
Does Principal "*" always mean anonymous public access?
Not always — the effect depends on the policy type, the service and the other statements. It always means every identity, which is already more than any eval resource intends, and on resource policies it can extend to unauthenticated callers.
The bucket holds only a public dataset. Should the star stay?
If the resource is dedicated to public material and the grant is deliberate, document that decision beside the policy. Do not let the same bucket drift into holding eval results; dedication is what makes the exception safe.
How do I find every wildcard principal we have?
Scan every declared policy file, not just the eval's — the class is a text pattern, and the same cloning that brought it into the eval folder usually spread it elsewhere first.
What replaces the star for a contractor's temporary access?
The contractor's role ARN, named, with a removal date in the change record. Temporary and named beats temporary and universal on every axis.