Sprint Item
#1 of 8 — Low severity — land first (Monday PR 1 of 3)
Block Relations
|
|
| Blocked by |
— |
| Blocks |
#2 — CSP script-src must allow the SRI-pinned cdnjs origin |
| Repo/day |
Independent of #4–#8 (claude-code-chat-browser / Tue–Thu) |
Calendar Day
Monday, July 20, 2026 (PR 1 of 3)
Planned Effort
1 story point (Low) — sprint item #1
Problem
templates/base.html loads highlight.js from cdnjs with no integrity attribute:
- Theme
<link> (vs2015) — line 19
- Script
<script> — line 20
The neighboring Marked and DOMPurify tags already carry SRI hashes; highlight.js is the only unpinned third-party asset. A tampered or swapped CDN file would load and execute unverified — the gap in an otherwise SRI-pinned frontend.
Goal
One small PR that pins both highlight.js tags with the official cdnjs SRI hash for the already-in-use 11.9.0 files, matching the existing Marked/DOMPurify pattern. No version bump.
Scope
- Add
integrity="sha512-..." + crossorigin="anonymous" to the highlight.js script tag (line 20), using the official cdnjs SRI value for the pinned 11.9.0 highlight.min.js.
- Add the same to the
vs2015 theme <link> (line 19), using the cdnjs SRI value for the pinned 11.9.0 theme CSS.
- Do not change versions; do not touch the Marked/DOMPurify tags.
Out of scope
Acceptance Criteria
Verification
cd C:\Users\Jasen\CppAliance\cppa-cursor-browser
.\.venv\Scripts\Activate.ps1
python app.py
- Open the app, view a conversation with a fenced code block → highlighting works.
- DevTools console shows no SRI integrity-mismatch errors.
- View source: highlight.js script + theme tags both carry
integrity + crossorigin.
Sprint Item
#1 of 8 — Low severity — land first (Monday PR 1 of 3)
Block Relations
script-srcmust allow the SRI-pinned cdnjs originCalendar Day
Monday, July 20, 2026 (PR 1 of 3)
Planned Effort
1 story point (Low) — sprint item #1
Problem
templates/base.htmlloads highlight.js from cdnjs with nointegrityattribute:<link>(vs2015) — line 19<script>— line 20The neighboring Marked and DOMPurify tags already carry SRI hashes; highlight.js is the only unpinned third-party asset. A tampered or swapped CDN file would load and execute unverified — the gap in an otherwise SRI-pinned frontend.
Goal
One small PR that pins both highlight.js tags with the official cdnjs SRI hash for the already-in-use 11.9.0 files, matching the existing Marked/DOMPurify pattern. No version bump.
Scope
integrity="sha512-..."+crossorigin="anonymous"to the highlight.js script tag (line 20), using the official cdnjs SRI value for the pinned 11.9.0highlight.min.js.vs2015theme<link>(line 19), using the cdnjs SRI value for the pinned 11.9.0 theme CSS.Out of scope
feat/csp-header) — the SRI-pinned cdnjs origin is what CSPscript-srcwill allow.Acceptance Criteria
integrityhash for the pinned 11.9.0 files.crossorigin="anonymous".Verification
integrity+crossorigin.