fix(deps): bump @fastify/swagger-ui to 6.x for the @fastify/static advisory - #204
Merged
Conversation
…visory @fastify/swagger-ui 5.2.6 pins @fastify/static to 9.1.3, so the route-guard bypass via non-leading .. and %2E%2E segments (patched in 10.1.2) has no in-range fix and dependabot cannot resolve it. Overriding @fastify/static to 10.x under swagger-ui 5 would force a major across a boundary its own code was never tested against. Bumping swagger-ui instead is the supported path: 6.1.1 declares @fastify/static ^10.1.0, which resolves to 10.1.3, and fastify-plugin ^6.0.0, which main already runs since #200. Verified by booting the app and injecting requests rather than trusting the version bump: the docs shell, the static asset bundle and the OpenAPI json all serve, and a non-leading traversal segment gets a 404. pnpm audit is now clean — no known vulnerabilities at any severity. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
## [1.0.5](v1.0.4...v1.0.5) (2026-08-24) ### Bug Fixes * **deps:** bump @fastify/swagger-ui to 6.x for the @fastify/static advisory ([#204](#204)) ([60a05d2](60a05d2))
|
🎉 This PR is included in version 1.0.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
What does this PR do?
Closes the second advisory dependabot reported it cannot fix (#90):
@fastify/swagger-ui@5.2.6pins@fastify/staticat9.1.3, so there is no in-range update. This bumps@fastify/swagger-ui5.2.6 → 6.1.1, which declares@fastify/static: ^10.1.0and resolves to 10.1.3.Why bump swagger-ui instead of overriding @fastify/static
I flagged this one in #203 as deserving its own review, and that still holds. Overriding
@fastify/staticto 10.x underneath swagger-ui 5 would force a major across a boundary swagger-ui 5's own code was never tested against — the same class of move that made the exacthonopin backfire in #184. Bumping swagger-ui is the supported path, and it lines up with the rest of the tree: 6.1.1 wantsfastify-plugin ^6.0.0, whichmainalready runs since #200.Verification — I booted the app rather than trusting the version
A swagger-ui major is exactly the kind of bump where "tests pass" proves nothing, since no test hits the docs route. So I initialised the real
Appand injected requests:GET /api/v1/docsGET /api/v1/docs/static/index.html/api/v1/docs/(expected swagger-ui behaviour)GET /api/v1/docs/static/swagger-ui-bundle.js@fastify/static10.1.3GET /api/v1/docs/jsonGET /api/v1/docs/static/../../../package.jsonPlus
pnpm lint,pnpm format:check,pnpm build,pnpm test:unit597/597.Result
Zero advisories at any severity, down from 45 (16 high) when this started. For the record, the chain that got here: #184 made the overrides actually apply, #198 raised the stale
lodashfloor, #203 handleddeepmerge-ts, and this one clears the last.Worth noting the audit step in CI is
continue-on-errorsince #183 — so it will not gate on this, but it is now genuinely green rather than merely non-blocking.Type of Change
Checklist
feature/,fix/,chore/,docs/)🤖 Generated with Claude Code