Skip to content

Commit

Permalink
fix(golang): remove encoder pattern from deserialization rule (CWE-502)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet committed Sep 26, 2024
1 parent 0758cab commit a6020fe
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions rules/go/lang/deserialization_of_user_input.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,13 @@ patterns:
filters:
- variable: DECODER
detection: go_lang_deserialization_of_user_input_decoder
- pattern: $<ENCODER>.Encode($<...>);
filters:
- variable: ENCODER
detection: go_lang_deserialization_of_user_input_encoder
auxiliary:
- id: go_lang_deserialization_of_user_input_decoder
patterns:
- pattern: gob.NewDecoder($<USER_INPUT>);
filters:
- variable: USER_INPUT
detection: go_shared_lang_dynamic_input_combined
- id: go_lang_deserialization_of_user_input_encoder
patterns:
- pattern: gob.NewEncoder($<USER_INPUT>);
filters:
- variable: USER_INPUT
detection: go_shared_lang_dynamic_input_combined
languages:
- go
metadata:
Expand Down

0 comments on commit a6020fe

Please sign in to comment.