docs/content/contributing/guidelines/testing.md
The following outlines the specific requirements we have for testing the Authelia code contributions.
We run tests across multiple frameworks and platforms, and employ both SAST and DAST tooling to detect known security issues in the code. The rationale for this approach is that, while using multiple tools may increase noise, it improves confidence by providing more data on which to base our judgment.
| Tool | Purpose | Notes |
|---|---|---|
| Go Test | Coverage, Static and Dynamic Code Analysis | Analysis of Go Code, Executed with go test -cover, go test -race, and go test -fuzz before and on every commit to master |
| React Testing Library | Coverage, Static and Dynamic Code Analysis | Analysis of React Code before and on every commit to master |
| SonarQube | Static Code Analysis | Analysis of All Code before and on every commit to master |
| CodeQL | Static Code Analysis | Analysis of All Code before and on every commit to master, and on a schedule |
| Codecov | Coverage Statistics | Produces Statistics for Go and TypeScript before and on every commit to master |
| Grype | Vulnerability Management | SBOM Scanning Only before and on every commit to master |
| Renovate | Vulnerability and Dependency Management | On a schedule |
| golangci-Lint | Static Code Analysis | Analysis of Go Code before and on every commit to master |
| GitGuardian | Secrets Management | Analysis of Secrets before and on every commit to master |
| Code Rabbit | Quality and Security Assessment | Analysis of General Pull Requests before every commit to master |
| OpenSSF Scorecard | Security Practices Assessment | Automated on every new commit to master |
| OpenSSF Best Practices | Security Practices Assessment | Manual Assessment for Security Practice Posture Improvements |
| StepSecurity Harden-Runner | CI Agent Security | As Part of any Job Running in GitHub CI Job Runners |
| zizmor | GitHub Action Static Code Analysis | Prevents Security Issues with GitHub Actions |
In addition to the above SAST and DAST tools we also implement several linters which ensure code quality and consistency. These linters generally run via lefthook which is installed as a git hook.
| Tool | Area | Purpose |
|---|---|---|
| golangci-Lint | Go | Code Quality and Consistency of Go Code |
| goimports-reviser | Go | Import Order Consistency |
| ESLint | JavaScript and TypeScript | Code Quality and Consistency of JS/TS Code |
| ShellCheck | Shell Files | Code Quality and Consistency |
| yamllint | YAML Files | Consistent YAML Formatting |
| commitlint | Git | Ensure Conformant Commit Messages |
| TruffleHog | All | Preventing Secret Commit Accidents |
| typos | All | Preventing Spelling and General Typos |