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

# Contributing

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

Bug reports and patches are welcome. For a suspected vulnerability in laissez, use the [security policy](https://dyokto.github.io/laissez/security/), not a public issue.

## Getting set up

Go 1.27 is the only prerequisite for the build and tests. `make demo` also needs a curl with HTTPS-proxy support.

```bash
git clone https://github.com/dyokto/laissez
cd laissez
make test
```

## Before you open a pull request

```bash
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 20s
make demo   # fake GitHub end to end
```

CI runs the same, plus a GoReleaser snapshot build.

## Sign-off (DCO)

Every commit is signed off under the [Developer Certificate of Origin](https://developercertificate.org/). Use `git commit -s`, which adds a `Signed-off-by:` line with your name and email. CI rejects commits without it.

## What gets merged

- One commit per logical change. Commit messages in English, Conventional Commits (`feat(proxy): ...`, `fix(github): ...`, `docs: ...`), subject under 72 characters.
- Behaviour changes come with tests, including at least one negative case: the request that must be denied. A deny path whose check can be deleted without a test failing is not tested.
- Anything that cannot be parsed, verified or resolved is a deny. No fallback, no default allow, no "skip verification" option.
- Every wire format, claim and endpoint cites the spec section it implements in a doc comment. Where laissez departs from a spec, the deviations list in SPEC-MAP.md says so.
- A new parser of bytes from outside the process gets a fuzz target, added to the CI fuzz matrix and to `make fuzz`.
- A new dependency needs a sentence in the pull request saying what it replaces and why the standard library is not enough.
- No credential, token, key or JWT appears in a log line, audit record or error message.

## Dependencies

Every dependency is listed here with what it replaces and why the standard library is not enough.

- `github.com/BurntSushi/toml` v1.6.0: parses the configuration file; the standard library has no TOML parser, and this one reports undecoded keys (`MetaData.Undecoded`), which is how unknown keys become errors. It has no dependencies of its own.
- `golang.org/x/sys` v0.50.0: reads Unix socket peer credentials (`SO_PEERCRED` on Linux, `LOCAL_PEERCRED` and `LOCAL_PEERPID` on macOS) and the `kern.procargs2` sysctl; `syscall` exposes `SO_PEERCRED` on Linux only and nothing for macOS, and `x/sys` is maintained by the Go team.

### Not taken

- AWS SDK for Go: replaced by a SigV4 signer of under 140 lines (`internal/aws/sigv4.go`), tested against the signing-key and request examples in the AWS documentation.
- A JOSE library: JWT-SVID and JWKS verification is about 420 lines on `crypto/*` with a closed algorithm list.
- YAML: TOML has no implicit typing (`no` stays a string), which matters for a policy file.
