B102: Test for the use of exec¶
This plugin test checks for the use of Python’s exec method or keyword. The Python docs succinctly describe why the use of exec is risky.
>> Issue: Use of exec detected. Severity: Medium Confidence: High CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html) Location: ./examples/exec.py:2 1 exec("do evil")
New in version 0.9.0.
Changed in version 1.7.3: CWE information added