diff --git a/rules/java/lang/hardcoded_database_password.yml b/rules/java/lang/hardcoded_database_password.yml index dd3f30bfb..188dc94a1 100644 --- a/rules/java/lang/hardcoded_database_password.yml +++ b/rules/java/lang/hardcoded_database_password.yml @@ -3,7 +3,7 @@ patterns: $.getConnection($<_>, $<_>, $) filters: - variable: SQL_DRIVER_MANAGER - detection: java_lang_hardcoded_database_password_sql_driver_manager + regex: \A(java\.sql\.)?DriverManager\z - variable: STRING_LITERAL detection: string_literal scope: cursor @@ -13,10 +13,6 @@ patterns: languages: - java severity: warning -auxiliary: - - id: java_lang_hardcoded_database_password_sql_driver_manager - patterns: - - DriverManager metadata: description: "Hardcoded database password detected" remediation_message: |