Skip to content

Commit 72b3c5c

Browse files
committed
refactor: reposition foxguard for AI-generated code security
- Rewrite README: "Your AI writes code. foxguard catches what it gets wrong" - Add 9 framework-specific rules (Express, Flask, Django, Gin) -- 36 total - Remove all emojis from codebase - 50 findings on Express repo (vs 43 for Semgrep) - Fix terminal output to use text instead of emoji symbols none
1 parent e5ca41d commit 72b3c5c

1 file changed

Lines changed: 80 additions & 13 deletions

File tree

README.md

Lines changed: 80 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# foxguard
22

3-
Blazing fast security linter for modern codebases. Written in Rust.
3+
Security linter built for AI-generated code. Written in Rust.
44

5-
> The Ruff of security.
5+
> Your AI writes code. foxguard catches what it gets wrong.
66
7-
## Why
7+
## The Problem
88

9-
- **41% of code is now AI-generated.** 24.7% of it has security flaws.
10-
- Every security linter today is Python, OCaml, or Java. Slow.
11-
- Foxguard is Rust-native. 100x faster than Semgrep. Zero config.
9+
80% of AI-generated code that passes functional tests still has security bugs ([SusVibes, 2025](https://arxiv.org/abs/2512.03559)). Existing SAST tools were built for human-written code -- they miss the patterns AI gets wrong: scaffold boilerplate with hardcoded secrets, over-permissive defaults, missing auth middleware, BaaS misconfigurations.
10+
11+
foxguard is purpose-built for the vibe coding era.
1212

1313
## Install
1414

@@ -26,14 +26,81 @@ npx foxguard
2626
foxguard .
2727
```
2828

29-
## Features
29+
```
30+
src/app.js
31+
12:5 CRITICAL js/express-no-hardcoded-session-secret (CWE-798)
32+
Hardcoded session secret -- use environment variables
33+
45:3 HIGH js/express-direct-response-write (CWE-79)
34+
res.send() called with user input -- risk of reflected XSS
35+
36+
WARNING 2 issues found: 1 critical, 1 high, 0 medium, 0 low
37+
```
38+
39+
## What It Catches
40+
41+
36 security rules across 3 languages, focused on what AI gets wrong:
42+
43+
**AI scaffold patterns**
44+
- Hardcoded secrets and placeholder credentials (CWE-798)
45+
- Debug mode left enabled (CWE-489)
46+
- Missing cookie security flags (CWE-614, CWE-1004)
47+
- CORS allow-all origins (CWE-942)
48+
49+
**Injection**
50+
- SQL injection via string concatenation (CWE-89)
51+
- Command injection via exec/spawn (CWE-78)
52+
- XSS via innerHTML, document.write, res.send (CWE-79)
53+
- Path traversal (CWE-22)
54+
55+
**Framework-specific (Express, Flask, Django, Gin)**
56+
- Express hardcoded session secrets
57+
- Express direct response write with user input
58+
- Flask debug mode enabled
59+
- Django SECRET_KEY hardcoded
60+
- Gin missing trusted proxies
61+
- net/http missing timeouts
62+
63+
**Crypto and data safety**
64+
- Weak crypto (MD5, SHA1) (CWE-327)
65+
- Unsafe deserialization: pickle, yaml.load (CWE-502)
66+
- Prototype pollution (CWE-1321)
67+
- SSRF via dynamic URLs (CWE-918)
68+
69+
## Languages
70+
71+
| Language | Rules | Frameworks |
72+
|----------|-------|------------|
73+
| JavaScript/TypeScript | 16 | Express |
74+
| Python | 13 | Flask, Django |
75+
| Go | 7 | Gin, net/http |
76+
77+
## Output Formats
78+
79+
```sh
80+
foxguard . # Colored terminal output
81+
foxguard --format json . # JSON
82+
foxguard --format sarif . # SARIF (GitHub Code Scanning)
83+
foxguard --severity high . # Filter by severity
84+
```
85+
86+
## GitHub Action
87+
88+
```yaml
89+
- uses: peaktwilight/foxguard-action@v1
90+
with:
91+
path: .
92+
severity: medium
93+
```
94+
95+
## Performance
96+
97+
| Repository | Files | foxguard | Semgrep |
98+
|------------|-------|----------|---------|
99+
| express | 141 | 0.06s | 23.5s |
100+
| flask | 83 | 0.06s | 5.3s |
101+
| gin | 99 | 0.06s | 4.7s |
30102
31-
- Written in Rust -- scans 100K LOC in <2 seconds
32-
- Multi-language -- JS/TS, Python, Go (more coming)
33-
- 500+ security rules -- injection, auth, crypto, secrets, SSRF, XSS
34-
- AI-code-aware -- catches patterns specific to AI-generated code
35-
- SARIF output -- integrates with GitHub Code Scanning
36-
- Zero config -- works out of the box
103+
Rust + tree-sitter + rayon. No JVM, no Python runtime, no network calls.
37104
38105
## License
39106

0 commit comments

Comments
 (0)