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.2.tar.gz
(11.9 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.2.tar.gz.
File metadata
- Download URL: sentinelcodeai-0.1.2.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00fba46298b1036a949c33ed63fae1a82d3e4b493e57d37d040eb3a41dbc1d36
|
|
| MD5 |
cdf66302250447301d1c0c670e1f4691
|
|
| BLAKE2b-256 |
598ea2b714fb40acc547c274641ba2cf00093b8ac3fb614d7b33a133ddc72275
|
File details
Details for the file sentinelcodeai-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sentinelcodeai-0.1.2-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 |
09105daa0a71f25a4336fd0b304088780b02d1717ff02357743da9bfa1244316
|
|
| MD5 |
d52442fa7e7f97467f78e4bd7a223916
|
|
| BLAKE2b-256 |
a435cc8f139c6062e06cb30a8090eac7e5ab170250e15d272a8b64874ffa5ba0
|