gitlab.bandit.B301-3
385
Download Count*
License
Avoid using dill
, which uses pickle
, which is known to lead to code execution vulnerabilities.
When unpickling, the serialized data could be manipulated to run arbitrary code.
Instead, consider serializing the relevant data as JSON or a similar text-based
serialization format.
Run Locally
Run in CI
Defintion
rules:
- id: bandit.B301-3
pattern-either:
- pattern: dill.$FUNC(...)
message: >
Avoid using `dill`, which uses `pickle`, which is known to lead to code
execution vulnerabilities.
When unpickling, the serialized data could be manipulated to run arbitrary code.
Instead, consider serializing the relevant data as JSON or a similar text-based
serialization format.
metadata:
cwe: "CWE-502: Deserialization of Untrusted Data"
owasp: "A8: Insecure Deserialization"
primary_identifier: bandit.B301-3
secondary_identifiers:
- name: Bandit Test ID B301
type: bandit_test_id
value: B301
license: MIT
languages:
- python
severity: WARNING
Short Link: https://sg.run/dgZ0