Skip to content

Commit

Permalink
engine/leaks:bugfix - improving leaks rule 26 (#972)
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>
(cherry picked from commit 87673d1)
  • Loading branch information
nathanmartinszup committed Feb 9, 2022
1 parent 5359bed commit a02cb68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions e2e/analysis/test_case.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ func NewTestCase() []*TestCase {
fmt.Sprintf(messages.MsgPrintFinishAnalysisWithStatus, analysis.Success),
messages.MsgDebugVulnHashToFix,
messages.MsgWarnAnalysisFoundVulns[16:],
"In this analysis, a total of 69 possible vulnerabilities were found and we classified them into:",
"Total of Vulnerability CRITICAL is: 18",
"In this analysis, a total of 73 possible vulnerabilities were found and we classified them into:",
"Total of Vulnerability CRITICAL is: 22",
"Total of Vulnerability HIGH is: 24",
"Total of Vulnerability MEDIUM is: 24",
"Total of Vulnerability LOW is: 3",
Expand Down
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.TextRule {
},
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 a02cb68

Please sign in to comment.