Skip to content

Commit

Permalink
Update rules/python/lang/eval_using_user_input.yml
Browse files Browse the repository at this point in the history
Co-authored-by: David Roe <[email protected]>
  • Loading branch information
elsapet and didroe authored May 14, 2024
1 parent 5b0e130 commit 7be2b14
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions rules/python/lang/eval_using_user_input.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ patterns:
auxiliary:
- id: python_lang_eval_using_user_input_literal_eval
patterns:
- pattern: $<AST_LITERAL_EVAL>
- pattern: $<AST_MODULE>.literal_eval
filters:
- variable: AST_LITERAL_EVAL
regex: \A(ast\.)?literal_eval\z
- variable: AST_MODULE
detection: python_lang_eval_using_user_input_ast_module
scope: cursor
- from ast import $<!>literal_eval
- from ast import literal_eval as $<!>$<_>
- id: python_lang_eval_using_user_input_ast_module
patterns:
- import $<!>ast
- import ast as $<!>$<_>
- id: python_lang_eval_using_user_input_subinterpreters
patterns:
- import $<!>_xxsubinterpreters
Expand Down

0 comments on commit 7be2b14

Please sign in to comment.