Commit f54d909
feat(security): add property-based fuzzing tests with fast-check (#62)
Add comprehensive fuzzing tests using fast-check library for property-based
testing. This helps discover edge cases and potential security vulnerabilities
in input validation code.
Changes:
- Add validation.fuzz.test.ts with 13 fuzzing tests (~4,650 test runs)
- Install fast-check v4.5.3 as dev dependency
- Integrate fuzzing into existing security test suite
- Update security.yml workflow comment for clarity
Test coverage:
- validateIdentity(): crash resistance, return type, dangerous patterns
- validateIdentities(): large array handling
- isPathSafe(): path traversal, shell metacharacters
- Field-specific: GPG key ID (hex), SSH host (hostname pattern)
🖥️ IDE: [Cursor](https://cursor.sh)
🔌 Extension: [Claude Code](https://claude.ai/download)
Model-Raw: claude-opus-4-5-20251101
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 479ec1c commit f54d909
5 files changed
Lines changed: 486 additions & 3 deletions
File tree
- .github/workflows
- extensions/git-id-switcher
- src/test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
| 275 | + | |
274 | 276 | | |
275 | 277 | | |
276 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
0 commit comments