Metadata-Version: 2.1
Name: cybereiche-vibesec
Version: 0.1.1
Summary: Autonomous AI & Application Security Platform: SAST, Secrets, Polyglot SCA, and Verified Auto-Remediation
Author-email: CyberEiche <contact@cybereiche.de>
License: Apache-2.0
Project-URL: Homepage, https://cybereiche.de
Project-URL: Documentation, https://github.com/cybereiche/vibesec#readme
Project-URL: Repository, https://github.com/cybereiche/vibesec
Project-URL: Issues, https://github.com/cybereiche/vibesec/issues
Keywords: security,sast,sca,secrets,ai-guardrails,owasp,prompt-injection,remediation,devsecops
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Security
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12.0
Requires-Dist: rich>=13.0.0
Requires-Dist: pydantic>=2.5.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: detect-secrets>=1.4.0
Provides-Extra: remediation
Requires-Dist: litellm>=1.40.0; extra == "remediation"
Requires-Dist: whatthepatch>=1.0.5; extra == "remediation"
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.0; extra == "mcp"
Provides-Extra: full
Requires-Dist: litellm>=1.40.0; extra == "full"
Requires-Dist: whatthepatch>=1.0.5; extra == "full"
Requires-Dist: mcp>=1.0.0; extra == "full"
Requires-Dist: weasyprint>=60.0; extra == "full"
Requires-Dist: cryptography>=42.0.0; extra == "full"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: ruff>=0.4.0; extra == "dev"

# VibeSec 🛡️

> **Autonomous AI & Application Security Platform: SAST, Secrets, Polyglot SCA, and Verified Auto-Remediation — engineered by [CyberEiche](https://cybereiche.de) under the CyberEiche security ecosystem alongside [cybereiche-mcp-sec](https://pypi.org/project/cybereiche-mcp-sec/).**

[![Tests](https://img.shields.io/badge/tests-31%20passed-brightgreen.svg)](tests/)
[![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)](pyproject.toml)
[![Target Truth](https://img.shields.io/badge/Target%20Truth-Verified%20Active-success.svg)](#target-truth-validation)
[![CyberEiche](https://img.shields.io/badge/Built%20by-CyberEiche.de-darkgreen.svg)](https://cybereiche.de)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

VibeSec is a privacy-first, developer-friendly security scanner designed to catch vulnerabilities, hardcoded secrets, dependency CVEs, and AI/LLM safety risks (OWASP Top 10 for LLMs) before code reaches production.

---

## Key Features

* **Target Truth Validation**: Reachability-driven active verification layer (DNS → TCP → HTTP) ensuring zero-noise and confirmed endpoint reachability.
* **AI & LLM Security Rules**: Specialized AST patterns detecting prompt injection, agent shell execution, insecure deserialization, and unvalidated LLM outputs.
* **Unified Scanning Triad**:
  * **SAST**: Multi-language static analysis powered by Semgrep and custom security rulesets.
  * **Secrets**: High-entropy credential and API token detection (Gitleaks & Yelp `detect-secrets`).
  * **Polyglot SCA**: Zero-runtime lockfile scanning powered by Google OSV (`osv.dev`) across Python, JavaScript/TypeScript, Go, Rust, Java, PHP, Ruby, and .NET.
* **100% Code Privacy & Data Sovereignty**: Scans run entirely on your local machine or your GitHub Actions runner. Your source code never leaves your infrastructure.
* **Zero-Setup GitHub Actions**: Native PR annotations (`::error::`), formatted `$GITHUB_STEP_SUMMARY` audit reports, and OASIS SARIF v2.1.0 output for the GitHub Security tab without needing third-party bot tokens.
* **Autonomous Verified Remediation**: Synthesizes localized patch diffs and verifies them against syntax checks and automated test suites before suggesting changes.

---

## Quickstart

### Installation

```bash
pip install cybereiche-vibesec
```

### CLI Usage

```bash
# Run a full security scan on current directory
vibesec scan .

# Scan with high-severity threshold and SARIF output
vibesec scan . --severity HIGH --sarif vibesec-results.sarif

# Preview automatic fixes for detected issues (dry-run)
vibesec fix . --dry-run

# Apply verified fixes in-place
vibesec fix . --apply
```

---

## Autonomous Remediation & LLM Configuration

VibeSec synthesizes localized security patches and verifies them against AST syntax checks and your local test suite before applying changes. Powered by LiteLLM, it supports Anthropic, OpenAI, DeepSeek, and self-hosted models.

### 1. Configure via `.env`
Add your preferred provider credentials to `.env`:

```bash
# 1. Anthropic (Claude - Default)
ANTHROPIC_API_KEY="sk-ant-..."

# 2. OpenAI (GPT-4o)
OPENAI_API_KEY="sk-proj-..."

# 3. DeepSeek
DEEPSEEK_API_KEY="sk-..."

# Optional: Custom/Local Gateway (Ollama, vLLM, internal proxy)
# VIBESEC_LLM_MODEL="ollama/llama3"
# VIBESEC_LLM_API_BASE="http://localhost:11434/v1"
```

### 2. Configure via `.vibesec.yaml` (Optional)
```yaml
remediation:
  enabled: true
  model: "claude-3-5-sonnet-20241022" # or gpt-4o, deepseek/deepseek-chat
```

### 3. CLI Overrides
```bash
# Apply fixes only if local unit tests (pytest / npm test) pass
vibesec fix . --apply --run-tests

# Override model at runtime
vibesec fix . --model gpt-4o --apply
```

---

## GitHub Actions Integration

Add VibeSec to your repository with 4 lines in `.github/workflows/security.yml`:

```yaml
name: VibeSec Security & AI Guardrails

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  security-audit:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Run VibeSec Security Audit
        uses: cybereiche/vibesec@v1
        with:
          severity: HIGH
          sarif_output: vibesec-results.sarif

      - name: Upload SARIF to GitHub Security Tab
        if: always()
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: vibesec-results.sarif
```

---

## Configuration (`.vibesec.yaml`)

Customize VibeSec behavior by adding a `.vibesec.yaml` file to your project root:

```yaml
version: 1

settings:
  severity_threshold: "HIGH" # LOW | MEDIUM | HIGH | CRITICAL
  fail_on_findings: true

scanners:
  sast:
    enabled: true
  secrets:
    enabled: true
  sca:
    enabled: true

ignore:
  paths:
    - "tests/**"
    - "docs/**"
    - "node_modules/**"
```

---

## Target Truth Validation

VibeSec incorporates CyberEiche's **Target Truth** active verification methodology. Live probes and findings undergo reachability validation across DNS resolution, TCP socket connection, and HTTP response states, ensuring actionable security findings with zero false positives.

---

## License

VibeSec is distributed under the [Apache 2.0 License](LICENSE).  
Developed and maintained by [CyberEiche](https://cybereiche.de).

---

## About CyberEiche

**CyberEiche** is an enterprise cybersecurity firm specializing in autonomous AI defense, application security, and protocol verification.
- **Website**: [cybereiche.de](https://cybereiche.de)
- **Contact**: [contact@cybereiche.de](mailto:contact@cybereiche.de)

