nethttp-architect — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited nethttp-architect (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Targets the stdlib `net/http` on Go 1.26, using the Go 1.22+ enhanced ServeMux (method matching, path variables, host matching) — no router framework. Companion to go-architect, rest-api-architect, and sql-architect. Implementation skeletons in RECIPES.md; pinned deps in STACK.md.
Same shape as gin-architect and fastapi-architect: one folder per bounded context under internal/, each with handlers.go, service.go, repo.go, dto.go, queries/. Full tree in RECIPES.md.
service.go; never reaches into repo.go directly.net/http imports. Easy to unit-test.http.ServeMux with method patterns (Go 1.22+)The stdlib ServeMux supports method matching, path wildcards ({id}), and host matching. No third-party router needed. Registration skeleton in RECIPES.md.
"GET /v1/users/{id}" — method + path in one string. Mismatched methods auto-return 405 Method Not Allowed.id := r.PathValue("user_id") — typed parsing happens in your handler."GET /v1/users/" matches everything under the prefix; "GET /v1/users/{$}" matches only the exact path. Be explicit.go-playground/validator (canonical per go-architect) — bind via json.NewDecoder(r.Body).Decode(&req) then validate.Struct(&req).
type CreateUserReq struct {
Email string `json:"email" validate:"required,email"`
Password string `json:"password" validate:"required,min=12"`
}extra="forbid". Reject unknown fields rather than silently dropping them.r.Body with http.MaxBytesReader(w, r.Body, 1<<20) before decode — prevents memory exhaustion from oversized payloads.A tiny helper to serialise JSON consistently — every handler uses it.
func writeJSON(w http.ResponseWriter, status int, v any) {
w.Header().Set("Content-Type", "application/json; charset=utf-8")
w.WriteHeader(status)
if v != nil {
_ = json.NewEncoder(w).Encode(v)
}
}writeJSON body).Explicit constructors. Dependencies wired in main.go; *Deps is passed where needed. For larger graphs, uber-go/fx (canonical per go-architect). Hand-wired is clearer for small services.
Identical pattern to gin-architect — the server abstraction is http.Server, not *gin.Engine. signal.NotifyContext for shutdown trigger; the cause records which signal (Go 1.26). All four timeouts (ReadHeaderTimeout, ReadTimeout, WriteTimeout, IdleTimeout) are mandatory in production — defaults are "unlimited," which is a DoS vector. Full skeleton in RECIPES.md.
stdlib has no middleware abstraction. The standard pattern: a function that takes http.Handler and returns http.Handler. Compose with a tiny Chain helper (in RECIPES.md).
Chain — Recover wraps everything so even middleware panics are caught.AuthRequired only where needed (see §8).slog (per go-architect).Patterns live in rest-api-architect/AUTH_PATTERNS.md. stdlib specifics:
golang-jwt/jwt/v5 + argon2. Middleware skeleton in RECIPES.md.jwt.ParseWithClaims with a Keyfunc that resolves keys via cached JWKS. Verify aud and iss explicitly.RequireScope middleware composed with AuthRequired (see RECIPES.md). When the wrap chain gets ugly, build a small helper that takes multiple Middlewares and the final handler.Same problem package shape as gin-architect. Helpers take http.ResponseWriter + *http.Request instead of *gin.Context. Writer skeleton in RECIPES.md. The Recover middleware catches panics and emits a 500 problem with the correlation id — never a stack trace.
Same guidance as gin-architect — Go has no FastAPI-style BackgroundTasks. Detach with context.Background(), log errors, set timeouts.
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
go func() {
defer cancel()
if err := h.svc.SendWelcomeEmail(ctx, user.ID); err != nil {
slog.ErrorContext(ctx, "welcome email failed", "user_id", user.ID, "err", err)
}
}()httptest.NewRecorder + the handler directly — no real socket. Skeleton in RECIPES.md.
time.Sleep.stdlib net/http has no annotation-based generator like swaggo/swag (which is Gin-coupled). Two practical options:
/v1/openapi.json, optionally use it for runtime request validation. The intended choice for stdlib.CI snapshot-tests the spec either way.
net/http over Ginfunc(http.Handler) http.Handler chains work everywhere).Pick Gin when: richer middleware/plugin ecosystem out of the box, team familiar with framework patterns, or you need features Gin provides that aren't in stdlib. Both bundles (gin and nethttp) are valid; this skill targets nethttp projects.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.