gin-architect — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited gin-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 Gin 1.12 on Go 1.26. Companion to go-architect, rest-api-architect, and sql-architect. Implementation skeletons in RECIPES.md; pinned deps in STACK.md.
One folder per bounded context. Each feature owns its routes, service, repo, DTOs, and SQL files. Mirrors fastapi-architect so polyglot teams can navigate either side. Full tree in RECIPES.md.
service.go; never reaches into repo.go directly.gin imports. Easy to unit-test without a fake *gin.Context.json: and binding: (validator) tags. Never reuse domain structs as DTOs — that's how internal fields leak into the API.URL-prefix versioning via route groups. One group per version, one sub-group per feature. Registration skeleton in RECIPES.md.
main.go thin.id, err := uuid.Parse(c.Param("user_id")) — return 400 on parse failure.Use struct tags with go-playground/validator (canonical per go-architect). Bind via c.ShouldBindJSON / c.ShouldBindUri / c.ShouldBindQuery — never c.MustBindWith (panics; we don't panic in handlers).
type CreateUserReq struct {
Email string `json:"email" binding:"required,email"`
Password string `json:"password" binding:"required,min=12"`
}validate.RegisterValidation("uuid_v7", isUUIDv7).c.JSON(200, dto.UserResponse{...}) — DTOs control what leaks.c.JSON(204, nil) (sends null).Explicit constructors per go-architect §3. No globals, no init() magic. Dependencies live in a Deps struct wired in main.go. For larger graphs use uber-go/fx (canonical per go-architect); for services with <10 dependencies, hand-wired is clearer.
Open shared resources in main.go, never per-request. Close them on shutdown signal via signal.NotifyContext (Go 1.26 records which signal fired). Full skeleton in RECIPES.md.
Patterns (in-house JWT vs external IdP, Argon2id, JWT lifetimes, JWKS verification, switching criterion) live in rest-api-architect/AUTH_PATTERNS.md. Gin specifics:
golang-jwt/jwt/v5 + argon2 from golang.org/x/crypto. Middleware skeleton in RECIPES.md.jwt.ParseWithClaims with a Keyfunc that resolves keys via a JWKS client. Cache JWKS in-process with TTL.RequireScope(...) composed alongside AuthRequired(secret) on the route declaration (see RECIPES.md).A central problem package emits application/problem+json (per rest-api-architect §7). Handlers either call problem.Render(c, p) directly or c.Error(err) and let the recovery middleware convert. Renderer in RECIPES.md.
Problem types in a single switch.RecoveryHandler that emits a 500 Problem with correlation_id — never a stack trace.Outermost first; order matters.
r := gin.New() // not gin.Default — we set logging ourselves
r.Use(
middleware.RequestID(), // 1. assign correlation_id
middleware.SLog(), // 2. structured access log
gin.Recovery(), // 3. convert panics → 500 problem
middleware.CORS(cfg.CORS), // 4. preflight handling
gzip.Gzip(gzip.DefaultCompression), // 5. response compression
)slog (per go-architect).Go has no FastAPI-style BackgroundTasks. To run work after the response, derive a new context.Context from context.Background() (request context is cancelled the moment the response writes), set a timeout, log errors. Anything serious (retryable, distributed, scheduled) belongs in a real task queue, not a goroutine.
httptest.NewRecorder + the engine directly — no real socket. Skeleton in RECIPES.md.
sql-architect — wrap each test in a rolled-back transaction, or use a per-test schema with golang-migrate.// @ annotation comments above handlers; swag init generates docs/swagger.json and swagger.yaml. Predictable, mature.// @Hidden (swag) or by not registering them in the spec route group.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.