Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(java): clean up EL injection rule #204

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions rules/java/lang/expression_language_injection.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
imports:
- java_shared_lang_instance
- java_shared_lang_user_input
patterns:
- pattern: $<EXPRESSION_FACTORY>.$<METHOD>($<EL_CONTEXT>, $<STRING_PARAM>$<...>);
filters:
Expand All @@ -27,11 +26,11 @@ auxiliary:
patterns:
- pattern: |
class $<...>$<_> $<...>{
$<...>$<_> $<_>($<...>$<JAVA_SHARED_LANG_INSTANCE_TYPE> $<JAVA_SHARED_LANG_INSTANCE_VARIABLE>$<...>)$<...>{}
$<...>$<_> $<_>($<...>$<STRING_TYPE> $<STRING_VAR>$<...>)$<...>{}
}
focus: JAVA_SHARED_LANG_INSTANCE_VARIABLE
focus: STRING_VAR
filters:
- variable: JAVA_SHARED_LANG_INSTANCE_TYPE
- variable: STRING_TYPE
regex: \A(java\.lang\.)?String\z
languages:
- java
Expand Down
Loading