feat: exclude RFC 2606 reserved domains from urlStrings alerts#1127
Open
h13 wants to merge 1 commit intoSocketDev:mainfrom
Open
feat: exclude RFC 2606 reserved domains from urlStrings alerts#1127h13 wants to merge 1 commit intoSocketDev:mainfrom
h13 wants to merge 1 commit intoSocketDev:mainfrom
Conversation
RFC 2606 reserves example.com, example.net, and example.org for documentation use. These domains cannot be registered, cannot serve as exfiltration endpoints, and pose zero supply chain risk. Skip urlStrings alerts where all detected URLs are RFC 2606 domains to prevent false positives on documentation tools, linters, and URL validators. Closes SocketDev#1126
Author
|
Note on I inferred the If the actual shape differs (e.g., |
Author
|
Update: Queried {
"props": {
"type": "object",
"properties": {
"urls": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["urls"]
}
}
|
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.
Summary
urlStringsalerts where all detected URLs are RFC 2606 reserved domains (example.com,example.net,example.org)Motivation
Packages that reference RFC 2606 domains — linters, documentation tools, URL validators — receive false-positive
urlStringsalerts. For example, textlint-rule-rfc2606-domains has a Supply Chain Security score of 70 solely because it containsexample.com,example.net,example.orgas comparison constants.See #1126 for full context.
Changes
In
addArtifactToAlertsMap(), added a check after the existingenabledStatefilter: if the alert type isurlStringsandalert.props.urlscontains only RFC 2606 domains, skip the alert.Note
I was unable to run the test suite locally (requires Node >=25.5.0). The change is minimal and isolated — happy to adjust based on CI results or review feedback.
Test plan
urlStringsalerts with only RFC 2606 domains are suppressedurlStringsalerts with non-RFC 2606 domains are still reported