Skip to content

Commit

Permalink
fix empty group on auth-url
Browse files Browse the repository at this point in the history
  • Loading branch information
Baruch Odem committed Mar 26, 2024
1 parent d71f135 commit 7a8a406
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/rules/authenticated_url.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func AuthenticatedURL() *config.Rule {
regex, _ := regexp.Compile(`:\/\/(\w+:\w\S+)?@\S+\.\S+`)
regex, _ := regexp.Compile(`:\/\/(\w+:\w\S+)@\S+\.\S+`)
rule := config.Rule{
Description: "Identify username:password inside URLS",
RuleID: "authenticated-url",
Expand All @@ -29,6 +29,7 @@ func AuthenticatedURL() *config.Rule {
`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])`,
`https://situmops:$(github_token)@github.com/$(Build.Repository.Name).git`,
`'$cmd "unilinks://@@malformed.invalid.url/path?"$cmdSuffix',`,
}

return validate(rule, tPositives, fPositives)
Expand Down

0 comments on commit 7a8a406

Please sign in to comment.