Metadata-Version: 2.4
Name: sentinelcodeai
Version: 0.1.1
Summary: Pre-commit security scanner — detects secrets and memory leaks before git commit.
Home-page: https://github.com/Yuva-Deekshitha-N/sentinelcodeai.git
Author: CodeSentinel
Author-email: yuvadeekshithanamani@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: rich
Requires-Dist: pycparser>=2.21
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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)
```bash
pip install -e .
```

### Option B — clone without pip
```bash
pip install -r requirements.txt
python install_hook.py
```

## Scan manually (file or folder)

```bash
# 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

```bash
pytest tests/
```
