Skip to content
vetkitChecksChangelogDocumentationBlogComparisons

Python pip install at runtime bypasses the lockfile

Rule ID: vetkit.py.supply-chain.runtime-pip-install

The application installs a Python package at runtime by invoking pip. This bypasses the lockfile and the review of dependency changes; when the package name is computed (from configuration, a provider name or model output) the process can be made to install any package from the index, which runs arbitrary code.

Last updated:

Suite: Security

python

The application installs a Python package at runtime by invoking pip. This bypasses the lockfile and the review of dependency changes; when the package name is computed (from configuration, a provider name or model output) the process can be made to install any package from the index, which runs arbitrary code.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Declare the dependency (or optional extra) in the project manifest and install it at build time from the lockfile. If optional backends must be installed lazily, map the configuration value to a fixed table of name==version pins and refuse anything else.

References

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

Related checks

Check your own repository for this

vetkit runs this rule as part of a repository audit, alongside secret scanning, dependency vulnerabilities, code quality and AI code risk checks. It reads a temporary checkout and never executes your code.

Start with the free Security Quick Scan · See how the platform works

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.