Permi
The security signal filter for African fintech engineering teams
What is Permi?
Most security scanners produce hundreds of findings. Most are noise. Developers learn to ignore them — and that is when the real vulnerabilities get missed.
Permi fixes this. It scans your codebase for vulnerabilities, then uses an AI filter to confirm which findings are real before you see them. Your team spends time fixing actual problems instead of chasing false alarms.
Permi also includes rules built specifically for the African development context — USSD gateway vulnerabilities, Paystack and Flutterwave credential exposure, and patterns relevant to Nigeria Data Protection Act compliance. No foreign scanner prioritises this. Permi does.
Built from Jos, Nigeria. For African fintech engineering teams. Then for the world.
Quick Start
pip install permi
permi setup --community # 50 free AI filter credits — no card needed
permi scan ./myapp
⚠️ Windows Users — If Permi Freezes on First Run
Some Windows machines freeze immediately when running permi — even before the banner appears. This is caused by Windows Defender or corporate antivirus scanning Python processes in real time.
Fix — add Permi to your antivirus exclusions:
- Open Windows Security → Virus & threat protection → Manage settings
- Scroll to Exclusions → Add an exclusion → Folder
- Add these two folders:
C:\Users\<yourname>\.permiC:\Users\<yourname>\Permi\venv(or wherever your venv lives)
- Open a new terminal and run
permiagain
If you are on a corporate machine or university network, your IT department may have group policies that block Python subprocess calls. Run Permi from Windows Subsystem for Linux (WSL) instead:
wsl
pip install permi
permi scan ./myapp
Installation
pip install permi
Requires Python 3.9+. Works on Windows, macOS, and Linux.
Usage
Scan a local codebase
permi scan ./myapp
Scan a GitHub repository
permi scan https://github.com/username/repo
High severity findings only
permi scan ./myapp --severity high
Export results to a file
permi scan ./myapp --export results.md
permi scan ./myapp --export results.json
permi scan ./myapp --export results.txt
permi scan ./myapp --export report.docx
If you give a bare filename (no folder), Permi saves it under ~/.permi/exports/ and prints that location so it's never a mystery where the file went. Give an absolute or relative path with a folder (./reports/results.md) to save it exactly there instead.
.docx exports are a curated summary — one example finding per category, meant for a compliance/sales handoff — so a full .md report with every finding is written alongside it automatically for technical review.
Show all raw findings (skip AI filter)
permi scan ./myapp --offline
JSON output (for CI/CD pipelines)
permi scan ./myapp --output json
Setting Up AI Filtering
The AI filter is what separates confirmed vulnerabilities from noise. Without it, Permi shows all raw findings. With it, each finding is reviewed before you see it.
Option 1 — Free community credits (recommended for new users)
permi setup --community
50 free AI filter calls. No credit card. Starts immediately. The community proxy may take up to 60 seconds to wake on first use — it retries automatically.
Option 2 — Your own OpenRouter API key (unlimited)
permi setup --api-key YOUR_KEY
Get a free key at openrouter.ai.
GitHub Action — Scan Every Pull Request
Add Permi to your CI/CD pipeline. Every pull request is automatically scanned, findings are posted as PR comments, and merges are blocked if high severity issues are found.
# .github/workflows/security.yml
name: Security Scan
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
permi-scan:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: Peternasarah/permi-action@v1
with:
severity: high
openrouter_api_key: ${{ secrets.OPENROUTER_API_KEY }}
What happens on every PR:
- Permi scans the changed code
- AI filter removes false positives
- Findings posted as a PR comment
- Merge blocked if high severity issues found
- Free forever
→ View Permi GitHub Action on the Marketplace
How It Works
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ Scanner │───▶│ AI Filter │───▶│ Results │
│ SQL · XSS │ │ Confirms or │ │ Only real │
│ Secrets · + │ │ dismisses │ │ findings │
└─────────────┘ │ each finding │ └──────────────┘
└──────────────┘
AI filter:
- Reviews each finding individually before it reaches you
- CSP-aware: correctly dismisses reflected XSS when a Content-Security-Policy blocks execution
- Caches results so repeated scans do not consume extra credits
- Three-tier verdict: REAL / REVIEW / FP with confidence score 0-100
- Community proxy for users without their own API key
What Permi Detects
Source code scanning
| Category | What is detected |
|---|---|
| SQL Injection | String concatenation, f-strings, % formatting in queries |
| Cross-Site Scripting | innerHTML, document.write, Jinja2 |safe filter |
| Hardcoded Secrets | Passwords, API keys, AWS keys, Paystack/Flutterwave secrets |
| Insecure Practices | eval(), exec(), pickle.loads(), SSL verification disabled, debug mode |
| USSD Vulnerabilities | Unvalidated sessionId, phoneNumber, serviceCode |
Nigerian and African-Specific Rules
Permi includes rules built for the African development context that no global tool will ever prioritise:
- USSD gateway vulnerabilities — unvalidated sessionId, phoneNumber, serviceCode
- Paystack and Flutterwave key exposure — detects Nigerian payment gateway live secrets
- BVN and NIN pattern detection — NDPA-sensitive personal data in code
- NDPA-relevant patterns — helps with Nigeria Data Protection Act compliance
Example Output
[Permi] Target : ./myapp
[Permi] Engine found 7 raw finding(s)
[Permi] Running AI filter on 7 finding(s)...
════════════════════════════════════════════════════════════════════════
FILTER SUMMARY
════════════════════════════════════════════════════════════════════════
Raw findings : 7
Confirmed real : 4
False positives : 3 removed
Noise reduced by : 43% [████████░░░░░░░░░░░░]
Avg confidence : 89%
Severity breakdown:
● High : 2
● Medium : 2
Top issues to fix:
• 2× SQL Injection — string concatenation
• 1× Hardcoded secret — generic password
• 1× Insecure — SSL/TLS verification disabled
════════════════════════════════════════════════════════════════════════
[1] [HIGH] SQL001 SQL Injection — string concatenation
File : app/routes/users.py:42
Fix : Use parameterised queries: cursor.execute("SELECT * FROM users WHERE name = ?", (name,))
AI : REAL [94% confidence] User input is concatenated directly into the query string.
Scan completed in 4s
CLI Reference
permi scan PATH Scan local codebase or GitHub repo
--severity LEVEL critical | high | medium | low | all (default: all)
--offline Skip AI filter, show raw findings
--output FORMAT human (default) | json
--export FILE Export full report (.txt, .json, .md, .docx)
--project NAME Project name for the database
permi setup --community Register for 50 free AI filter credits
permi setup --api-key KEY Use your own OpenRouter API key (unlimited)
permi info Show config and credit status
permi feedback Share feedback with the Permi team
CI/CD Integration
Permi exits with code 1 if any HIGH severity findings are confirmed after filtering. Use this in any pipeline:
# GitHub Actions — inline (without the Marketplace Action)
- name: Run Permi security scan
run: |
pip install permi
permi setup --api-key ${{ secrets.OPENROUTER_API_KEY }}
permi scan . --severity high --output json --export permi-report.json
# Fail the build on high severity findings
permi scan ./myapp --severity high || exit 1
Changelog
v0.3.1 — Codebase-only focus
- REMOVED: Live URL/web scanning (
--url,--js,--js-timeout,--include-subdomains,--max-pages). Permi now focuses exclusively on source code scanning, which is where the AI filter, fix templates, and compliance mapping add the most value.--pathis also gone — pass the path positionally:permi scan ./myappinstead ofpermi scan --path ./myapp. - CHANGED:
.docxexports now automatically write a matching.mdalongside them with the full findings list, for technical review. - CHANGED: Exporting without a folder in the filename now prints an explicit notice that the report is being saved to the default
~/.permi/exports/location. - CHANGED: The feedback prompt no longer shows after every scan — it appears at most once every 10-15 scans.
- REMOVED:
permi[js]extra (Playwright/playwright-stealth) and thehttpx/beautifulsoup4dependencies.
v0.2.17 — Precision improvements
- FIX: Windows Defender freeze — DB path now resolves lazily, not at import time
- FIX: XSS false positives — proper HTML entity encoding check before flagging
- FIX: Boolean SQLi false positives — both responses must exceed 2000 bytes
- FIX: Time-based SQLi — requires minimum 8s hard threshold, not just baseline + 4s
- FIX: Tracking parameters (utm_, ref_, locale) now fully skipped in all scanners
- NEW: Progress indicator during web scan — scan never looks frozen
- NEW:
pip install "permi[js]"installs Playwright dependencies automatically - NEW:
permi infoshows playwright-stealth installation status
v0.2.13 — JS/SPA Support + GitHub Action
- NEW:
--jsflag for JavaScript-rendered applications (React, Vue, Angular, Next.js) - NEW: Playwright headless browser integration with stealth mode
- NEW: Network interception — discovers XHR/fetch API endpoints automatically
- NEW: SPA detection warning with exact re-run command shown to user
- NEW: Permi GitHub Action
- NEW: Windows antivirus freeze detection and guidance
- NEW: Scan timer — total duration shown at end of every scan
v0.2.2 — AI Filter + Community Proxy
- Precision filter with three-tier verdict: REAL / REVIEW / FP with 0–100 confidence score
- Community proxy — 50 free credits with
permi setup --community - OpenRouter API key support
- Inline fix templates — exact remediation per finding
--exportflag — save full reports as .txt, .json, or .md--include-subdomainsflag- Feedback system —
permi feedback
v0.1 — Foundation
- CLI scanner (web + static analysis)
- PyPI distribution (
pip install permi) - 17 detection rules across SQL, XSS, secrets, USSD, insecure practices
- SQLite database at
~/.permi/permi.db
Contributing
Pull requests welcome. Please open an issue first to discuss significant changes.
If you find a vulnerability in a real application using Permi, please report it responsibly to the affected organisation before disclosing publicly. See CONTRIBUTING.md for the full guide, including how to write new vulnerability rules.
Author
Nasarah Peter Dashe Founder · Cybersecurity Student @ University of Jos, Nigeria github.com/Peternasarah/permi · @peternasarah
Links
- Website: peternasarah.github.io/permi
- PyPI: pypi.org/project/permi
- GitHub Action: github.com/marketplace/actions/permi-security-scanner
- Issues: github.com/Peternasarah/permi/issues
- Security: SECURITY.md
- License: LICENSE
License
PERMI COMMUNITY LICENSE — see LICENSE for details.
Built in Nigeria. For Nigeria. Then for the World.
Metadata
Release files for permi 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| permi-0.4.0.tar.gz | 92.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| permi-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 185.0 kB
Release files / permi-0.4.0.tar.gz
| Download URL | permi-0.4.0.tar.gz |
|---|---|
| Size | 92.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
666bdeac550d2322e9574547c03063a853c427defeef76000dcc16da5dd72386
|
|
BLAKE2b-256 checksum How to use checksums |
30961545013cdef4ce5336658a0b3601f06343bd5ca922dbdac34d9efbcf8d12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / permi-0.4.0-py3-none-any.whl
| Download URL | permi-0.4.0-py3-none-any.whl |
|---|---|
| Size | 93.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcc61eb2b9b9cd9f4037b06b35523a0662ff9a5ab8061683403e31845e6aee67
|
|
BLAKE2b-256 checksum How to use checksums |
53ff4a7c43b1abb0bbb88abba86d5e848be7ce75dfeb83810b6d4413d96f8420
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|