Skip to main content

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]

GitHub Code Scanning (SARIF)

Integrate findings directly into GitHub Security tab.

      - name: Run Privalyse
        uses: privalyse/privalyse-cli@v0.3.1
        with:
          format: 'sarif'
          out: 'results.sarif'

      - name: Upload SARIF file
        uses: github/codeql-action/upload-sarif@v2
        with:
          sarif_file: results.sarif

🚀 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.

Metadata

Release files for privalyse-cli 0.3.3

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

Source distribution (sdist)

Source distribution for privalyse-cli 0.3.3
File Size Uploaded Provenance Actions
privalyse_cli-0.3.3.tar.gz 151.7 kB With provenance Details for privalyse_cli-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for privalyse-cli 0.3.3
File Interpreter ABI Platform Actions
privalyse_cli-0.3.3-py3-none-any.whl Python 3 none any Details for privalyse_cli-0.3.3-py3-none-any.whl

Total release size: 283.9 kB

Release files / privalyse_cli-0.3.3.tar.gz

Download URL privalyse_cli-0.3.3.tar.gz
Size 151.7 kB
Tags Source
SHA-256 checksum
How to use checksums
352d1bf601b69ca7618b2ca95dce8e7be037459bfaa9bc11091e59c2aa487cb5
BLAKE2b-256 checksum
How to use checksums
01240383aa7cfd45a56c3d6bf4449cebed97b4a30deb8fe05dbf761089eb01b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Dec 26, 2025.

Transparency log

Release files / privalyse_cli-0.3.3-py3-none-any.whl

Download URL privalyse_cli-0.3.3-py3-none-any.whl
Size 132.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8caee8a9fe6f362aa328fec6b9487687f39dbcdc17eb1d84b6d9e360bf045664
BLAKE2b-256 checksum
How to use checksums
ae2d8b032b9bab623174abf31e1b07927ada5cd3d1a35421df8e240174c4101c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Dec 26, 2025.

Transparency log

Security for privalyse-cli 0.3.3

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for privalyse_cli-0.3.3.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 Dec 26, 2025.

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.

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