Remove every remote destination from the HTML report - #392
Merged
Conversation
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>
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.
Why
Port of iLEAPP #1887, keeping
html_safe.pybyte-identical across the cores that carry it.A remote
hreforsrcin 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_compilecleansafe_urlreturns no anchor for a remote URL;safe_local_linkanchors a report-relative path and refuses a remote onePluginLoaderloads every plugin🤖 Generated with Claude Code