Skip to main content

PassShore quality inspection engine — 167 standards, 7 deep scanners, Quality Gate, FixPR

Project description

PassShore Engine

Core quality inspection engine for passshore-agent. Replaces custom static standards with real industry-standard tools.

What it does

The engine's primary analysis path is industry_analyzer.run_full(), which runs three industry-standard tools on your Python source code:

Tool What it checks
bandit Security vulnerabilities (high/medium severity issues)
radon Cyclomatic complexity (A–F grade distribution, worst functions)
ruff Code quality defects (bugs, security concerns, lint violations)

Output format

{
  "quality_score": 87.3,
  "bandit": { "total": 5, "high": 0, "medium": 2, "high_items": [], "medium_items": [...] },
  "radon": { "total_functions": 142, "avg_complexity": 3.2, "grade_dist": {"A": 120, "B": 15, ...}, "worst": [...] },
  "ruff": { "total": 12, "bugs": 1, "security": 2, "critical": 3, "top": [...] },
  "summary": { "security_issues": 2, "high_security": 0, "complexity_issues": 7, "code_bugs": 1, ... }
}

The quality_score (0–100) is a weighted composite of complexity health (40%), security posture (35%), and code-bug density (25%).

Architecture

passshore_engine/
├── analyzers/
│   └── industry_analyzer.py     ← primary entry point: run_full()
├── compliance_checker.py         ← legacy wrapper (orchestrates standards + deep scanners)
├── standards/                    ← standard definitions, registry, quality gate
│   ├── standard_registry.py
│   ├── base.py                   (StandardResult, StandardCategory, etc.)
│   └── builtin/                  (security, compliance, architecture, API, …)
├── deep_scanners/                ← advanced on-demand scanners
│   ├── quality_gate.py
│   ├── dependency_scanner.py
│   ├── bola_bfla_tester.py
│   ├── openapi_validator.py
│   ├── bidirectional_openapi.py
│   ├── graphql_tester.py
│   ├── protocol_scanner.py
│   ├── performance_optimizer.py
│   └── adaptive_engine.py
├── checkers/                     ← per-category checkers
├── discoverer/                   ← API endpoint discovery
├── scanners/                     ← secrets, SAST
├── diagnosis/                    ← tech debt, LLM diagnosis
├── reporters/                    ← HTML/JSON/score reports
└── fix/                          ← auto-fix orchestration

Installation

This package is not published to PyPI. Install it as an editable dependency alongside passshore-agent:

pip install -e path/to/passshore-engine/

Requires Python ≥ 3.11. The tools (bandit, radon, ruff) must be available on PATH or in the project's .venv/bin/.

Usage

from passshore_engine.analyzers.industry_analyzer import run_full

result = run_full("/path/to/your/project")
print(f"Quality score: {result['quality_score']}")
print(f"Security issues: {result['summary']['security_issues']}")
print(f"Avg complexity: {result['summary']['avg_complexity']}")

Or use the higher-level ComplianceChecker for the full standards + deep-scanner pipeline:

from passshore_engine import ComplianceChecker
import asyncio

checker = ComplianceChecker()
results = asyncio.run(checker.check_target("http://localhost:8000"))

License

MIT

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

passshore_engine-0.1.0.tar.gz (252.1 kB view details)

Uploaded Source

Built Distribution

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

passshore_engine-0.1.0-py3-none-any.whl (319.8 kB view details)

Uploaded Python 3

File details

Details for the file passshore_engine-0.1.0.tar.gz.

File metadata

  • Download URL: passshore_engine-0.1.0.tar.gz
  • Upload date:
  • Size: 252.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for passshore_engine-0.1.0.tar.gz
Algorithm Hash digest
SHA256 76f6bf80ebfb36062d4dfdcbc96aed929da1dc5702d681bcc69d151e6010be99
MD5 cd8e69828bd54f442871df5b32260b49
BLAKE2b-256 83343535b4671604b82fa8221532e4218bd8f809f68ea2907c731bca2d58a78a

See more details on using hashes here.

File details

Details for the file passshore_engine-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for passshore_engine-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41f915bad0b6d447ce053e599605ea118bfddc4e527b6a9529b04a831e02719e
MD5 384bcbd5a04d52bee5681aaa1aa2eb2d
BLAKE2b-256 4f2ff38c599e0c0c02a266b127f41e215f16b3a077a928f026b0222ddbd1ab42

See more details on using hashes here.

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