Repository navigation
Conversation
Unparseable URL candidates were classified as public, then stripped before host and IP scans. That accepted http://169.254.169.254:foo while the same host in a valid URL was rejected. Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
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.
What Problem This Solves
The action ledger privacy filter is supposed to reject private hosts in event text. A candidate that looks like a URL but fails
new URL(invalid port such ashttp://169.254.169.254:foo) was treated as public, then stripped before host and IP scans. The same host in a valid URL or as a bare address was already rejected. That hole can let link-local and loopback addresses into the public ledger.Evidence
Live
nodeimport ofactionEventon the patched tree. Invalid-port private URLs now throwprivacy-unsafe event data. A public GitHub Actions run URL still succeeds.Before this patch the three invalid-port strings printed
EVENT_OK.Real behavior proof
scripts/ledger-schema.mjson branchfix/privacy-url-fail-closed.node --input-type=moduleimportingactionEventwith status stringshttp://169.254.169.254:foo,http://127.0.0.1:notaport,http://169.254.169.254:99999, plus the already-rejected valid metadata URL and a public GitHub run URL.nodecommand (see Evidence). Invalid-port private URLs printEVENT_THROWwithprivacy-unsafe event data.https://github.com/openclaw/clawsweeper/actions/runs/123printsEVENT_OK.privateUrlfails closed whennew URLthrows, so those strings never reach the strip-then-scan path that previously hid the private IP.statebranch.Change
privateUrlinscripts/ledger-schema.mjsreturns true when URL parsing throws, instead of false.Origin
Introduced in
7964f2af5f7.