Skip to content

Commit

Permalink
java:chore - Adding improvements on Java Rules
Browse files Browse the repository at this point in the history
In this commit I changed to add Safe and Unsafe code in
all rules of the java. Reference from issue #630 and #1020.

Signed-off-by: Wilian Gabriel <wilian.silva@zup.com.br>
  • Loading branch information
wiliansilvazup committed Mar 21, 2022
1 parent 71b07db commit 423f22a
Show file tree
Hide file tree
Showing 7 changed files with 1,854 additions and 967 deletions.
1,695 changes: 997 additions & 698 deletions internal/services/engines/java/rules.go

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions internal/services/engines/java/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,12 @@ func TestRulesSafeCode(t *testing.T) {
Src: SampleSafeHSJAVA134,
Filename: filepath.Join(tempDir, fmt.Sprintf("%s%s", "HS-JAVA-134", ".test")),
},
{
Name: "HS-JAVA-144",
Rule: NewNullCipherInsecure(),
Src: SampleSafeHSJAVA144,
Filename: filepath.Join(tempDir, fmt.Sprintf("%s%s", "HS-JAVA-134", ".test")),
},
{
Name: "HS-JAVA-145",
Rule: NewUnsafeHashEquals(),
Expand Down
Loading

0 comments on commit 423f22a

Please sign in to comment.