chore: unblock Dependabot scans (statik check-in + compose image bumps)#59
Merged
Conversation
- Check in statik/statik.go so a clean clone resolves the OpenAPI bundle import in servers/gateway/gateway.go without needing `make generate` to run first. This was silently breaking every Dependabot gomod update since at least early 2025. - Bump compose template images (mariadb:10.3 → 11.4, nginx:1.19-alpine → 1.27-alpine) so dependabot-core's docker analyzer stops crashing on the older tag formats. The in-repo compose is a template only; prod compose is maintained out-of-repo on traycer. Long-term fix tracked in #58 (replace rakyll/statik with //go:embed). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
SyniRon
added a commit
that referenced
this pull request
May 20, 2026
`rakyll/statik` has been functionally obsolete since Go 1.16 (Feb 2021) landed `//go:embed`. Replace the whole chain: blank import + generated 3 MB statik/statik.go + manual `make generate-statik` step are all gone, and the OpenAPI Swagger UI assets are now bundled into the binary directly via the stdlib `embed` package. Changes: - Move third_party/OpenAPI/ -> openapi/assets/. Delete the now-empty third_party/ tree. buf.gen.yaml's openapiv2 output path updated to match (`out: openapi/assets`). - New openapi/ package with `//go:embed assets` exposing `embed.FS`. servers/gateway/gateway.go uses `fs.Sub` + `http.FS` to serve. - Drop rakyll/statik from go.mod (and tools.go's blank import — without that, `go mod tidy` would have kept the dep). Makefile's `generate` target loses the `statik` invocation; `install` target loses the rakyll/statik entry. magefile.go gets the parallel edits. - statik/statik.go deleted from disk; the directory is empty and gone. Side effect: the blank import `_ "github.com/7cav/api/statik"` that broke Dependabot's gomod scan on clean clones (the gitignored target made `go list` fail) is gone at the root. PR #59's check-in of the generated statik file was a stopgap for exactly this — that stopgap now retires. Verified: - go vet ./... clean - go build ./... clean - make generate succeeds (only buf runs now); swagger.json output lands in openapi/assets/ at the new path - rg statik returns zero hits in the working tree - Container OpenAPI handler smoke at http://localhost:11000/: Swagger UI renders, zero console errors, all 13 embedded files (index, oauth2-redirect, both swagger.json, CSS, four JS bundles, two favicons, LICENSE) return 200 - Insomnia suite 61/61 green against the local stack Closes #58 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
statik/statik.goso Dependabot'sgo listresolves the OpenAPI bundle import inservers/gateway/gateway.goon a clean clonemariadb:10.3→11.4,nginx:1.19-alpine→1.27-alpine) — the older tag formats crashed dependabot-core's docker analyzerThe in-repo
docker-compose.yamlis a template only; prod compose lives on traycer and is unaffected.Long-term fix for the statik chain tracked in #58.
Test plan