Skip to content

Security Architecture ​

Skriva follows a defense-in-depth security model with multiple layers of protection.

Key Security Areas ​

LayerSummary
NetworkHSTS, SSRF protection, rate limiting
Authenticationbcrypt passwords, TOTP 2FA, WebAuthn passkeys, IP lockout
SessionSigned cookies, automatic rotation on credential change
AuthorizationCSRF protection, scoped API tokens
Input/OutputHTML sanitization, template auto-escaping, CSP headers
DataParameterized SQL, path traversal prevention, PII protection
File I/OContent-type validation, safe directory traversal
FederationHTTP Signatures, PKCE enforcement, constant-time crypto
AuditPersistent admin action log with retention policy
ContainerDistroless, read-only, non-root, pure Go (no CGO)

Security Testing ​

The project includes a dedicated security regression test suite:

bash
go test -race ./...

Tests cover: XSS, SSRF, CSRF, authentication, authorization, cryptography, and data safety.

Released under the MIT License.