Canonical contact and disclosure process: SECURITY.md.
This document is the operator-facing view: what the threat model is, and how to
deploy Kroot hardened.
Kroot is a locally executed service. The assets worth protecting are the
credentials in its configuration, the data it stores under ~/.kroot, and the
integrity of whatever it is wired to.
| # | Threat | Mitigation |
|---|---|---|
| T1 | Credentials leak through source control or logs | KROOT_* variables and mounted files only; .env git-ignored; secrets never logged |
| T2 | Service exposed beyond the intended network | bind to loopback by default; exposure requires an explicit KROOT_HOST change |
| T3 | Untrusted input crosses a boundary unvalidated | validate and bound every external input; reject rather than coerce |
| T4 | Injection into SQL, shell or templates | parameterised queries; no shell interpolation; no dynamic template evaluation |
| T5 | Dependency compromise | pinned versions, govulncheck in CI, dependency review on addition |
| T6 | Path traversal via user-controlled paths | resolve and confine to an allow-listed root; never trust a relative path from a request |
| T7 | Denial of service through unbounded work | request size and timeout limits; bounded worker pools; rate limiting on exposed endpoints |
| T8 | Supply-chain tampering with release artifacts | signed tags, checksums and an SBOM attached to every release |
.env, a key or a token. .env* is git-ignored, and the
exception is only .env.example with obvious placeholder values.~/.kroot to the service account (0700) and back it up encrypted| Gate | Scope |
|---|---|
govulncheck ./... |
every PR touching Go code |
golangci-lint with gosec |
every PR |
| Dependency review | every PR that modifies go.mod / go.sum |
SBOM (spdx-json) |
every GitHub Release |
| Signed tag | every GitHub Release |
A default must be the safe option. If an insecure setting is required for a legitimate use case, it is opt-in, named explicitly, and documented with its consequences.