You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(security): resolve open code-scanning alerts (XSS, int-conversion, cookie, CI perms) (#108)
Addresses all 12 open alerts from GitHub code scanning:
High:
- go/incorrect-integer-conversion (classifier.go, skills/importer.go):
both inet_aton-style IP parsers now reject out-of-range parts instead of
silently truncating (300.1.1.1 no longer parses as 44.1.1.1; 10.300.1.1
no longer slips into the private range as 10.44.1.1), matching browser
semantics and protecting the SSRF/internal-IP checks downstream.
- go/incomplete-url-scheme-check (browser_tool.go): link extraction now
filters javascript:, data:, and vbscript: case-insensitively.
- js/xss (ui/app.js): formatNum coerces to a finite number and the latency
stat is coerced, so crafted non-numeric values can never reach innerHTML
as markup.
- js/xss-through-dom (ui/app.js): renderFileChips builds DOM nodes with
textContent instead of innerHTML.
- js/double-escaping (ui/app.js): escapeAttr replaces & first so quote
entities are no longer double-escaped.
Medium:
- go/cookie-secure-not-set (serve.go): the WS-token cookie sets
Secure: true. The UI always also authenticates via WebSocket subprotocol
and /api header, so browsers that drop the cookie lose nothing.
- actions/missing-workflow-permissions: top-level
permissions: contents: read in test.yml and release.yml (the release job
keeps its explicit contents: write).
Regression tests: IP bound cases in both packages, browser scheme-filter
test. Full test suite, vet, golangci-lint, and node --check all pass.
0 commit comments