Skip to main content

pysentra

PyPI Python License Build

Local-first web application security scanning for authorized assessments, with a live vulnerability dashboard.

Authorization required — Use pysentra only against systems you own or have explicit written permission to test. It rate-limits requests, avoids destructive checks, and requires an authorization confirmation before scanning. The bundled demo application is intentionally vulnerable and must never be deployed as a real service.

This project was initially prototyped for Smart India Hackathon problem statement 26163 (NTRO) and has been hardened into a production-grade security auditing tool.

Privacy

pysentra makes no external network calls other than to the target you specify. 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

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

The scanner writes report.json and a printable report.html under pysentra-reports/<timestamp>/, starts a dashboard securely bound to 127.0.0.1:8765, and opens it unless --no-open is used.

Dashboard

Dashboard screenshot placeholder

The dashboard has severity cards, a findings chart when Chart.js is available, filters, expandable evidence, and JSON/HTML export links.

CLI Reference

Flag Purpose
pysentra scan <url> Scan an HTTP(S) target. URL must be a valid http:// or https:// URL.
--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,input,api,client,tls,storage Run a selected comma-separated module set.
--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.

Architecture

The scanner orchestrates seven scope-area modules and sends every request through a rate-limited, audited request wrapper:

  1. Authentication & Session Management (auth_checks)
  2. Authorization & Access Control (authz_checks)
  3. Input Validation & Data Handling (input_checks)
  4. API Security (api_checks)
  5. Client-Side Security Controls (client_side_checks)
  6. Secure Communication Mechanisms (tls_checks)
  7. Data Storage & Privacy Protections (storage_privacy_checks)

Findings include a CVSS 3.1 base score, evidence, reproduction request, impact, and remediation. The audit log is embedded in both report formats.

Contributing

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

Metadata

Release files for pysentra 1.0.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.0.0
File Size Uploaded Provenance
pysentra-1.0.0.tar.gz 30.4 kB With provenance Details

Built distribution (wheel)

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

Total release size: 59.6 kB

Release files / pysentra-1.0.0.tar.gz

Download URL pysentra-1.0.0.tar.gz
Size 30.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1ca84b55b56e07653953549cfc62f03a29fc3d0fdedd827ad60b629f9fd6cbde
BLAKE2b-256 checksum
How to use checksums
6f3f8b6a3962dfc31a6d159817bf93561ce538879c656b3c41ef1fccb3cd1976
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.0.0-py3-none-any.whl

Download URL pysentra-1.0.0-py3-none-any.whl
Size 29.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b07267b1eb5443abf761ae3521c1857b35db00ccb9dbbd5ff5afc5446c6e830
BLAKE2b-256 checksum
How to use checksums
e4b88fcae68b6f2a812ca04fce4f83b8297d7307f4c46a3cbf7e6b98a52426e1
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.0.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.0.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