-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: unstabe rules and false positives in auth URL (#227)
Related: #226
- Loading branch information
Baruch Odem (Rothkoff)
authored
Mar 21, 2024
1 parent
364b65c
commit 2b320cc
Showing
3 changed files
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import ( | |
) | ||
|
||
func AuthenticatedURL() *config.Rule { | ||
regex, _ := regexp.Compile(`:\/\/(.+:.+)?@`) | ||
regex, _ := regexp.Compile(`:\/\/(\w+:\S+)?@\S+\.\S+`) | ||
rule := config.Rule{ | ||
Description: "Identify username:password inside URLS", | ||
RuleID: "authenticated-url", | ||
|
@@ -25,6 +25,9 @@ func AuthenticatedURL() *config.Rule { | |
fPositives := []string{ | ||
"https://google.com", | ||
"https://google.com?user=abc&password=123", | ||
`<img src="https://img.shields.io/static/v1?label=Threads&message=Follow&color=101010&link=https://threads.net/@mathrunet" alt="Follow on Threads" />`, | ||
`my [Linkedin](https://www.linkedin.com/in/rodriguesjeffdev/) or email: [email protected]`, | ||
`[![Gmail Badge](https://img.shields.io/badge/-VaibhavHariramani-d54b3d?style=flat-circle&labelColor=d54b3d&logo=gmail&logoColor=white&link=mailto:[email protected])](mailto:[email protected])`, | ||
} | ||
|
||
return validate(rule, tPositives, fPositives) | ||
|
This file contains 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