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.0.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.0.tar.gz.
File metadata
- Download URL: sentinelcodeai-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6afb5a334249d6c752019d2e103882975efa434d3548bcd3892d3791b0b0e781
|
|
| MD5 |
f618942be88a6414d1fefd2fdd9df46b
|
|
| BLAKE2b-256 |
5864c9522a075b863266b9d6e144525ecbd9eef35b8bcac5cc82a76ca5966b25
|
File details
Details for the file sentinelcodeai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sentinelcodeai-0.1.0-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.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
774dd24359c54901cfd63950bf88ffc88d28d8753a50bcd8642acb3f8b6b67e6
|
|
| MD5 |
f4804c1404c9d9cae3a0bd9f220f274c
|
|
| BLAKE2b-256 |
a165164310f9817006673436a634401159f096d2831894f47c3bd2f7f5d8188e
|