Skip to main content

presidio-hardened-vuln-scanner

Web application vulnerability scanner with a deliberately vulnerable Flask app and its hardened counterpart. Used in Experiment 3 of PRES-EDU-SEC-101.

Warning: vulnerable_app/ contains intentional security flaws. Never deploy it outside a local development environment.

Setup

git clone https://github.com/presidio-v/presidio-hardened-vuln-scanner.git
cd presidio-hardened-vuln-scanner
pip install -r requirements.txt

Phase A — Static Analysis

bandit -r vulnerable_app/ -f json -o reports/bandit_report.json -ll
bandit -r vulnerable_app/ -f txt
pip-audit --requirement vulnerable_app/requirements.txt \
          --output reports/pip_audit.json --format json
python report.py --phase static

Expected findings: hardcoded secret key, eval, insecure subprocess, MD5 hashing.

Phase B — Dynamic Scanning

cd vulnerable_app && python app.py &
cd ..
python scanner.py --target http://localhost:5000 \
                  --checks sqli xss csrf auth headers \
                  --output reports/dynamic_report.json
python report.py --phase dynamic

Expected findings: SQL injection, reflected XSS, missing CSRF token, missing headers.

Phase C — Manual Exploitation

python exploit.py --vuln sqli \
                  --payload "' OR '1'='1" \
                  --target http://localhost:5000

python exploit.py --vuln xss \
                  --payload "<script>alert('XSS')</script>" \
                  --target http://localhost:5000

Phase D — Fix and Verify

kill %1
cd fixed_app && python app.py --port 5001 2>/dev/null || python app.py &
cd ..
bandit -r fixed_app/ -f txt
python scanner.py --target http://localhost:5001 \
                  --checks sqli xss csrf auth headers \
                  --output reports/dynamic_report_fixed.json
python report.py --compare vulnerable fixed

What to Measure

  • Findings before fix: count by severity (HIGH / MEDIUM / LOW)
  • Findings after fix: should be zero HIGH
  • Takeaway: static + dynamic analysis find different vulnerability classes

License

MIT


SDLC

This repository is developed under the Presidio hardened-family SDLC: https://github.com/presidio-v/presidio-hardened-docs/blob/main/sdlc/sdlc-report.md.

Metadata

Release files for presidio-hardened-vuln-scanner 0.1.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 presidio-hardened-vuln-scanner 0.1.0
File Size Uploaded Provenance Actions
presidio_hardened_vuln_scanner-0.1.0.tar.gz 17.4 kB With provenance Details for presidio_hardened_vuln_scanner-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for presidio-hardened-vuln-scanner 0.1.0
File Interpreter ABI Platform Actions
presidio_hardened_vuln_scanner-0.1.0-py3-none-any.whl Python 3 none any Details for presidio_hardened_vuln_scanner-0.1.0-py3-none-any.whl

Total release size: 28.5 kB

Release files / presidio_hardened_vuln_scanner-0.1.0.tar.gz

Download URL presidio_hardened_vuln_scanner-0.1.0.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
04c4d926ba6cd275b21379b8fa8b5249f37643698963e7c68d7f13164fd5afce
BLAKE2b-256 checksum
How to use checksums
730ec0faf13b3e685cfebb07a6c6a905225c97ce37cdf8d2fcdb529537dd63fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 11, 2026.

Transparency log

Release files / presidio_hardened_vuln_scanner-0.1.0-py3-none-any.whl

Download URL presidio_hardened_vuln_scanner-0.1.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bb3ed496570c26c17c7cdc0c0d06c8ba7821f66fae0a8c46495269a8956c6dd
BLAKE2b-256 checksum
How to use checksums
e270339d64bead6ebd8d182f28a44fca0c56020afa48a559f7b1246a37336662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 11, 2026.

Transparency log

Security for presidio-hardened-vuln-scanner 0.1.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 presidio_hardened_vuln_scanner-0.1.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 Jun 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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