A GitHub Actions job that assumes an AWS role through OIDC fails with one line:
Error: Not authorized to perform sts:AssumeRoleWithWebIdentity That line is the same whether the audience is wrong, the sub pattern is wrong, the condition key doesn't exist, or the IAM OIDC provider is missing. Entra is a little better: it tells you AADSTS700213 (no matching federated identity record), but not which part of a flexible credential failed. So you end up decoding the token by hand and reading the trust policy side by side.
saysno does that part for you. You give it the token and the trust configuration. It runs every check the provider runs and prints each one as PASS or FAIL, with the expected and actual values and a fix. It works offline and sends nothing to AWS or Azure.
- Source: https://github.com/dyokto/saysno (Apache-2.0, Go)
- Docs: https://dyokto.github.io/saysno/
The immutable sub change
Since 2026-07-15, GitHub sends sub in an immutable form for repositories that are created, renamed or transferred (changelog). The owner and repository IDs go into the subject:
repo:octo-org/deploy-app:ref:refs/heads/main # name form repo:octo-org@1000001/deploy-app@2000002:ref:refs/heads/main # immutable form A trust policy written for the name form stops matching on the new repo, and AWS gives you the same one line. The repository ships fixtures for exactly this, so you can run it without an AWS account:
go install github.com/dyokto/saysno@latest git clone --depth 1 https://github.com/dyokto/saysno && cd saysno saysno check --at 2026-12-03T09:05:00Z \ --policy testdata/aws/trust-name-form.json testdata/tokens/github-immutable.jwt --at pins the clock to when the fixture token was valid. The middle of the output:
Statement[0] GitHubDeploy Allow does not apply PASS Principal.Federated expected "arn:aws:iam::111122223333:oidc-provider/token.actions.githubusercontent.com" actual "arn:aws:iam::<account>:oidc-provider/token.actions.githubusercontent.com" PASS Action actual "sts:AssumeRoleWithWebIdentity" PASS StringEquals token.actions.githubusercontent.com:aud actual "sts.amazonaws.com" FAIL StringLike token.actions.githubusercontent.com:sub expected "repo:octo-org/deploy-app:ref:refs/heads/main" actual "repo:octo-org@1000001/deploy-app@2000002:ref:refs/heads/main" verdict DENIED no Allow statement matches the token (implicit deny) likely fix 1. The token's sub uses GitHub's immutable-ID form (repo:octo-org@1000001/deploy-app@2000002:...), but the trust pattern "repo:octo-org/deploy-app:ref:refs/heads/main" uses the name form. Repositories created, renamed or transferred after 2026-07-15 (or opted in) send the immutable form, so name-based patterns stop matching. try: repo:octo-org@1000001/deploy-app@2000002:ref:refs/heads/main The exit status is 1. With trust-immutable.json, which uses the try: value and also pins repository_id, it prints verdict ALLOWED and exits 0.
The output ends with what it did not check, because those are outside the two inputs:
not checked (outside the inputs) - that an IAM OIDC provider for token.actions.githubusercontent.com exists in the role's account and lists "sts.amazonaws.com" among its client IDs (audiences) - resource control policies (RCPs) and the role's other settings; an RCP can deny sts:AssumeRoleWithWebIdentity - the token signature (no --verify-jwks) In a real job you run it right after the failing step, because the token expires within minutes. The step to copy is in Getting the token in GitHub Actions. Don't paste the token anywhere; saysno decode shows the claims without it.
Mistakes that look fine in the policy
saysno reverse reads a trust policy without a token and says what it accepts. I ran it on testdata/aws/trust-broad.json, which has three statements with common mistakes. These are the findings (trimmed to the ones worth reading):
findings CRITICAL Statement[2] Anything: sub pattern "repo:*:ref:refs/heads/main" matches repositories of every GitHub owner. HIGH Statement[0] OrgWide: sub pattern "repo:octo-org/*" accepts every repository of octo-org, including repositories created later, on any branch, tag, environment or pull_request run. HIGH Statement[2] Anything: ForAllValues:StringLike on the single-valued key token.actions.githubusercontent.com:sub: ForAllValues is true when the key is missing, and AWS advises against set operators on single-valued keys. Use StringLike. MEDIUM Statement[1] Staging: token.actions.githubusercontent.com:repository_owner is not a key AWS populates for this provider, so StringEquals can never be true (or, if negated, is always true). MEDIUM Statement[1] Staging: StringEquals "repo:octo-org/staging-*:ref:refs/heads/main": StringEquals compares * and ? literally, so this value only matches a subject that contains those characters. Use StringLike. The repository_owner one is easy to miss. The token has a repository_owner claim. AWS still doesn't turn it into a condition key. The IAM condition key reference lists the GitHub keys AWS maps: actor, actor_id, job_workflow_ref, repository, repository_id, repository_owner_id, workflow, ref, environment and enterprise_id, on top of the default amr, aud, email, oaud and sub. Anything else is missing from the request context, so a StringEquals on it can never be true. saysno uses that table and nothing else.
reverse exits 1 when there is a high or critical finding, so it can run in CI on the policy files you keep in the repo.
Entra flexible credentials
The same idea works for Microsoft Entra federated identity credentials, including the flexible ones with a claimsMatchingExpression. Here is a flexible credential that someone wrote with a name-form pattern, checked against a token from a new repository:
Credential[0] github-any-branch (flexible) does not apply PASS issuer actual "https://token.actions.githubusercontent.com" PASS audiences actual "api://AzureADTokenExchange" FAIL claims['sub'] matches expected "repo:octo-org/deploy-app:ref:refs/heads/*" actual "repo:octo-org@1000001/deploy-app@2000002:ref:refs/heads/main" PASS claims['repository_id'] eq actual "2000002" verdict DENIED no federated identity credential matches the token Entra would only say AADSTS700213 here. saysno points at the one clause that failed and suggests repo:octo-org@1000001/deploy-app@2000002:ref:refs/heads/*.
When the docs disagree, it says so
One rule runs through the code: no evidence is never a pass. An operator saysno doesn't implement (NumericEquals, IpAddress, ArnLike ...), a claim of a shape it doesn't understand, or an expression it can't parse comes out as cannot evaluate with exit 2. It is never reported as allowed.
v0.1.1 is a good example of why. Microsoft has two pages on GitLab flexible credentials. The flexible credential page says that when the subject is name-based, the expression must match sub and project_id, and lists only those two claims. The mutable subjects page says one of project_id, namespace_id or user_id is required for every subject. v0.1.0 required only sub, so an expression like claims['sub'] matches 'project_path:octo-group/infra:*' came out as allowed. Now:
PASS claims['sub'] matches actual "project_path:octo-group/infra:ref_type:branch:ref:main" UNKNOWN required claims expected "project_id" actual (none) note GitLab flexible credentials must match project_id when the subject is name-based (project_path:...), and the documentation disagrees on whether a project_id: subject needs it; Entra may reject this expression verdict CANNOT EVALUATE no credential matches outright, and at least one cannot be evaluated sub plus project_id is the only form both pages accept, so that's the only one that passes. The rest are listed in SPEC-MAP.md under deviations, next to every place where AWS or Microsoft doesn't document the behaviour (which audience AWS takes when a token has several and no azp, how StringEqualsIgnoreCase folds case, escaping in flexible expressions).
What it doesn't do yet
- GCP Workload Identity Federation (CEL attribute conditions) is not there.
- AWS mappings for issuers with their own table in the IAM docs (CircleCI, OCI, Cognito, Google, the new AWS STS outbound tokens) are not encoded yet. Only the default mapping and GitHub's. That's next.
- It doesn't call AWS or Azure, so it can't see the IAM OIDC provider, RCPs or Conditional Access. It says so at the end of every run.
Releases are signed: checksums.txt has a keyless cosign signature, each archive has an SPDX SBOM, and gh attestation verify <file> -R dyokto/saysno checks the build provenance. There are deb and rpm packages and a Homebrew cask in kanywst/homebrew-tap.
If saysno says allowed and AWS or Entra said no (or the other way round), that is the bug report I want. Strip the signature from the token or rebuild it with the helpers in internal/testjwt, and open an issue with the policy.

