Skip to content

Update portal demo dependencies and fix the CodeQL alerts - #8

Merged
zeevmoney merged 2 commits into
mainfrom
deps-and-codeql
Oct 13, 2026
Merged

zeevmoney merged 2 commits into
mainfrom
deps-and-codeql

Conversation

@zeevmoney

Copy link
Copy Markdown
Member

Consolidates the open Dependabot PRs and fixes all nine open CodeQL alerts in permit-portal-demo.

Dependencies (Dependabot #1–#5)

PR Change
#1 lucide-react 1.51.0 → 1.52.0
#2 @types/supertest 6.0.3 → 7.2.1
#3 + #4 vite 7.3.6 → 8.3.1 with @vitejs/plugin-react 5.2.0 → 6.1.1 (v6 needs vite 8)
#5 Not applied: the demo runs on Node 24, so @types/node stays on 24.x. .github/dependabot.yml now ignores its major versions.

Vite 8 builds with Rolldown, so the vendor chunk moves from rollupOptions.output.manualChunks to rolldownOptions.output.codeSplitting.groups. The build output is the same (vendor chunk 436 kB, no warnings). plugin-react 6 drops Babel, which removes the @babel/* packages from the lockfile.

Dependabot should close #1–#4 once this is merged. #5 can be closed by hand.

CodeQL alerts

Alert Rule Fix
#7, #8, #9 js/missing-rate-limiting express-rate-limit 8.7.1, mounted first in createApp: 3,000 requests a minute per client address, in front of every route and the SPA fallback. The demo's own peak (panel polling, page refreshes, scenario runners) is about 1,000 a minute. trust proxy stays off, so a client can't choose its own key.
#1–#5 js/bad-tag-filter The tests that pull the inline <script> out of the app's own HTML match it case-insensitively.
#6 js/incomplete-multi-character-sanitization The test helper that reads button labels captures the text after the icon instead of stripping tags with replace.

Two new tests check the RateLimit-Policy header on every route and the 429 { error: 'Too many requests' } answer. Both fail without the limiter.

express-rate-limit 8.7.1 is MIT and outside the range of its one advisory. Its new transitive dependency, ip-address 10.7.4, and Rolldown's native packages are less than 7 days old; they pass the repo's 24-hour pnpm release-age policy.

Checks run

  • pnpm install --frozen-lockfile, pnpm peers check and pnpm audit --audit-level=moderate: clean.
  • pnpm lint (oxlint, oxfmt, tsc): passes.
  • pnpm test: 863 tests pass.
  • pnpm run build:web: no warnings.
  • Both Docker images build. The portal image boots and answers /healthz with the RateLimit-Policy header.
  • Vite 8's dev proxy adds no X-Forwarded-For header.

CodeQL wasn't run locally. This PR's CodeQL check should show #1–#9 as fixed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ARnk1jhjwpyA9h4PmTsabQ

zeevmoney and others added 2 commits October 13, 2026 11:41
Brings in Dependabot PRs #1 to #4:
- lucide-react 1.51.0 → 1.52.0
- @types/supertest 6.0.3 → 7.2.1
- vite 7.3.6 → 8.3.1 and @vitejs/plugin-react 5.2.0 → 6.1.1, which
  needs vite 8. Vite 8 builds with Rolldown, so the vendor chunk moves
  from rollupOptions' manualChunks to rolldownOptions' codeSplitting
  groups. The output is the same.

Leaves @types/node on 24.x instead of PR #5's 26.x: the demo runs on
Node 24, and dependabot.yml now ignores its major versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARnk1jhjwpyA9h4PmTsabQ
- #7, #8, #9 (js/missing-rate-limiting): the portal limits each client
  address to 3,000 requests a minute with express-rate-limit 8.7.1,
  mounted first in createApp so it covers every route and the SPA
  fallback. The limit leaves about three times the demo's own peak
  traffic (panel polling, page refreshes, scenario runners). trust
  proxy stays off, so a client can't choose its own key. Two tests
  check the RateLimit-Policy header and the 429 answer.
- #1 to #5 (js/bad-tag-filter): the tests that extract inline scripts
  match <script> case-insensitively.
- #6 (js/incomplete-multi-character-sanitization): the test helper
  that reads button labels captures the text after the icon instead
  of stripping tags with replace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARnk1jhjwpyA9h4PmTsabQ
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