Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet committed Jun 14, 2024
1 parent 300d6f1 commit 6920f9d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rules/python/django/cookie_missing_http_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ auxiliary:
# ok if it is not False
- pattern: $<_>($<...>httponly=$<FALSE>$<...>)
filters:
- not:
- not:
variable: "FALSE"
detection: python_django_cookie_missing_http_only_false
scope: cursor
Expand Down
6 changes: 3 additions & 3 deletions rules/python/lang/avoid_pickle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ auxiliary:
values: [Unpickler]
languages:
- python
severity:
severity: critical
metadata:
description: Usage of unsafe Pickle libraries
remediation_message: |
## Description
Using pickle, _pickle and cPickle can make your application vulnerable to unsafe code execution. This is because the deserialization logic of these libraries allows for arbitrary code execution. It is best practices to avoid these libraries and to use a safer serialization formats like JSON.
Using pickle, _pickle and cPickle can make your application vulnerable to unsafe code execution. This is because the deserialization logic of these libraries allows for arbitrary code execution. It is best practices to avoid these libraries and to use a safer serialization formats like JSON.
## Remediations
Expand All @@ -69,6 +69,6 @@ metadata:
- [OWASP Deserialization cheat sheet](https://cheatsheetseries.owasp.org/cheatsheets/Deserialization_Cheat_Sheet.html)
cwe_id:
- 501
- 502
id: python_lang_avoid_pickle
documentation_url: https://docs.bearer.com/reference/rules/python_lang_avoid_pickle
5 changes: 2 additions & 3 deletions rules/python/lang/jwt_verification_bypass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ patterns:
- variable: MODULE1
values: [jwt]
- variable: NAME
values:
- decode
values: [decode]
- variable: OPTS
detection: python_lang_jwt_verification_bypass_options
auxiliary:
Expand All @@ -21,7 +20,7 @@ auxiliary:
- pattern: |
{ $<...>"verify_signature": $<FALSE>$<...> }
filters:
- variable: FALSE
- variable: "FALSE"
detection: python_lang_jwt_verification_bypass_false
scope: cursor
- id: python_lang_jwt_verification_bypass_false
Expand Down

0 comments on commit 6920f9d

Please sign in to comment.