Skip to content
vetkitChecksChangelogDocumentation

vetkit.py.code-injection.request-dynamic-import

A module name taken from request input is imported dynamically. Attackers can load arbitrary installed modules.

Last updated:

Suite: Security

python

A module name taken from request input is imported dynamically. Attackers can load arbitrary installed modules.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Map request values to modules through an explicit allow-list dictionary instead of importing by name.

References

Source: packages/engine/rules/sast/python.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.