Skip to main content

pysentra

PyPI Python License Build

Local-first security scanner for web applications (DAST) and universal local codebases (SAST + Secrets + Dependencies), featuring a zero-login live vulnerability dashboard.

Authorization required — Use pysentra only against systems and codebases you own or have explicit permission to assess. It rate-limits requests, avoids destructive checks, and requires an authorization confirmation before scanning.

Privacy

pysentra makes no external network calls other than to the target you specify and OSV.dev for dependency vulnerability checks. No telemetry, no analytics, no data leaves your machine. All scan reports, logs, and artifacts are stored locally in the pysentra-reports/ directory.

Install

pip install pysentra

For local development, use pip install -e ".[dev]".

Quickstart

1. Scan local code (Universal static & dependency scan)

Scan any repository or folder locally on any device without running the application:

cd ~/any/project
pysentra scan .

Or point to any local directory or file:

pysentra scan /path/to/repo

pysentra automatically inspects files for hardcoded secrets, insecure framework configs, vulnerable dependencies (via OSV.dev), exposed sensitive files, and potential code injection patterns.

2. Scan a running web app (DAST)

Run the intentionally vulnerable demo target in one terminal:

cd demo-vulnerable-app
pip install -r requirements.txt
python app.py

Then scan it from the project root:

pysentra scan http://localhost:5000 --i-am-authorized --target-is-test-app

Both modes generate report.json and a printable report.html under pysentra-reports/<timestamp>/ and start the live dashboard at http://127.0.0.1:8765 (no login or auth required).

Dashboard

Dashboard screenshot placeholder

The dashboard provides severity cards, a findings chart, interactive filters, expandable evidence/PoCs, and JSON/HTML export links. It binds strictly to 127.0.0.1 and requires zero credentials.

CLI Reference

Flag Purpose
pysentra scan [target] Scan a target URL (http://...) or local directory/file path (default: .).
--i-am-authorized Confirm authorization non-interactively.
--target-is-test-app Enable extra safe checks only intended for the bundled test app.
--modules auth,authz,... Comma-separated list of web check modules to run.
--auth-token <token> First test token for read-only authorization checks.
--second-auth-token <token> Second test token; enables cross-user IDOR checks.
--rate-limit <n> Maximum requests per second (positive number); default 5.
--bind <host> Host address to bind the dashboard server; default 127.0.0.1.
--port <port> Dashboard server port (integer 1-65535); default 8765.
--headless-browser Request optional Playwright-based browser checks.
--no-open Do not automatically open the dashboard in a browser.

Architecture

  1. Local Code Scanner (code_checks): Language-agnostic inspection covering Secrets, Dependencies (OSV.dev), Insecure Configs, Sensitive File Exposure, and Static Code Injection.
  2. Web Application Scanner (scanner/): Rate-limited, audited assessment covering Auth, AuthZ, Input Validation, API Security, Client-Side Controls, TLS/HSTS, Storage & Privacy, and CORS.
  3. Dashboard & Reporting (dashboard/, report/): Zero-login local web UI and JSON/HTML report generation.

Troubleshooting

"pip install --upgrade pysentra" doesn't show the latest version

Right after a new release, PyPI's CDN can take a minute or two to propagate, and pip may also be using a locally cached index response. If pysentra --version doesn't show the version you expect:

pip install --no-cache-dir --upgrade pysentra

This is expected shortly after a release and is not a bug — retry normally once a minute or two has passed.

Contributing

See CONTRIBUTING.md. Do not add checks that could be destructive, credential-brute-force targets, or bypass safeguards.

Metadata

Release files for pysentra 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysentra 1.2.0
File Size Uploaded Provenance
pysentra-1.2.0.tar.gz 42.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pysentra 1.2.0
File Interpreter ABI Platform
pysentra-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 80.4 kB

Release files / pysentra-1.2.0.tar.gz

Download URL pysentra-1.2.0.tar.gz
Size 42.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7a05b1b1648834d2722819c53f7a61e60e345137b5c5d4f3316fc69c9ba07524
BLAKE2b-256 checksum
How to use checksums
2173ac83744a264212c2abffd9f5bfd84d08563b5c404eebef24e54d408b2629
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / pysentra-1.2.0-py3-none-any.whl

Download URL pysentra-1.2.0-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6943f88a1a56fc08bbfe3522ced3d30d6f4ec8c8417974a3f64770b4625a80af
BLAKE2b-256 checksum
How to use checksums
54c47d41fb0d3c608a598103dea5e92f477f6651ecf3e00df4a4ae0c6aa8e5a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Security for pysentra 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pysentra-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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