-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/assessor/manifest: Add sensitive variable names checks (#189)
* pkg/assessor/manifest: Add sensitive/suspicious vars checking to history cmds Signed-off-by: Alvaro Frias Garay <[email protected]> * Add flag -sensitive-word to add keyword when searching in sensitive words assessment Signed-off-by: Alvaro Frias Garay <[email protected]> * pkg/assessor/manifest: Add unit tests Signed-off-by: Alvaro Frias Garay <[email protected]> * pkg/assessor/manifest: Apply corrections Use suspiciousEnvKey and remove sensitiveWords slice. Change senstiveVars function signature. Returns boolean and sensitive word string if found. Update regex to ignore case sensitivity & handle regex error. Remove useless for. Use Sprintf instead of ReplaceAll. Update assessment message; now prints the suspicious env key found. Signed-off-by: Alvaro Frias Garay <[email protected]> * pkg/assessor/manifest: Add unit test for mixed cases sensitive key Signed-off-by: Alvaro Frias Garay <[email protected]> * pkg/assessor/manifest: Add acceptance keys checks to sensitiveVars Signed-off-by: Alvaro Frias Garay <[email protected]> * remove: check img.Config.Env, precompile: regexp.Compiler * pkg/assessor/manifest: Removed API from suspiciousEnvKey slice Signed-off-by: Alvaro Frias Garay <[email protected]> * fix TestSensitiveVars Co-authored-by: Alvaro Frias Garay <[email protected]> Co-authored-by: Tomoya AMACHI <[email protected]>
- Loading branch information
1 parent
da1a15c
commit b7b64e3
Showing
6 changed files
with
97 additions
and
22 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
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
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