Skip to main content

Sentinel - AI-Powered Security Hardening

Sentinel Logo

PyPI version GitHub Actions Docker Image License: GPL v3

Sentinel is a developer-first CLI tool that finds security vulnerabilities in projects (supporting Python, JavaScript/TypeScript, HTML, CSS, and dependencies) and provides AI-powered fixes - all in an interactive terminal dashboard.


Features

  • SAST - detects SQLi, XSS, command injection, hardcoded secrets, insecure crypto, and frontend/HTML vulnerabilities.
  • SCA - checks dependencies against OSV.dev and NVD.
  • DAST - optionally tests running web apps.
  • Multi-Vendor AI enrichment (Mistral, OpenAI, Anthropic, Gemini, Groq, Ollama) - re-evaluates severity, explains attack scenarios, suggests fixes.
  • Interactive TUI - no more grepping JSON logs.
  • Auto-fix - applies safe remediations.
  • CI/CD ready - GitHub Action, Docker, PyPI.

Quick Start

# Install
pip install sentinel-scanner

# Standard offline scan (SAST & SCA)
sentinel scan .

# Interactive AI assistance (prompts for vendor & credentials if needed)
sentinel scan . --ai

# Choose vendor and provide API key directly via CLI
sentinel scan . --ai-vendor openai --ai-api-key sk-proj-...
sentinel scan . --ai-vendor anthropic --ai-api-key sk-ant-...
sentinel scan . --ai-vendor mistral --ai-api-key your-key
sentinel scan . --ai-vendor gemini --ai-api-key your-key
sentinel scan . --ai-vendor groq --ai-api-key gsk_...

# 100% Offline AI via local Ollama
sentinel scan . --ai-vendor ollama --ai-model mistral:7b-instruct

# Or configure via environment variables
export OPENAI_API_KEY=sk-...    # Automatically uses OpenAI
export MISTRAL_API_KEY=your-key # Automatically uses Mistral
sentinel scan .

# Optional custom rate limits or model overrides
sentinel scan . --ai-vendor openai --ai-model gpt-4o --ai-rate-limit 2.0

For full documentation, visit Sentinel Docs.


Vulnerability Detection & Offline Remediations

Sentinel works fully out-of-the-box in offline mode. If no AI API key (Mistral) or local Ollama instance is configured, Sentinel still maps findings directly to established security remediation protocols based on industry standards:

