Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet committed Jan 26, 2024
1 parent b1c3a8a commit 53c61eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
13 changes: 10 additions & 3 deletions rules/java/lang/blowfish_key_size.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
imports:
- java_shared_lang_blowfish_key_generator_init
patterns:
- pattern: $<BLOWFISH_KEY_GEN>.init($<SIZE>);
filters:
- variable: BLOWFISH_KEY_GEN
detection: java_shared_lang_blowfish_key_generator_init
detection: java_lang_blowfish_key_generator_init
- variable: SIZE
less_than: 128
auxiliary:
- id: java_lang_blowfish_key_generator_init
patterns:
- pattern: $<KEY_GENERATOR>.getInstance($<BLOWFISH_ALGORITHM>$<...>);
filters:
- variable: KEY_GENERATOR
regex: \A(java\.crypto\.)?KeyGenerator\z
- variable: BLOWFISH_ALGORITHM
string_regex: (?i)\ABlowfish\z
languages:
- java
severity: warning
Expand Down
19 changes: 0 additions & 19 deletions rules/java/shared/lang/blowfish_key_generator_init.yml

This file was deleted.

0 comments on commit 53c61eb

Please sign in to comment.