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.31.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.31-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hermes_review_sentinel-2.0.31.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.31.tar.gz
Algorithm Hash digest
SHA256 2c08f4f36dbfcf42b6e40ce1209b810f39564cfcd15bb6186e31636665f098d4
MD5 c9620f2490603b6f0b2c924c4e013ce9
BLAKE2b-256 be7b9fed6ed7792dfa214a1aab46e5db90b7276ae4b5b42b4b6f3f5c3f267a00

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_review_sentinel-2.0.31.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.31-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_review_sentinel-2.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 1295da4c4ecb160e3764d7e4a828452198e0961e5fe2b1e269faf6019c22fc2c
MD5 e60fed332e1ce950e7d951c9ca76ef56
BLAKE2b-256 df1c6c865ce1dd1575a4457f04f855a8b8011a1f44491637ad35827df9a6364a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hermes_review_sentinel-2.0.31-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