CanoP CLI
A fast, standalone static analysis tool for finding security risks in AI-generated code. CanoP runs locally and produces actionable findings with remediation guidance.
See CanoP in Action
Features
- High signal-to-noise: Targets AI-era risks such as SQL injection, unsafe reflection, and hardcoded secrets.
- Multi-language: Supports Python, JavaScript/TypeScript, Java, Go, Ruby, and PHP.
- CI/CD ready: Gate builds by severity or security score.
- AI prescriptions: Generates
fixes.jsonprompts for LLM-assisted remediation. - Standard reporting: Exports JSON and SARIF for GitHub and other security tools.
Installation
pip install canop
On macOS and Linux, use pipx if global pip installation is restricted:
pipx install canop
Verify the installation:
canop --version
Quick Start
Initialize .canop.yml and .canopignore:
canop init
Scan the current directory, or only files changed in Git:
canop scan .
canop scan . --changed
Findings are capped at 50 by default. Use --all for no cap or --limit N for a custom cap:
canop scan . --all
canop scan . --limit 10
Advanced Usage
CI/CD
These options return a non-zero exit code when the threshold is not met:
canop scan . --fail-on HIGH
canop scan . --min-score 85
Exporting Results
canop scan . --json-out results.json
canop scan . --sarif results.sarif
canop scan . --prescriptions fixes.json
The SARIF output can be uploaded to GitHub for inline findings. fixes.json contains prompts for LLM-assisted remediation.
Configuration
Add .canop.yml to the project root to define policy thresholds and ignored paths:
min_grade: B
fail_on:
- CRITICAL
- HIGH
ignore:
- "tests/**"
- "docs/**"
max_findings: 0
.canopignore uses .gitignore-style patterns to exclude files and directories.
How Detection Works
CanoP loads rules from canop/rules/*.yml and scans locally with its built-in pattern engine. Secret rules inspect comments to catch credentials accidentally left in frontend source by AI coding agents; other rules ignore comment-only lines to reduce noise. If installed, Semgrep adds AST-based analysis. It is optional and is not installed with CanoP.
Local Development
git clone https://github.com/openbreach/CanoP.git canop
cd canop
pip install -e .
python -m unittest discover -s tests -v
Build distribution artifacts with:
pip install -r requirements-dev.txt
python -m build
Rule Development
Rules use Semgrep YAML format and live in canop/rules/*.yml. See CONTRIBUTING.md for guidelines.
Support
For bugs and feature requests, open a GitHub issue or email canop.security@gmail.com.
License
This project is licensed under the MIT License.
Metadata
Release files for canop 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| canop-0.3.3.tar.gz | 76.9 kB | Without provenance | Details for canop-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| canop-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for canop-0.3.3-py3-none-any.whl |
Total release size: 173.3 kB
Release files / canop-0.3.3.tar.gz
| Download URL | canop-0.3.3.tar.gz |
|---|---|
| Size | 76.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
209dface2b3965b507b1e33cdd60b123f9de5cd70137d884e52b30e2ca258063
|
|
BLAKE2b-256 checksum How to use checksums |
0bdb3ce9dcb033c020775964c32393956315a76b5320d5bf05b61baa2e8ad097
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / canop-0.3.3-py3-none-any.whl
| Download URL | canop-0.3.3-py3-none-any.whl |
|---|---|
| Size | 96.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c583ba16365f19666b2004c408b901059395090d142e692f3f77ddaa64a8c747
|
|
BLAKE2b-256 checksum How to use checksums |
6768d5cebd06e81a28e7a194fe77386b06852f19a6962a79368592583c98cbd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Security for canop 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.