How inditextech/cerbia works
CerbIA is a configurable security-gate toolkit for AI-agent inputs and outputs. The main workflow accepts text or files through the CLI or configured loaders, applies optional preprocessing, runs scanners, aggregates risk into a verdict, and presents or exports scan results. The graph preserves the documented component stages and optional integrations. Most core wiring is documented in the README and visible in the sampled runner and gate; unsampled scanner and loader implementations are represented by their exact source directories.
Main entry points: runner.py Pipeline runner · scan/_command.py Scan command · base.py Scanner interface · validate/_command.py Validate command
Components 22
CLI
- Scan command
packages/cerbia-cli/src/cerbia/cli/scan/_command.py - Validate command
packages/cerbia-cli/src/cerbia/cli/validate/_command.py - YAML config
packages/cerbia-cli/src/cerbia/cli/config.py - Result output
packages/cerbia-cli/src/cerbia/cli/scan/_ui.py - JSON output
packages/cerbia-cli/src/cerbia/cli/scan/_data.py
Gate pipeline
- Gate configuration
packages/cerbia-core/src/cerbia/core/config.py - Pipeline runner
packages/cerbia-core/src/cerbia/core/runner.py - Input loaders
packages/cerbia-core/src/cerbia/core/loaders - Preprocessors
packages/cerbia-core/src/cerbia/core/preprocessors - Speculative decoding
packages/cerbia-core/src/cerbia/core/preprocessors/speculative_decoding/_engine.py - Component factories
packages/cerbia-core/src/cerbia/core/factories/base.py - Security gate
packages/cerbia-core/src/cerbia/core/security_gate/_gate.py - Score aggregators
packages/cerbia-core/src/cerbia/core/score_aggregators - Scan results
packages/cerbia-core/src/cerbia/core/models/results.py
Detection
- Scanner interface
packages/cerbia-core/src/cerbia/core/scanners/base.py - Built-in scanners
packages/cerbia-core/src/cerbia/core/scanners - URL registry
packages/cerbia-core/src/cerbia/core/registries/url
Optional integrations
- Hugging Face classifier
packages/cerbia-ml/src/cerbia/ml/adapters/classifiers/huggingface_classifier/_classifier.py - Model artifacts
packages/cerbia-ml/src/cerbia/ml/artifacts/huggingface_hub.py - Presidio PII scanner
packages/cerbia-presidio/src/cerbia/presidio/scanners/pii.py - ProtectAI scanner
packages/cerbia-protectai/src/cerbia/protectai/scanners/prompt_injection/_scanner.py
Other components
- CLI user
Connections 24
- CLI user → Scan command: runs scan
README.md - CLI user → Validate command: validates config
README.md - Scan command → YAML config: loads YAML
packages/cerbia-cli/src/cerbia/cli/scan/_command.py - Validate command → YAML config: loads YAML
packages/cerbia-cli/src/cerbia/cli/validate/_command.py - YAML config → Gate configuration: validates config
packages/cerbia-cli/src/cerbia/cli/config.py - Scan command → Pipeline runner: runs pipeline
packages/cerbia-cli/src/cerbia/cli/scan/_command.py - Validate command → Pipeline runner: checks configuration
packages/cerbia-cli/src/cerbia/cli/validate/_command.py - Gate configuration → Pipeline runner: configures
packages/cerbia-core/src/cerbia/core/runner.py - Pipeline runner → Component factories: builds components
packages/cerbia-core/src/cerbia/core/runner.py - Pipeline runner → Input loaders: loads entries
packages/cerbia-core/src/cerbia/core/runner.py - Pipeline runner → Preprocessors: processes entries
packages/cerbia-core/src/cerbia/core/runner.py - Speculative decoding → Preprocessors: implements preprocessing
packages/cerbia-core/src/cerbia/core/preprocessors/speculative_decoding/_engine.py - Pipeline runner → Security gate: scans entries
packages/cerbia-core/src/cerbia/core/runner.py - Security gate → Scanner interface: dispatches scanners
packages/cerbia-core/src/cerbia/core/security_gate/_gate.py - Security gate → Score aggregators: aggregates risk
packages/cerbia-core/src/cerbia/core/security_gate/_gate.py - Pipeline runner → Scan results: returns results
packages/cerbia-core/src/cerbia/core/runner.py - Scan command → Result output: renders results
packages/cerbia-cli/src/cerbia/cli/scan/_command.py - Scan command → JSON output: writes JSON
packages/cerbia-cli/src/cerbia/cli/scan/_command.py - Scanner interface → Built-in scanners: implemented by
README.md - Component factories → URL registry: configures URL scanning
- Scanner interface → Presidio PII scanner: optional scanner
README.md - Scanner interface → ProtectAI scanner: optional scanner
README.md - ProtectAI scanner → Hugging Face classifier: classifies with
packages/cerbia-protectai/src/cerbia/protectai/scanners/prompt_injection/_scanner.py - Hugging Face classifier → Model artifacts: uses model artifacts