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
ci: least-privilege GITHUB_TOKEN; serve UI renders pictures from the response
Clears the open CodeQL code-scanning alerts on master.
Workflow permissions (8 medium alerts, actions/missing-workflow-permissions):
ci.yml and npm-publish.yml declared no `permissions:` block, so every job ran
with the repository's default GITHUB_TOKEN scope. Both now default to
`contents: read` at the top level, with the two jobs that need more keeping
their existing job-level grants (ci's `publish` pushes the release commit and
tag; npm-publish's `publish-cuda` uploads binaries to a GitHub release —
npm publishing itself uses NPM_TOKEN, not the workflow token). deps-update.yml
was not flagged but had the same shape inverted — write for both jobs where
only `cargo-update` opens the PR — so the grant moves onto that job and the
weekly `audit` job drops to read.
DOM text reinterpreted as HTML (1 high, js/xss-through-dom): the serve UI
streamed the conversion into the result panel and then re-read
`out.textContent` to find embedded `data:image/...` URIs for the gallery, so
DOM text flowed into `img.src`. The response is now accumulated in a variable
and mirrored into the panel — the gallery renders from what we received, never
from the DOM — which also drops a quadratic re-read of a multi-megabyte
textContent per chunk. The span scanner additionally skips `svg+xml`: an SVG
is markup, and the pipeline only ever emits PNG crops, so such a run in the
output is not ours to render.
Verified: docling-serve suites green, the UI script parses (node --check), and
the span scanner keeps a PNG data URI while rejecting an SVG one.
Signed-off-by: artiz <artem.kustikov@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EY5KAiquN4YpVf2PXEQkVT
0 commit comments