Skip to main content

Privacy scanner with GDPR compliance reports - Zero config, instant insights

Project description

Privalyse Logo

The Linter for Privacy

Catch PII leaks & secrets before they hit production.

PyPI version Downloads License: MIT Tests Python Versions

Privalyse Demo


Privalyse is a static analysis tool that builds a Semantic Data Flow Graph of your application. It traces data from source to sink to detect privacy violations that regex-based tools miss.

  • Traditional Linter: "Variable user_email used in line 42."
  • Privalyse: "User Email (Source) → Prompt Template → OpenAI API (Sink) → Logs (Leak)."

⚡ Quick Start

Local

Install and run in seconds. No config required.

pip install privalyse-cli
privalyse
# ✅ Done. Check scan_results.md

GitHub Actions

Add to your CI pipeline in 30 seconds.

# .github/workflows/privacy.yml
name: Privacy Scan
on: [push, pull_request]

jobs:
  privalyse:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run Privalyse
        uses: privalyse/privalyse-cli@v0.3.1

Pre-Commit Hook

Catch leaks before you commit.

# .pre-commit-config.yaml
repos:
  - repo: local
    hooks:
      - id: privalyse
        name: Privalyse Scan
        entry: privalyse
        language: system
        pass_filenames: false

GitLab CI

# .gitlab-ci.yml
privalyse_scan:
  script:
    - pip install privalyse-cli
    - privalyse --out report.md
  artifacts:
    paths: [report.md]

🚀 Features

🕵️‍♂️ Secret Detection

Detects hardcoded API keys, tokens, and credentials before they are pushed.

  • Supports: AWS, Stripe, OpenAI, Slack, and generic high-entropy strings.

🗣️ PII Leak Prevention

Identifies Personal Identifiable Information (PII) leaking into logs, external APIs, or analytics.

  • Detects: Emails, Phone Numbers, Credit Cards, SSNs.
  • Context Aware: Understands variable names like user_email or client_id.

⚖️ GDPR & Data Sovereignty

Maps data flows to ensure compliance.

  • Flags: Data transfers to non-EU providers (e.g., OpenAI, AWS US-East).
  • Verifies: Usage of sanitization functions before data egress.

🤖 AI Guardrails

Specialized checks for LLM-integrated applications.

  • Prevents: Sending sensitive customer data to model prompts.
  • Audits: LangChain and OpenAI SDK usage.

🤖 For AI Agents & MCP Servers

Privalyse is designed to be agent-friendly. If you are building an AI coding agent or using an MCP (Model Context Protocol) server, Privalyse provides structured outputs that agents can understand.

privalyse --format json --out privalyse_report.json

Agents can read the JSON report to autonomously fix privacy leaks in the codebase.


🗺️ Roadmap

  • Python Support (AST Analysis)
  • JavaScript/TypeScript Support (AST & Regex)
  • Cross-File Taint Tracking
  • VS Code Extension (Coming Soon)
  • Custom Rule Engine

🤝 Contributing

We love contributions! Check out CONTRIBUTING.md to get started.

📄 License

MIT License. See LICENSE for details.

Project details


Download files

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

Source Distribution

privalyse_cli-0.3.2.tar.gz (149.8 kB view details)

Uploaded Source

Built Distribution

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

privalyse_cli-0.3.2-py3-none-any.whl (130.6 kB view details)

Uploaded Python 3

File details

Details for the file privalyse_cli-0.3.2.tar.gz.

File metadata

  • Download URL: privalyse_cli-0.3.2.tar.gz
  • Upload date:
  • Size: 149.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for privalyse_cli-0.3.2.tar.gz
Algorithm Hash digest
SHA256 4541d702d2b7921fc56f155f327f35cfb50812dd7fbf7bb78e221f9659b9d102
MD5 f8049ff2c79d74fae1789e3236a4936f
BLAKE2b-256 f61b4472315de8cf26d84b83e6476941d03c893cc30ab396a82744068d76909c

See more details on using hashes here.

Provenance

The following attestation bundles were made for privalyse_cli-0.3.2.tar.gz:

Publisher: publish.yml on Privalyse/privalyse-cli

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

File details

Details for the file privalyse_cli-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: privalyse_cli-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 130.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for privalyse_cli-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19f5096723ac4624587db078d762a3160a7d5f465b2d2bcb79cf3568594e4763
MD5 b2edd2b2f661358fc490e92720a9b4b4
BLAKE2b-256 6dec3978fde4c473493bdfeb6f0d2d3cbb778f37b6466a355d23d626720856a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for privalyse_cli-0.3.2-py3-none-any.whl:

Publisher: publish.yml on Privalyse/privalyse-cli

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page