golang-gin-testing — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited golang-gin-testing (Agent Skill) and scored it 45/100 (orange). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 1 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 2 flagged
A base64 string of 128+ characters appears in a documentation file. Encoded prompt injection hides the hostile instruction in base64 — invisible to keyword filters — and relies on the agent's ability to decode it at runtime. There is no normal authoring reason to embed a multi-hundred-byte base64 blob in skill docs.
*.sig, SIGNATURES) outside the documentation.A bulleted imperative like {match} tells the agent to never reveal, disclose, or mention something to the user. Used adversarially it can instruct the agent to hide its tool calls or lie about what it did — stripping the transparency a user relies on to trust the agent.
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.
Write confident tests for Gin APIs: unit tests with mocked repositories, integration tests with real PostgreSQL via testcontainers, and e2e tests for critical flows. This skill covers the 80% of testing patterns you need daily.
UserHandler, AuthHandler)UserRepositoryTestMain for shared test infrastructureTesting Philosophy
| Layer | Tool | Goal |
|---|---|---|
| Handler | httptest + mock service | Verify HTTP contract (status codes, JSON shape) |
| Service | mock repository | Verify business logic, error mapping |
| Repository | testcontainers (real DB) | Verify SQL correctness |
| E2E | running server + real DB | Verify critical user flows end-to-end |
gin.SetMode(gin.TestMode) in test init() to suppress debug outputTest Helpers (`internal/testutil/`)
NewTestRouter() — bare gin.New() engine, no logger noisePerformRequest(t, router, method, path, body, headers) — marshals body, sets Content-Type, returns recorderAssertJSON(t, w, &dst) — unmarshals recorder body into dst, fails test on errorBearerHeader(token) — returns map[string]string{"Authorization": "Bearer " + token}Handler Tests
testutil.PerformRequest; assert w.Code and JSON bodycreateFn, getByIDFn, etc.)Table-Driven Tests
[]struct{ name, body, wantStatus } slice; iterate with t.Run(tc.name, ...)t.Parallel() inside subtests for faster runsService Tests
domain.UserRepository; inject into service.NewUserService(repo, logger)errors.As(err, &appErr) to inspect typed *domain.AppError (not errors.Is)Key Test Commands
go test -v -race -cover ./... # all tests
go test -v -race ./internal/handler/... # specific package
go test -v -race -cover -tags='!integration' ./... # unit only
go test -v -race -tags=integration ./internal/repository/... # integration only
go test -race -coverprofile=coverage.out ./... && go tool cover -html=coverage.outgo test -v -race, paste the output. "I believe tests pass" is not "output shows PASS with 0 races detected"-race? Am I personally satisfied with this coverage?This skill handles testing patterns for Go Gin APIs: unit tests with httptest, table-driven tests, service tests with mocked repos, integration tests with testcontainers, and e2e tests. Does NOT handle API implementation (see golang-gin-api), authentication (see golang-gin-auth), database queries (see golang-gin-database), or deployment (see golang-gin-deploy).
Load these when you need deeper detail:
Test Patterns
Unit Tests
Integration Tests
E2E Tests
Load Testing
UserRepository interface and GORM/sqlx implementations: see the golang-gin-database skillreferences/clean-architecture.md)If this skill doesn't cover your use case, consult the Go testing package, httptest GoDoc, or testcontainers-go docs.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.