You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lagodev is secure-by-default: every guard listed below is either
enabled out of the box or shipped as a one-line middleware so the
application has no excuse to ship without it.
Reporting a vulnerability
Email the maintainer privately. Do not open a public issue with PoC
exploit details. The repository follows responsible-disclosure.
Defenses by layer
Input
Concern
Defense
Where
Oversized JSON body (DoS)
http.MaxBytesReader wraps r.Body
web/context.goBind, default 1 MiB
Oversized form / file upload
BodyLimit(n) middleware
web/security.go
Slowloris-style header attack
Server.ReadHeaderTimeout = 10s
web/app.go
Slow body / write attacks
ReadTimeout / WriteTimeout / IdleTimeout
web/app.go
Header smuggling / abuse
Stdlib net/http validates header CRLF
upstream
Unbounded path / query
go 1.22 mux pattern routing
web/app.go
Untrusted JSON shape
Struct-tag validator validate:"…"
web/validate.go
Mass assignment
c.Bind decodes into a typed struct — extra keys ignored by default
encoding/json
SQL / data layer
Concern
Defense
Where
SQL injection
All builder paths use placeholders (g.Placeholder(n)) — column names quoted via grammar
query/builder.go
Identifier injection in raw expressions
WhereRaw requires bound args ...any
query/builder.go
Path traversal
Framework does not serve untrusted file paths; applications must use filepath.Clean
n/a
Bulk delete without WHERE
Truncate is explicit; ORM Delete requires the model's PK
query/builder.go, orm/query.go
Authentication / authorization
Concern
Defense
Where
Password storage
bcrypt with configurable cost (default bcrypt.DefaultCost)