Skip to content

Remove every remote destination from the HTML report - #392

Merged
abrignoni merged 1 commit into
mainfrom
fix/no-external-links
Aug 7, 2026
Merged

Remove every remote destination from the HTML report#392
abrignoni merged 1 commit into
mainfrom
fix/no-external-links

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Why

Port of iLEAPP #1887, keeping html_safe.py byte-identical across the cores that carry it.

A remote href or src in a report is a disclosure channel: following one — or in the <img> case merely opening the report — tells whoever controls that host that the account is under examination, when, and from which IP address. Reports are read on analyst workstations and mailed to counsel, so a report should reach nothing outside its own folder.

What changed

  • safe_url() no longer builds an anchor. It returns the URL as escaped text, so the evidence stays readable and copyable while the destination goes. The scheme allowlist it used to gate anchors on goes with them.
  • safe_local_link() is added for the destinations that stay: report-relative paths. It refuses a scheme, a protocol-relative //host, an absolute path, and any .. segment.

No artifact in this core builds an anchor by hand, so the helper is the whole change.

This matters more than a zero-diff port looks: an artifact calling safe_url() was still emitting a live remote anchor here, because this core carried the old anchor-building version of the helper.

Validation

  • py_compile clean
  • safe_url returns no anchor for a remote URL; safe_local_link anchors a report-relative path and refuses a remote one
  • PluginLoader loads every plugin

🤖 Generated with Claude Code

Port of the iLEAPP change, keeping html_safe.py byte-identical across the
cores that carry it.

A remote href or src in a report is a disclosure channel: following one, or
in the <img> case merely opening the report, tells whoever controls that host
that the account is under examination, when, and from which IP address.

- safe_url() no longer builds an anchor. It returns the URL as escaped text,
  so the evidence stays readable and copyable while the destination goes.
  The scheme allowlist it used to gate anchors on goes with them.
- safe_local_link() is added for the destinations that stay: report-relative
  paths. It refuses a scheme, a protocol-relative //host, an absolute path,
  and any .. segment, so a report link cannot leave the report folder.

No artifact in this core builds an anchor by hand, so the helper is the whole
change here.

Validated: py_compile clean; safe_url returns no anchor for a remote URL,
safe_local_link anchors a report-relative path and refuses a remote one;
PluginLoader loads every plugin.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@abrignoni abrignoni closed this Aug 7, 2026
@abrignoni abrignoni reopened this Aug 7, 2026
@abrignoni
abrignoni merged commit 6e0ac47 into main Aug 7, 2026
4 checks passed
@abrignoni
abrignoni deleted the fix/no-external-links branch August 7, 2026 00:09
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