Metadata-Version: 2.4
Name: nyx-security-scanner
Version: 1.0.1
Summary: Multi-language security scanner for Python, JavaScript, C/C++, Dockerfiles, Terraform, Kubernetes, and more
Home-page: https://pypi.org/project/nyx-security-scanner/
Author: NyxWarden
License: MIT
Keywords: security,scanner,sast,vulnerability,python,javascript,terraform,kubernetes,docker
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bandit>=1.7.0
Provides-Extra: pdf
Requires-Dist: reportlab>=3.6.0; extra == "pdf"
Provides-Extra: git
Requires-Dist: gitpython>=3.1.0; extra == "git"
Provides-Extra: full
Requires-Dist: reportlab>=3.6.0; extra == "full"
Requires-Dist: gitpython>=3.1.0; extra == "full"
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Nyx Security Scanner

**Free, open-source security scanner for your code.** Find vulnerabilities before they reach production.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![PyPI version](https://badge.fury.io/py/nyx-security-scanner.svg)](https://pypi.org/project/nyx-security-scanner/)

## Installation

### Option 1: pip install (Recommended)

```bash
pip install nyx-security-scanner
```

Then use from anywhere:
```bash
nyx --help
nyx /path/to/project
nyx . --pdf
```

### Option 2: pip install with extras

```bash
# With PDF report support
pip install nyx-security-scanner[pdf]

# With git history scanning
pip install nyx-security-scanner[git]

# Full installation (all features)
pip install nyx-security-scanner[full]
```

### Option 3: Install from source

```bash
pip install -e .
```

## Features

🔍 **Multi-Language SAST**
- Python (via Bandit)
- JavaScript / TypeScript
- C / C++

🐳 **Container & IaC Security**
- Dockerfiles
- Terraform
- Kubernetes manifests
- ARM templates (Azure)
- CloudFormation (AWS)

🔑 **Secret Detection**
- Hardcoded passwords & API keys
- AWS, GitHub, OpenAI, Slack tokens
- Git history scanning (finds deleted secrets!)

📦 **Dependency Scanning**
- Python (pip-audit)
- Node.js (npm audit)
- OWASP Dependency-Check (optional)

📊 **Reports**
- PDF reports for stakeholders
- SARIF for CI/CD (GitHub Actions, Azure DevOps)
- JSON for automation
- HTML for quick review

💡 **Auto-Fix Suggestions**
- Every finding includes remediation guidance

## Quick Start

```bash
# Scan current directory
nyx .

# Scan a specific project
nyx /path/to/project

# Generate PDF report
nyx /path/to/project --pdf

# Scan with all features
nyx /path/to/project --pdf --git-history --sarif

# Show help
nyx --help
```

## Usage

```
nyx <path> [options]

Options:
    --help, -h          Show help message
    --pdf               Generate PDF report
    --sarif             Output SARIF for CI/CD
    --json              Output JSON
    --html              Generate HTML report
    --git-history       Scan git history for leaked secrets
    --baseline          Create baseline to ignore false positives
    --skip-owasp        Skip OWASP Dependency-Check

Examples:
    nyx .                              # Scan current directory
    nyx /path/to/project --pdf         # Scan with PDF report
    nyx https://github.com/user/repo   # Clone and scan GitHub repo
    nyx project.zip                    # Extract and scan ZIP file
```

## What It Finds

| Category | Examples |
|----------|----------|
| **Injection** | SQL injection, command injection, XSS |
| **Secrets** | Hardcoded passwords, API keys, tokens |
| **Crypto** | Weak hashing (MD5, SHA1), insecure random |
| **Config** | Debug mode, open CORS, public S3 buckets |
| **Container** | Privileged containers, root user, no healthcheck |
| **Dependencies** | Known CVEs in packages |

## Baseline (Ignore False Positives)

Create `.nyx-baseline.json` in your project:

```json
{
  "ignored": [
    {"file": "app.py", "line": 42, "rule": "B608", "reason": "SQL uses constants only"},
    {"file": "tests/", "reason": "Test files excluded"}
  ]
}
```

## CI/CD Integration

### GitHub Actions

```yaml
- name: Run Nyx Security Scan
  run: nyx . --sarif

- name: Upload SARIF
  uses: github/codeql-action/upload-sarif@v2
  with:
    sarif_file: security_report.sarif
```

### Azure DevOps

```yaml
- script: nyx . --sarif
  displayName: 'Security Scan'

- task: PublishBuildArtifacts@1
  inputs:
    pathtoPublish: 'security_report.sarif'
```

## Requirements

**Required:**
- Python 3.7+

**Optional (enhanced features):**
- `pip install nyx-security-scanner[pdf]` - PDF reports
- `pip install nyx-security-scanner[git]` - Git history scanning
- [cppcheck](https://cppcheck.sourceforge.io/) - Enhanced C/C++ scanning
- [OWASP Dependency-Check](https://owasp.org/www-project-dependency-check/) - More dependency CVEs

## License

MIT License - Free for personal and commercial use.

## Contributing

Issues and PRs welcome! See [CONTRIBUTING.md](CONTRIBUTING.md)

---

Made with 🌙 by NyxWarden
