vibe-check-cli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vibe_check_cli-0.1.0/.github/workflows/vibecheck.yml +71 -0
- vibe_check_cli-0.1.0/.gitignore +27 -0
- vibe_check_cli-0.1.0/PKG-INFO +71 -0
- vibe_check_cli-0.1.0/README.md +47 -0
- vibe_check_cli-0.1.0/github/.gitkeep +0 -0
- vibe_check_cli-0.1.0/hooks/.gitkeep +0 -0
- vibe_check_cli-0.1.0/hooks/pre-push +20 -0
- vibe_check_cli-0.1.0/pyproject.toml +40 -0
- vibe_check_cli-0.1.0/vibe_check/__init__.py +3 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/__init__.py +3 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/base.py +40 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/compliance.py +443 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/dependencies.py +783 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/hallucination.py +209 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/llm_summarizer.py +188 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/nextjs.py +319 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/prompt_injection.py +275 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/sast.py +290 -0
- vibe_check_cli-0.1.0/vibe_check/analyzers/secrets.py +164 -0
- vibe_check_cli-0.1.0/vibe_check/cli.py +196 -0
- vibe_check_cli-0.1.0/vibe_check/core/__init__.py +4 -0
- vibe_check_cli-0.1.0/vibe_check/core/orchestrator.py +154 -0
- vibe_check_cli-0.1.0/vibe_check/core/report.py +180 -0
- vibe_check_cli-0.1.0/vibe_check/core/scorer.py +99 -0
- vibe_check_cli-0.1.0/vibe_check/models/__init__.py +4 -0
- vibe_check_cli-0.1.0/vibe_check/models/finding.py +96 -0
- vibe_check_cli-0.1.0/vibe_check/models/result.py +129 -0
- vibe_check_cli-0.1.0/vibe_check/prompts/compliance_review.txt +13 -0
- vibe_check_cli-0.1.0/vibe_check/prompts/injection_review.txt +14 -0
- vibe_check_cli-0.1.0/vibe_check/prompts/summary.txt +10 -0
- vibe_check_cli-0.1.0/vibe_check/rules/gdpr.yml +102 -0
- vibe_check_cli-0.1.0/vibe_check/rules/prompt_injection.yml +109 -0
- vibe_check_cli-0.1.0/vibe_check/rules/soc2.yml +90 -0
- vibe_check_cli-0.1.0/vibe_check/rules/vibe_antipatterns.yml +120 -0
- vibe_check_cli-0.1.0/vibe_check/utils/__init__.py +3 -0
- vibe_check_cli-0.1.0/vibe_check/utils/ast_mapper.py +452 -0
- vibe_check_cli-0.1.0/vibe_check/utils/config.py +58 -0
- vibe_check_cli-0.1.0/vibe_check/utils/llm_client.py +234 -0
- vibe_check_cli-0.1.0/vibe_check/utils/registry.py +1 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: VibeCheck PR Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
vibecheck:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.11"
|
|
22
|
+
|
|
23
|
+
- name: Install VibeCheck
|
|
24
|
+
run: pip install vibe-check-cli
|
|
25
|
+
|
|
26
|
+
- name: Run VibeCheck Scan
|
|
27
|
+
env:
|
|
28
|
+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
|
29
|
+
run: vibe-check scan . --format markdown > vibecheck-report.md
|
|
30
|
+
continue-on-error: true
|
|
31
|
+
|
|
32
|
+
- name: Post PR Comment
|
|
33
|
+
uses: actions/github-script@v7
|
|
34
|
+
with:
|
|
35
|
+
script: |
|
|
36
|
+
const fs = require('fs');
|
|
37
|
+
const report = fs.readFileSync('vibecheck-report.md', 'utf8');
|
|
38
|
+
const body = report.length > 65000
|
|
39
|
+
? report.substring(0, 65000) + '\n\n... (truncated)'
|
|
40
|
+
: report;
|
|
41
|
+
|
|
42
|
+
// Find existing VibeCheck comment
|
|
43
|
+
const { data: comments } = await github.rest.issues.listComments({
|
|
44
|
+
owner: context.repo.owner,
|
|
45
|
+
repo: context.repo.repo,
|
|
46
|
+
issue_number: context.issue.number,
|
|
47
|
+
});
|
|
48
|
+
const existing = comments.find(c =>
|
|
49
|
+
c.body.includes('🔍 VibeCheck Report')
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
if (existing) {
|
|
53
|
+
await github.rest.issues.updateComment({
|
|
54
|
+
owner: context.repo.owner,
|
|
55
|
+
repo: context.repo.repo,
|
|
56
|
+
comment_id: existing.id,
|
|
57
|
+
body: body,
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
await github.rest.issues.createComment({
|
|
61
|
+
owner: context.repo.owner,
|
|
62
|
+
repo: context.repo.repo,
|
|
63
|
+
issue_number: context.issue.number,
|
|
64
|
+
body: body,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
- name: Check Score Threshold
|
|
69
|
+
env:
|
|
70
|
+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
|
71
|
+
run: vibe-check score . --exit-code --threshold 60
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
*.egg
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
.eggs/
|
|
9
|
+
|
|
10
|
+
# Environments
|
|
11
|
+
.env
|
|
12
|
+
.venv/
|
|
13
|
+
*.env.local
|
|
14
|
+
|
|
15
|
+
# IDE
|
|
16
|
+
.vscode/
|
|
17
|
+
.idea/
|
|
18
|
+
*.swp
|
|
19
|
+
|
|
20
|
+
# OS
|
|
21
|
+
.DS_Store
|
|
22
|
+
Thumbs.db
|
|
23
|
+
|
|
24
|
+
# vibe-audit runtime
|
|
25
|
+
.vibeaudit.yml
|
|
26
|
+
|
|
27
|
+
/tests
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vibe-check-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: 🎵 Security auditor for vibe-coded repos — 95% deterministic, 25x cheaper than competitors
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
8
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
9
|
+
Requires-Dist: rich>=13.0
|
|
10
|
+
Requires-Dist: typer>=0.9.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
|
|
13
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
14
|
+
Provides-Extra: llm
|
|
15
|
+
Requires-Dist: anthropic>=0.40; extra == 'llm'
|
|
16
|
+
Requires-Dist: google-genai>=1.0.0; extra == 'llm'
|
|
17
|
+
Requires-Dist: openai>=1.0; extra == 'llm'
|
|
18
|
+
Provides-Extra: scanning
|
|
19
|
+
Requires-Dist: bandit>=1.7; extra == 'scanning'
|
|
20
|
+
Requires-Dist: detect-secrets>=1.4; extra == 'scanning'
|
|
21
|
+
Requires-Dist: pip-audit>=2.6; extra == 'scanning'
|
|
22
|
+
Requires-Dist: semgrep>=1.50; extra == 'scanning'
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# 🎵 VibeCheck
|
|
26
|
+
|
|
27
|
+
Security auditor for vibe-coded repos — 95% deterministic, 25x cheaper than competitors.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install vibe-check-cli
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Setup API Keys
|
|
36
|
+
|
|
37
|
+
VibeCheck uses LLMs for intelligent compliance testing and hallucination detection.
|
|
38
|
+
|
|
39
|
+
### Local Development
|
|
40
|
+
|
|
41
|
+
You can simply create a `.env` file in the root of your repository where you run `vibe-check`. VibeCheck will automatically load it.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# .env
|
|
45
|
+
GEMINI_API_KEY="your-api-key-here"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### GitHub Actions (Production / CI / CD)
|
|
49
|
+
|
|
50
|
+
When running VibeCheck in GitHub Actions, pass the API key from your GitHub Repository Secrets as an environment variable to the step.
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
- name: Run VibeCheck Scan
|
|
54
|
+
env:
|
|
55
|
+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
|
56
|
+
run: vibe-check scan .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
Run a full security scan on the current directory:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
vibe-check scan .
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Get a quick score:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
vibe-check score .
|
|
71
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# 🎵 VibeCheck
|
|
2
|
+
|
|
3
|
+
Security auditor for vibe-coded repos — 95% deterministic, 25x cheaper than competitors.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install vibe-check-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup API Keys
|
|
12
|
+
|
|
13
|
+
VibeCheck uses LLMs for intelligent compliance testing and hallucination detection.
|
|
14
|
+
|
|
15
|
+
### Local Development
|
|
16
|
+
|
|
17
|
+
You can simply create a `.env` file in the root of your repository where you run `vibe-check`. VibeCheck will automatically load it.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# .env
|
|
21
|
+
GEMINI_API_KEY="your-api-key-here"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### GitHub Actions (Production / CI / CD)
|
|
25
|
+
|
|
26
|
+
When running VibeCheck in GitHub Actions, pass the API key from your GitHub Repository Secrets as an environment variable to the step.
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
- name: Run VibeCheck Scan
|
|
30
|
+
env:
|
|
31
|
+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
|
32
|
+
run: vibe-check scan .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
Run a full security scan on the current directory:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
vibe-check scan .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Get a quick score:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
vibe-check score .
|
|
47
|
+
```
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# VibeAudit pre-push hook
|
|
3
|
+
# Runs a fast scan and blocks push if critical/high findings exist
|
|
4
|
+
|
|
5
|
+
echo "🎵 Running VibeAudit pre-push check..."
|
|
6
|
+
|
|
7
|
+
vibe-check scan . --mode fast --severity critical,high --exit-code --threshold 60
|
|
8
|
+
|
|
9
|
+
EXIT_CODE=$?
|
|
10
|
+
|
|
11
|
+
if [ $EXIT_CODE -ne 0 ]; then
|
|
12
|
+
echo ""
|
|
13
|
+
echo "❌ Push blocked by VibeAudit — critical/high findings detected."
|
|
14
|
+
echo " Run 'vibe-check scan .' for the full report."
|
|
15
|
+
echo ""
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
echo "✅ VibeAudit passed — push allowed."
|
|
20
|
+
exit 0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "vibe-check-cli"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "🎵 Security auditor for vibe-coded repos — 95% deterministic, 25x cheaper than competitors"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
dependencies = [
|
|
13
|
+
"typer>=0.9.0",
|
|
14
|
+
"rich>=13.0",
|
|
15
|
+
"aiohttp>=3.9.0",
|
|
16
|
+
"python-dotenv>=1.0.0",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.optional-dependencies]
|
|
20
|
+
llm = [
|
|
21
|
+
"google-genai>=1.0.0",
|
|
22
|
+
"openai>=1.0",
|
|
23
|
+
"anthropic>=0.40",
|
|
24
|
+
]
|
|
25
|
+
scanning = [
|
|
26
|
+
"detect-secrets>=1.4",
|
|
27
|
+
"bandit>=1.7",
|
|
28
|
+
"semgrep>=1.50",
|
|
29
|
+
"pip-audit>=2.6",
|
|
30
|
+
]
|
|
31
|
+
dev = [
|
|
32
|
+
"pytest>=7.0",
|
|
33
|
+
"pytest-asyncio>=0.21",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
vibe-check = "vibe_check.cli:app"
|
|
38
|
+
|
|
39
|
+
[tool.hatch.build.targets.wheel]
|
|
40
|
+
packages = ["vibe_check"]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Base analyzer — SHARED contract, frozen at minute 0."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import abc
|
|
6
|
+
from typing import List
|
|
7
|
+
|
|
8
|
+
from vibe_check.models.finding import Finding
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BaseAnalyzer(abc.ABC):
|
|
12
|
+
"""Abstract base class for all vibe-check analyzers."""
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
@abc.abstractmethod
|
|
16
|
+
def name(self) -> str:
|
|
17
|
+
"""Human-readable analyzer name (e.g. 'secrets', 'sast')."""
|
|
18
|
+
...
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
@abc.abstractmethod
|
|
22
|
+
def tier(self) -> int:
|
|
23
|
+
"""Execution tier / layer number (1-5). Lower = runs first conceptually."""
|
|
24
|
+
...
|
|
25
|
+
|
|
26
|
+
@abc.abstractmethod
|
|
27
|
+
async def analyze(self, repo_path: str, config: dict | None = None) -> List[Finding]:
|
|
28
|
+
"""Run analysis on the repo at *repo_path* and return findings.
|
|
29
|
+
|
|
30
|
+
Args:
|
|
31
|
+
repo_path: Absolute path to the repository root.
|
|
32
|
+
config: Optional config dict (from .vibecheck.yml or CLI flags).
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
List of Finding instances.
|
|
36
|
+
"""
|
|
37
|
+
...
|
|
38
|
+
|
|
39
|
+
def __repr__(self) -> str:
|
|
40
|
+
return f"<{self.__class__.__name__} name={self.name!r} tier={self.tier}>"
|