Metadata-Version: 2.4
Name: aegis-python-security-scanner
Version: 1.0.0
Summary: A lightweight, local-first Python SAST security scanner
Home-page: https://github.com/am9024048-hue/Aegis-code
Author: Ahmed Mohamed
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Security
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.0.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Aegis Code

A lightweight, local-first Python static application security testing (SAST)
scanner. Aegis analyzes Python source with the built-in AST module and checks
text for likely hardcoded secrets.

## Features

- Detects likely hardcoded API keys and tokens.
- Flags calls to `eval()` and `exec()`.
- Warns about imports of `pickle`, `telnetlib`, and `xmlrpclib`.
- Scans source text in memory or reads a Python file from disk.
- Returns findings as Python objects that can be converted to dictionaries.

## Install

From this directory:

```bash
python -m pip install -e .
```

This installs the `aegis` package and the `aegis` command.
The PyPI distribution name is `aegis-python-security-scanner`; the Python
import name is `aegis`.

## Scan a file

```bash
aegis path/to/file.py
```

## Use the Python API

```python
from aegis import AegisEngine

engine = AegisEngine()
findings = engine.scan_code("result = eval(user_input)", file_path="example.py")

for finding in findings:
    print(finding.to_dict())
```

`scan_file()` scans a path on disk. `scan_code()` scans a string in memory.
Findings expose `file_path`, `line`, `severity`, `category`, and `description`.

## Run tests

```bash
PYTHONPATH=src python -m unittest discover -s tests
```

## License

MIT. See `LICENSE`.