Vulnerability Type CWE Description Standard Remediation Protocol
SQL Injection (SQLi) CWE-89 Concatenating untrusted user inputs directly into SQL query strings. Use parameterized queries (prepared statements) e.g., execute("SELECT * FROM users WHERE id = ?", (user_id,)) or ORMs. Never format/interpolate SQL strings.
Cross-Site Scripting (XSS) CWE-79 Rendering untrusted user inputs in HTML templates or outputs without escaping. Remove dangerous raw render calls (`
Command Injection CWE-78 Executing OS commands via subprocess calls with dynamic strings and shell=True. Disable shell execution (shell=False). Pass command strings as sequences of args e.g., subprocess.run(["ls", "-la"]) to prevent shell parser manipulation.
Hardcoded Secrets CWE-798 Storing passwords, API tokens, keys, and private credentials directly inside source code. Move all configuration and credentials to environment variables loaded via .env (e.g., os.getenv("DB_PASS")). Always add .env to .gitignore.
Insecure Cryptography CWE-326 Utilizing weak or deprecated hashing algorithms (like MD5 or SHA-1) and weak ciphers. Upgrade cryptosystems to strong alternatives (e.g., hashlib.sha256 or hashlib.sha3_256 for hashes, and AES-GCM for symmetric encryption).
Frontend/HTML Vulnerabilities CWE-79 Frontend-specific security risk such as unsafe HTML rendering, reverse tabnabbing, un-sandboxed iframe, or inline scripts/events. Avoid dangerouslySetInnerHTML/v-html/innerHTML without DOMPurify sanitization. Use rel="noopener noreferrer" for target="_blank". Add sandbox to iframe tags. Avoid javascript: URIs, inline scripts, and inline event handlers.
Outdated Dependencies CWE-1395 Importing packages containing known CVEs published in OSV.dev and NVD databases. Pin safe dependencies in lockfiles (poetry.lock, uv.lock, package-lock.json) and run package upgrade managers (e.g. pip install --upgrade).

Distribution & Running

  • PyPI: pip install sentinel-scanner
  • Docker: Run Sentinel in a containerized environment (details in Docker README):
    docker run --rm -v $(pwd):/app ghcr.io/ronaldgosso/sentinel:latest scan .
    
  • GitHub Action: Integrate into your workflows using uses: ronaldgosso/sentinel-action@v1.

GitHub Actions / CI/CD Workflows

Sentinel can be added to any repository to run as an automated GitHub Security Bot. On every Pull Request or push, Sentinel scans the code, posts a rich Markdown report directly to the PR comments, adds a Job Summary in GitHub Actions, and uploads SARIF findings to GitHub Code Scanning.

Quick Setup:

Generate the ready-to-use GitHub Action workflow in your project:

sentinel init --github-action
Workflow File Trigger Description
Sentinel Security Bot sentinel.yml Push/PR Scans repository, outputs Markdown PR comment & Job Summary, and uploads SARIF security alerts
Continuous Integration (CI) ci.yml Push/PR to main Runs tests, Ruff (linting), and Mypy (type checking) to ensure code meets quality standards before merging
Publish to PyPI pypi-publish.yml Push tag v*.*.* Runs quality checks first. If successful, builds wheels and publishes the distribution packages
Build & Publish Docker docker-build.yml Push to main, tags v*, or PyPI success Automates building the optimized multi-stage Python wheel Docker container
Deploy Docs docs.yml Push to main Deploys static files from the website/ folder directly to GitHub Pages

Project Documentation & Useful Guides

Check out these documents to learn more about developing, building, and contributing to Sentinel:

  • Docker Guide - Details on running Sentinel via Docker, passing environment variables (like API keys), and exporting reports.
  • Contributing Guidelines - Guide on repository setup, adding custom SAST/AST detectors, running tests, and the Pull Request/release process.
  • Product Roadmap - Overview of features planned for future releases (v1.1, v1.2, and v2.0).
  • Security Policy - Instructions on how to report security vulnerabilities privately.
  • Code of Conduct - Standards of behavior to ensure a welcoming community.

License

This project is licensed under the GPLv3 license. See the LICENSE file for details.


Show your support

Give a star if this project helped you!


Community & Socials

Spread the word and share your journey with Sentinel using these engaging hashtags across GitHub, Twitter/X, and LinkedIn:

Metadata

Release files for sentinel-scanner 1.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sentinel-scanner 1.0.14
File Size Uploaded
sentinel_scanner-1.0.14.tar.gz 62.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sentinel-scanner 1.0.14
File Interpreter ABI Platform
sentinel_scanner-1.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 124.9 kB

Release files / sentinel_scanner-1.0.14.tar.gz

Download URL sentinel_scanner-1.0.14.tar.gz
Size 62.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d4d8e611fbd4691bed0fc49c3f6e37135fdab2475612a2320f075d18c81fbe1a
BLAKE2b-256 checksum
How to use checksums
b550039d1bbfb23bcd35c4acbebdf2e227db76b78d2dc9262405b3e2f22b737c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / sentinel_scanner-1.0.14-py3-none-any.whl

Download URL sentinel_scanner-1.0.14-py3-none-any.whl
Size 62.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e9d0915f787a7e91556e8c509fb9dc02cc147ebc897c4086d3c99612946db8a
BLAKE2b-256 checksum
How to use checksums
863771e12d503846bacd6f46451e6cc036607a2ae0fc0085839bd4461a4ee7f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.14 This release

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page