Skip to content

Add Gin - #17

Merged
oritromax merged 1 commit into
mainfrom
add-gin
Aug 22, 2026
Merged

oritromax merged 1 commit into
mainfrom
add-gin

Conversation

@oritromax

Copy link
Copy Markdown
Owner

Tier 1, item 5 — the last one. universal → go → web → go.gin, 5 new checks.

Check Severity Why
recovery-middleware-present critical An unrecovered panic ends the process, not the request — one malformed input is an outage for everyone connected. gin.Default() includes recovery, gin.New() does not, and that difference survives review easily
server-timeouts-set high .Run() starts a server with no timeouts at all; a slow client holds a goroutine and a descriptor indefinitely
release-mode high Debug mode prints the entire route table into your logs on every start
trusted-proxies-restricted high The default believes any client about its own address, so rate limiting and audit logs become suggestions
upload-size-bounded recommended Multipart buffers per request before spilling to disk

Verification, both directions

Each command was run against a project that gets all five wrong (gin.New(),
bare .Run(":8080"), no mode, no proxies, no limit) and against one that gets
them right. Both the finding and the clean result were confirmed — a check
that cannot distinguish the two is worse than nothing.

Three dead references, caught by the link check

/en/docs/examples/* no longer exists on the Gin site — all three returned 404.
That whole section is gone, not just moved:

/en/docs/examples/custom-middleware/          404
/en/docs/examples/graceful-restart-or-stop/   404
/en/docs/examples/upload-file/single-file/    404
/en/docs/examples/                            404

Repointed at pages that resolve, with the timeout and upload references going to
the standard library docs, where the behaviour actually lives — net/http owns
timeouts and MaxBytesReader, not Gin. Arguably the better citation anyway.

gin-gonic.com and pkg.go.dev added to the allowlist; --check-links passes.

Five checks, composing as universal to go to web to go.gin.

The critical one is recovery. An unrecovered panic in a handler ends the
process rather than the request, so one malformed input is an outage for every
connected client. The convenience constructor includes recovery and the manual
one does not, which is exactly the kind of difference that survives review.

Next to it, the convenience run method starts a server with no timeouts at all,
so a slow client holds a goroutine and a descriptor for as long as it likes.
Then release mode rather than the debug default, which otherwise prints the
whole route table into the logs, trusted proxies named rather than every client
believed about its own address, and a bound on multipart uploads.

Each command was run against a project that gets all five wrong and against one
that gets them right, so both the finding and the clean result were confirmed
rather than assumed.

Three references pointed into the examples section of the Gin site, which no
longer exists and returned 404. They now point at pages that resolve, with the
timeout and upload references going to the standard library documentation where
the behaviour actually lives. gin-gonic.com and pkg.go.dev added to the
reference allowlist.
@oritromax
oritromax merged commit 99c8c94 into main Aug 22, 2026
1 check passed
@oritromax
oritromax deleted the add-gin branch August 22, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant