Skip to main content

hermes-review-sentinel โ€” Security Pair Programmer (SPP)

A deterministic + AI security scanner with auto-fix and contextual learning for Python/TypeScript projects. Runs 100% locally, zero cloud dependencies.

Quick Start

# Install
pip install hermes-review-sentinel

# Or run via Docker
docker run --rm -v $(pwd):/workspace jhoxgamer/hermes-review-sentinel:latest . --auto-fix --auto-improve

# Scan + auto-fix secrets + apply contextual improvements
hermes-sentinel . --auto-fix --auto-improve

# Just scan (report only)
hermes-sentinel .

What It Does

Feature Description
Auto-Fix Secrets Detects hardcoded secrets (Stripe, GitHub, OpenAI, Slack, generic) and replaces with os.getenv() / process.env, updates .env.example
Security Pair Programmer (SPP) Learns your project's patterns (auth decorators, CSRF handling, env var style) and suggests/applies improvements
Zero Loss Mutation AST-based edits preserve indentation, comments, quotes, formatting
Line Drift Prevention Reverse-order editing prevents index corruption on multi-edit files
100% Local / Offline Zero cloud calls, runs fully offline with Ollama/local models
Contextual Detection Next.js/TS detection restricted to app/api/, pages/api/, actions/, "use server"
Performance Filters Skips node_modules, venv, .git, files >1MB

CLI Usage

# Scan only (report mode)
hermes-sentinel .

# Auto-fix hardcoded secrets
hermes-sentinel . --auto-fix

# Apply contextual improvements (SPP)
hermes-sentinel . --auto-improve

# Both together
hermes-sentinel . --auto-fix --auto-improve

# Target specific file
hermes-sentinel src/auth.py --auto-fix

Example Output

๐Ÿ” [Hermes Sentinel] Escaneando 35 arquivo(s)...
โœ… [AUTO-FIX] src/auth.py: 2 segredo(s) removido(s) โ†’ os.getenv() aplicado.
   โ””โ”€ Variรกveis adicionadas ao .env.example: STRIPE_SECRET_KEY, JWT_SECRET
๐Ÿ’ก [SPP] src/routes/admin.py:12
   ๐Ÿ’ก Rota sem autenticaรงรฃo detectada. Padrรฃo do projeto: `@depends(get_current_user)`.
โœจ [SPP] Melhorias aplicadas com sucesso em src/routes/admin.py

๐Ÿ“Š [Resumo]
   Arquivos com issues: 2
   Secrets corrigidos: 2
   Melhorias SPP aplicadas: 1

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Source Code   โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  AST Parser      โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  Security       โ”‚
โ”‚   (Python/TS)   โ”‚     โ”‚  (ast.parse)     โ”‚     โ”‚  Pair Programmerโ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                          โ”‚
                                               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                               โ”‚  Auto-Fix Engine  โ”‚
                                               โ”‚  (Zero Loss)      โ”‚
                                               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Rules & Patterns

Category Patterns
Stripe
GitHub ghp_*, gho_*
OpenAI sk-* (51 chars)
Slack xoxb-*, xoxp-*
Generic secret_key, api_key, password, token, jwt_secret

Configuration

  • rules/python-security.yaml โ€” P0/P1 security rules for Python/FastAPI
  • rules/typescript-security.yaml โ€” P0/P1 security rules for TypeScript/Next.js
  • rules/python-quality.yaml โ€” Clean code / best practices for Python
  • rules/typescript-quality.yaml โ€” Clean code / best practices for TypeScript

Installation

# From PyPI (when published)
pip install hermes-review-sentinel

# From source
git clone https://github.com/jhoxgamer/hermes-review-sentinel.git
cd hermes-review-sentinel
pip install -e .

# Docker
docker build -t hermes-review-sentinel .
docker run --rm -v $(pwd):/workspace hermes-review-sentinel . --auto-fix --auto-improve

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Run CLI directly
python -m src.sentinel_server . --auto-fix --auto-improve

# Validate rules
semgrep scan --config=rules/ --test

Security

  • 100% Local Execution โ€” No code leaves your machine
  • No Telemetry โ€” Zero tracking, zero cloud calls
  • Fail-Safe โ€” Invalid edits are rolled back automatically

License

MIT โ€” Free for personal and commercial use.

Download files

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

Source Distribution

hermes_review_sentinel-2.0.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

hermes_review_sentinel-2.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file hermes_review_sentinel-2.0.0.tar.gz.

File metadata

  • Download URL: hermes_review_sentinel-2.0.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hermes_review_sentinel-2.0.0.tar.gz
Algorithm Hash digest
SHA256 cf36058ef2570256c35985386577069fae01ab689967731bff7eb0a5e9d01631
MD5 e155aedb46cd82cbb319fca0c623003c
BLAKE2b-256 5953d885b0748ec242f2b3d43aa3e96925533e992ceb7555b5308ea92424eddd

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_review_sentinel-2.0.0.tar.gz:

Publisher: ci.yml on jhoxgamer/hermes-review-sentinel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hermes_review_sentinel-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_review_sentinel-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5055f821e5ab8524bd99ea8b966cce719a4f1ea52d7a8424e019ebe9f8d928c5
MD5 a2a0d1ca3d1167129d1d062370cf14b1
BLAKE2b-256 8c30ded406fd8d366edbbfad366e1d276eadf7a291abb7f5547bd81275998634

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_review_sentinel-2.0.0-py3-none-any.whl:

Publisher: ci.yml on jhoxgamer/hermes-review-sentinel

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