chore(deps): Remove unused dependencies and update vulnerable ones - #13
Merged
Merged
Conversation
The repository reported 19 Dependabot alerts, 2 of them critical. Most came from dependencies the code never used, so they are removed rather than updated: an unused dependency is attack surface with no benefit, and updating one only defers the question. Infrastructure had no test files, yet carried vitest and @vitest/coverage-v8, which held both critical advisories and pulled a vulnerable vite. It also declared the AWS SDK clients, fast-xml-parser, fast-check, husky, lint-staged and the scte35 npm package without importing any of them. The scte35 entry was the least obvious: the only matches in the CDK sources are the name of the Python Lambda layer, not an import. Removing all of it takes the package from 16 vulnerabilities, including the 2 critical, to zero. CI never ran the infrastructure test script, so dropping it changes no pipeline behavior. Frontend genuinely uses scte35 for the SCTE-35 decoder, so it moves to 0.7.0, which replaces the transitive inquirer that carried the tmp path traversal. Verified against real payloads that the fields the decoder reads are unchanged: spliceCommandType, the splice_insert and time_signal command shapes, and the segmentation descriptor values. Also updates the shared toolchain: @typescript-eslint 6 to 8, which clears five high advisories plus minimatch, and vite 5 to 8, which clears the vite path traversal and the esbuild dev-server advisory. The stricter default in @typescript-eslint 8 flagged two unused catch bindings, now written as optional catch bindings. Frontend goes from 14 vulnerabilities to 2, both moderate, in react-router. Those are left for a separate change: the only fix is react-router-dom 7, a major upgrade of a runtime dependency that deserves its own review and a smoke test against a deployment. Neither advisory applies to this app as written, since it performs no SSR hydration and navigates only to static internal routes. Verified: infrastructure lint, build and cdk synth; frontend tsc, lint and build; and the backend suite is untouched at 190 passing.
This was referenced Aug 20, 2026
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
Closes the Dependabot alerts on
main: 19 alerts, 2 of them critical.Most came from dependencies the code never used, so they are removed rather than bumped. An unused dependency is attack surface with no benefit, and updating one only defers the question to the next advisory.
Infrastructure: 16 vulnerabilities (2 critical) to 0
The package had no test files at all, yet carried
vitestand@vitest/coverage-v8. Those held both critical advisories (Vitest UI server arbitrary file read and execute) and pulled a vulnerablevite. CI never ran the infrastructure test script, so removing it changes no pipeline behavior.It also declared dependencies that are never imported:
@vitest/coverage-v8,vitest@aws-sdk/client-cloudwatch-logs,@aws-sdk/client-dynamodb,@aws-sdk/lib-dynamodbfast-xml-parserscte35fast-checkhusky,lint-staged.huskydirectory, hooks never installedThe
scte35entry was the least obvious. The only matches in the CDK sources are the name of the Python Lambda layer:No
import ... from 'scte35'exists, and that unused entry was what pulledinquirerand the vulnerabletmp.What remains:
source-map-support, whichbin/pois-reference-server.tsregisters, plus the CDK, TypeScript, ESLint and Prettier toolchain.Frontend: 14 vulnerabilities to 2
scte35is genuinely used by the SCTE-35 decoder, so it moves to0.7.0, which replaces the transitiveinquirercarrying thetmppath traversal. Verified against real payloads that every field the decoder reads is unchanged:Toolchain updates shared with infrastructure:
@typescript-eslint6 to 8, clearing five high advisories plusminimatch, andvite5 to 8 with@vitejs/plugin-react6, clearing thevitepath traversal and theesbuilddev-server advisory. Node requirements of vite 8 (^20.19.0 || >=22.12.0) are satisfied by the repo's Node 20 baseline and by CI.The stricter
no-unused-varsdefault in@typescript-eslint8 flagged two unused catch bindings inauthSlice.ts; they are now optional catch bindings, which is what the code meant.Deliberately not included
Two moderate advisories remain, both in
react-router. The only fix isreact-router-dom7, a major upgrade of a runtime dependency, which deserves its own PR with a smoke test against a deployment rather than riding along in a dependency cleanup.Neither advisory applies to this application as written:
deserializeErrors()in SSR hydration: this is a client-only SPA with no SSR.<Link>anduseNavigate: navigation targets are static internal routes, never user-controlled input.Testing
npm run lint,npm run build,npx cdk synth(all five stacks)npx tsc --noEmit,npm run lint,npm run buildscte350.7.0 exercised against two real base64 payloadsnpm audit: infrastructure 0, frontend 2 moderate (react-router only)