Skip to main content

Pre-commit security scanner — detects secrets and memory leaks before git commit.

Project description

SentinelCodeAI

Static analysis tool that detects secrets, memory leaks, and sensitive context in any language — with automatic Git pre-commit hook integration.

Structure

src/core/secrets.py           # Regex-based secret detection (11 patterns)
src/core/leaks.py             # AST-based memory leak detection
src/ai/nlp.py                 # NLP keyword context analysis
src/git_hooks/pre_commit.py   # Git pre-commit hook logic
src/scanner.py                # Shared scan + display engine
src/cli.py                    # CLI entry point
install_hook.py               # One-time hook installer

Setup

Option A — pip install (hook auto-installs)

pip install -e .

Option B — clone without pip

pip install -r requirements.txt
python install_hook.py

Scan manually (file or folder)

# scan a single file
sentinel --path path/to/file.py

# scan an entire folder
sentinel --path path/to/folder/

# without pip install
python -m src.cli --path path/to/file_or_folder

How the pre-commit hook works

Once installed, every git commit is automatically intercepted:

git commit -m "my changes"
      |
      v
SentinelCodeAI scans all staged files
      |
      v
HIGH risk found  --> commit BLOCKED + report shown
All clean        --> commit goes through

Run Tests

pytest tests/

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

sentinelcodeai-0.1.3.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

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

sentinelcodeai-0.1.3-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file sentinelcodeai-0.1.3.tar.gz.

File metadata

  • Download URL: sentinelcodeai-0.1.3.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for sentinelcodeai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a39995c9e4931675a7c57a283cf7ee1e5f39c5ccf726c3321afe8d0d4acbb002
MD5 764d8c38f0d24c5ba7de74d6080806a0
BLAKE2b-256 efa9431a5c4b48af183da3178e6872228b366e85e1f269b69f113ce1f41c9437

See more details on using hashes here.

File details

Details for the file sentinelcodeai-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sentinelcodeai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for sentinelcodeai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1447f5a6997aa65992d21b5e44dd7fe94c4aef77920613dfe254e7125d0f29c4
MD5 226712268b8c753cf0936774ba87b1c6
BLAKE2b-256 ea963e1cee2c6fb915df0ad3203f06c71d1ed8406464035a4bddc5479ba46efd

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