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.1.tar.gz
(11.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sentinelcodeai-0.1.1.tar.gz.
File metadata
- Download URL: sentinelcodeai-0.1.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9812a6471bdfaac6960d85a5678fdec9fd04bd8af9b9056278f9d7bdfbc62d07
|
|
| MD5 |
1c9c637630578699afbb97e088e9be4b
|
|
| BLAKE2b-256 |
35c050330e590225d64ab61db09f0038557adbd40013a414068b13288e2dcbbd
|
File details
Details for the file sentinelcodeai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sentinelcodeai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fe5e96c3f183679c70c0d5a077cc28ee817306050518465c16f263e86c03466
|
|
| MD5 |
dbabba8d9b4ed8d5cd141f80e9d63c10
|
|
| BLAKE2b-256 |
f96e751bffdf961cc2a9b0619750654595501ae99dc11c0b9f0a8ca23b5bb3c0
|