Skip to main content

CoreTrace Python Analyzer

A standalone static security analyzer for Python. It finds injection vulnerabilities by following attacker-controlled data through the program, across functions, files, objects and closures, and judges each flow against the guards on its path; it reports dangerous API usage, secrets committed in sources and configuration, and vulnerable or forbidden dependencies, correlated with the code that reaches them. It runs offline, on a file or a whole project, with no runtime dependency.

pip install coretrace-python-analyzer
coretrace-python-analyzer --check src/ --format sarif > report.sarif
  • Usage guide: command line, rules, report formats, dependencies and advisories, cache and parallelism, continuous integration.
  • Writing a plugin: models for another framework, detectors for another rule, secret patterns and project-wide checks.
  • Architecture: the engine's design and its migration plan.

The pipeline: source manager, parser-independent high-level representation (PyHIR), semantic resolution of imports and scopes, lowering to a small intermediate representation (PyIR), control-flow graphs, SSA, data-flow and abstract interpretation, interprocedural summaries, taint and refutation, then plugins and reporters.

Development

python -m venv .venv
python -m pip install -e ".[dev]"
python -m mypy
python -m pytest
python -m ruff check .

The non-regression suite analyses the public repositories pinned in tests/regression/repositories.toml and compares findings and coverage with the snapshots in tests/regression/expected/. It clones on first use, needs the network and runs in its own CI job:

python -m pytest -m regression
CORETRACE_REGRESSION_UPDATE=1 python -m pytest -m regression   # record an intended change

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coretrace_python_analyzer-0.1.0.tar.gz (242.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coretrace_python_analyzer-0.1.0-py3-none-any.whl (167.6 kB view details)

Uploaded Python 3

File details

Details for the file coretrace_python_analyzer-0.1.0.tar.gz.

File metadata

File hashes

Hashes for coretrace_python_analyzer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e47cbee3e3072dd4de37895beb5084bbccdc1d4cd56b0a716b4dadce0fc4aade
MD5 08b6c3fdaf5479f7be879bc468c85c90
BLAKE2b-256 f020d748ba36ebd7d09e701acb492f6a71dcdcf95f8c392df564ed6915fce51e

See more details on using hashes here.

Provenance

The following attestation bundles were made for coretrace_python_analyzer-0.1.0.tar.gz:

Publisher: release.yml on CoreTrace/coretrace-python-analyzer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coretrace_python_analyzer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for coretrace_python_analyzer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f81f876b55296318b8808bdfa76e8b4d201e0cc1d4d4a35574adc3c2d8b9eb8
MD5 d52053a6ee656fd53cbb053592f6bcab
BLAKE2b-256 89c9d2bb312afe19195c2d215531b0b40edb03b72bbe0c89f105ec2ed03b4c71

See more details on using hashes here.

Provenance

The following attestation bundles were made for coretrace_python_analyzer-0.1.0-py3-none-any.whl:

Publisher: release.yml on CoreTrace/coretrace-python-analyzer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page