Skip to main content

Automated smart contract security analysis powered by formal verification

Project description

Certora Patrol

Automated smart contract security analysis powered by formal verification.

Prerequisites

  • Python 3.12+
  • Java 21+ (required by the Certora prover)
  • Foundry (forge build must succeed on your project)
  • CERTORAKEY — Sign up at certora.com and store the API key from your signup email as an environment variable.
  • ANTHROPIC_API_KEY — Beta testers will receive a Claude API key from Certora to cover LLM-related costs. Set it as an environment variable.

[!IMPORTANT] If you are a beta tester, make sure ANTHROPIC_API_KEY is set to the key provided by Certora, not your personal key. Patrol will first open your browser to authenticate with prover.certora.com.

Install

uv venv patrol-env && source patrol-env/bin/activate
uv pip install certora-patrol

Or with pip:

python -m venv patrol-env && source patrol-env/bin/activate
pip install certora-patrol

Usage

cd /path/to/your/contracts
patrol src/Token.sol

With explicit contract name (in case contract name does not match the file name):

patrol src/Vault.sol:MyVault

[!IMPORTANT] Both CERTORAKEY and ANTHROPIC_API_KEY must be set in your environment before running Patrol. You can also pass them inline: ANTHROPIC_API_KEY=sk-... CERTORAKEY=... patrol src/Token.sol.

What it does

  1. Builds your project and sets up verification infrastructure
  2. Runs formal verification checks (generic rules and AI-inferred rules)
  3. Analyzes results with AI and generates an HTML report

Once complete, Patrol prints the path to the generated HTML report in the current working directory.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

certora_patrol-0.1.10-py3-none-any.whl (824.7 kB view details)

Uploaded Python 3

File details

Details for the file certora_patrol-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for certora_patrol-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 df5700230675e7e8956e81342602a0c8a87ab8c6f0b64a1e5e5404af51d6cd22
MD5 0806d8fbf8c1a0580968c21dbe4dad9e
BLAKE2b-256 212e4e112514a332a729c9f91997cf9431ec55e2fdb64d3d377b7f4c67215ae6

See more details on using hashes here.

Provenance

The following attestation bundles were made for certora_patrol-0.1.10-py3-none-any.whl:

Publisher: publish.yml on Certora/patrol-release

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