Skip to content

Commit

Permalink
engine/leaks:bugfix - improving leaks rule 26
Browse files Browse the repository at this point in the history
Leaks rule 26 was not getting passwords set with colons.

Signed-off-by: Nathan Martins <nathan.martins@zup.com.br>
  • Loading branch information
nathanmartinszup committed Feb 4, 2022
1 parent f14f910 commit eb3b758
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/services/engines/leaks/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,11 @@ func NewHardCodedPassword() *text.Rule {
},
Type: text.Regular,
Expressions: []*regexp.Regexp{
regexp.MustCompile(`(?i)(set)?password\s*(.?=.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?pass\s*(.?=.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?pwd\s*(.?=.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?passwd\s*(.?=.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?senha\s*(.?=.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?password\s*(.?=.?|.?:.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?pass\s*(.?=.?|.?:.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?pwd\s*(.?=.?|.?:.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?passwd\s*(.?=.?|.?:.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
regexp.MustCompile(`(?i)(set)?senha\s*(.?=.?|.?:.?|\()\s*['|\"]\w+[[:print:]]*['|\"]`),
},
}
}
Expand Down

0 comments on commit eb3b758

Please sign in to comment.