<!-- Generated by website/scripts/sync-docs.mjs from docs/quickstart.md. Edit that file, not this one. -->

# Quick start

> Every page of this site: https://dyokto.github.io/saysno/llms.txt

Run saysno against a GitHub Actions token and an AWS trust policy from this repository: first a policy that refuses the token, then one that accepts it. It works offline and needs no AWS or Azure account.

## Install



**Go**

Needs Go 1.27.4 or later (the `go` line in `go.mod`). Installs to `$(go env GOPATH)/bin`.

```sh
go install github.com/dyokto/saysno@latest
```

**Linux and macOS binary**

Pick the archive for your platform from the [releases page](https://github.com/dyokto/saysno/releases): `darwin-arm64`, `darwin-amd64`, `linux-amd64` or `linux-arm64`.

```sh
gh release download -R dyokto/saysno -p 'saysno-*-linux-amd64.tar.gz'
tar xzf saysno-*-linux-amd64.tar.gz saysno
sudo install saysno /usr/local/bin/
```

**Debian and Ubuntu**

```sh
gh release download -R dyokto/saysno -p 'saysno_*_linux_amd64.deb'
sudo apt install ./saysno_*_linux_amd64.deb
```

**Fedora and RHEL**

```sh
gh release download -R dyokto/saysno -p 'saysno_*_linux_amd64.rpm'
sudo dnf install ./saysno_*_linux_amd64.rpm
```



Check it is on your `PATH`. A release binary prints its version; a `go install` build prints `dev`.

```console
$ saysno version
saysno 0.1.1
```

## Get the example files

The token and policies below are fixtures in [testdata/](https://github.com/dyokto/saysno/tree/main/testdata). The token is signed by a test key and carries the immutable `sub` that GitHub sends for repositories created after 2026-07-15.

```sh
git clone --depth 1 https://github.com/dyokto/saysno
cd saysno
```

## A policy that refuses the token

[`trust-name-form.json`](https://github.com/dyokto/saysno/blob/main/testdata/aws/trust-name-form.json) matches `sub` in the older name form, so AWS would refuse the token with only `Not authorized to perform sts:AssumeRoleWithWebIdentity`. `--at` pins the time to when the fixture token is valid.

```console
$ saysno check --at 2026-12-03T09:05:00Z \
    --policy testdata/aws/trust-name-form.json testdata/tokens/github-immutable.jwt
...
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
...
```

Every condition is listed with what the policy expected and what the token carried. The exit status is `1`: denied.

## The same token, fixed policy

[`trust-immutable.json`](https://github.com/dyokto/saysno/blob/main/testdata/aws/trust-immutable.json) uses the `try:` value from the output above and also pins `repository_id`:

```json
"StringEquals": {
  "token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
  "token.actions.githubusercontent.com:sub": "repo:octo-org@1000001/deploy-app@2000002:ref:refs/heads/main",
  "token.actions.githubusercontent.com:repository_id": "2000002"
}
```

```console
$ saysno check --at 2026-12-03T09:05:00Z \
    --policy testdata/aws/trust-immutable.json testdata/tokens/github-immutable.jwt
...
verdict  ALLOWED  an Allow statement matches and no Deny statement does
...
```

The exit status is `0`. `2` would mean saysno could not evaluate a check; it never reports that as allowed.

## Your own token

Run saysno in the job whose role assumption failed, right after the failing step: a GitHub Actions token expires within minutes. [Getting the token in GitHub Actions](https://dyokto.github.io/saysno/usage/#getting-the-token-in-github-actions) has the step to copy. The token is a live credential until it expires; `saysno decode` shows its claims without printing it.

## Verify a release

Each release has a `checksums.txt` signed keylessly with cosign, an SPDX SBOM per archive, and SLSA build provenance.

```console
$ cosign verify-blob \
    --bundle saysno-0.1.0-checksums.txt.sigstore.json \
    --certificate-identity-regexp '^https://github.com/dyokto/saysno/\.github/workflows/release\.yml@refs/tags/v' \
    --certificate-oidc-issuer https://token.actions.githubusercontent.com \
    saysno-0.1.0-checksums.txt
Verified OK
$ sha256sum --ignore-missing -c saysno-0.1.0-checksums.txt
saysno-0.1.0-linux-amd64.tar.gz: OK
$ gh attestation verify saysno-0.1.0-linux-amd64.tar.gz -R dyokto/saysno
```

## Next

- [Usage](https://dyokto.github.io/saysno/usage/): every input format, flag and exit status, and what saysno does not check
- [How it decides](https://dyokto.github.io/saysno/how-it-decides/): the AWS and Entra evaluation rules, step by step
- [Spec map](https://dyokto.github.io/saysno/spec-map/): the specifications saysno follows and where it departs from them
