Skip to content

Contributing

Markdown · llms.txt

Bug reports and patches are welcome. For a suspected vulnerability in saysno, use the security policy, not a public issue.

The most useful bug report is a policy and a token's claims where saysno's verdict differs from what AWS or Entra did. Remove the signature and anything private from the token first, or rebuild it with the helpers in internal/testjwt. Never post a token that has not expired.

Go (the version in go.mod) is the only prerequisite. make lint also needs golangci-lint v2.

Terminal window
git clone https://github.com/dyokto/saysno
cd saysno
make test
Terminal window
make lint # gofmt, go vet, golangci-lint: must report 0 issues
make test # go test -race ./...: must pass
make vuln # govulncheck: must be clean
make fuzz # each fuzz target for 10s (FUZZTIME=1m make fuzz for longer)

CI runs the same, plus a GoReleaser snapshot build.

Every commit must be signed off under the Developer Certificate of Origin: commit with git commit -s. CI rejects a pull request with a commit that lacks a Signed-off-by line.

  • One commit per logical change. Commit messages in English, Conventional Commits style (feat(awspolicy): ..., fix(azurefic): ...).
  • A change to how a policy is evaluated cites the provider documentation section it follows, in a doc comment, and comes with table tests, including at least one case that must be denied.
  • No evidence is never a pass. An operator, claim shape or expression saysno does not understand is "cannot evaluate" (exit 2), never "allowed". A result that only holds because of an assumption is reported as unknown.
  • Fixtures under testdata/ are generated: change the helpers in internal/testjwt or the token list in internal/cli/cli_test.go, then run make fixtures and commit the result.
  • --json (saysno.result/v1, saysno.reverse/v1) and the exit codes are an API.
  • No new dependency without a sentence in the pull request saying what it replaces and why the standard library is not enough.