Repository navigation
feat(report): reportUrl and techIconBaseUrl render options; reportInlineScripts() for a hash-based CSP (squirrelscan/repo#3182) - #1211
Merged
Conversation
|
Review of #1211: the change is small and the default output stays the same. The test that the script list matches what is rendered is a good guard. I read the diff and did not run the tests.
🤖 Generated with Claude Code |
nc9
force-pushed
the
feat/3182-renderer-report-url
branch
from
October 28, 2026 03:17
f3fdc35 to
e52a3b8
Compare
|
Review of #1211. The change is small, opt-in and the CLI output stays the same. I found nothing blocking.
|
|
Review of #1211: the change is small, opt-in and well tested. I found nothing blocking.
|
… and techIconBaseUrl; reportInlineScripts() lists the inline scripts for a hash-based CSP (squirrelscan/repo#3182) Signed-off-by: Nik Cubrilovic <[email protected]>
…cktracking regex; the script test reads tags with HTMLRewriter (CodeQL 289, 290) Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
feat/3182-renderer-report-url
branch
from
October 28, 2026 08:28
90c7871 to
05bc2c3
Compare
|
Review of #1211. The change is small, opt-in and CLI output is unchanged. I read the diff and the inline script sites in
|
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.
Public half of squirrelscan/repo#3182 step (c): what the cloud needs from the HTML renderer to serve published reports from per-org hosts on
squirrel.report. No change for CLI reports: every option is new and opt-in, soREPORT_HTML_VERSIONstays as it is.Change (
packages/report)HtmlRenderOptions.reportUrl. The report's own URL. It is used forog:url,og:image(<url>/og.png), the agent.md/.jsonlinks, the report link in fix prompts, and a new<link rel="canonical">. Without it, a report with areportIdlinks tohttps://reports.squirrelscan.com/<id>and has no canonical link, exactly as before.HtmlRenderOptions.techIconBaseUrl. Where technology logos load from, so a report page on another domain loads nothing fromsquirrelscan.com. The default is unchanged (https://squirrelscan.com/tech-icons). It is passed through a React context to the twoTechIconcall sites, andtechIconUrl(icon, base?)gains the optional base.reportInlineScripts()returns the exact body of every executable inline<script>the report can render: copy/findings/pages/local-time, the notice dismiss, and the entity viewer. A host hashes them intoscript-src, so a script that is not ours never runs, even if an escaping bug let one into the page. Thetype="application/json"data blocks are not executable and not listed.Tests
packages/report/tests/report-url-options-3182.test.ts(5):reportUrl: og,og:image,.md,.jsonand the canonical all use it, and the reports host never appears.techIconBaseUrl: used, and the default is unchanged.reportInlineScripts(), and every listed script must appear, so the list can be neither short nor stale.bun run scripts/test-suites.ts --run report: 708 pass. Typecheck is ok for report and cli, andbuild:css:checkreports styles up to date.Docs: none; this is a library option the cloud uses, and CLI output is unchanged. CHANGELOG: Added. Skill: no change.