guardvibe 2.4.1 → 2.4.3

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,228 @@
1
+ # Changelog
2
+
3
+ All notable changes to GuardVibe are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.4.3] - 2026-04-04
9
+
10
+ ### Added
11
+ - ESLint with typescript-eslint for static analysis (eslint.config.js)
12
+ - `npm run lint` script for code quality checks
13
+ - `npm audit` step in CI/CD pipelines
14
+ - Dependabot configuration for automated dependency updates
15
+ - `.gitattributes` for consistent line endings
16
+ - `main` field in package.json for maximum compatibility
17
+ - `funding` field in package.json
18
+
19
+ ### Changed
20
+ - CI workflow now runs lint and security audit before tests
21
+ - Publish workflow now runs lint and security audit before publish
22
+ - Cleaned up unused imports and variables across codebase
23
+
24
+ ## [2.4.1] - 2026-04-04
25
+
26
+ ### Added
27
+ - VG910: Hono SSE injection detection via `streamSSE()` (CVE-2026-29085)
28
+ - VG911: Kubernetes Secret hardcoded value detection
29
+ - VG912: MongoDB NoSQL injection via query operators
30
+
31
+ ## [2.4.0] - 2026-04-04
32
+
33
+ ### Added
34
+ - Buddy format (`--format buddy`) — compact ASCII character with mood-based security feedback
35
+ - 5 face expressions based on security grade (A through F)
36
+ - Grade-aware contextual message pool
37
+
38
+ ### Changed
39
+ - Claude Code hook now uses buddy format by default for real-time visual feedback
40
+
41
+ ## [2.3.9] - 2026-04-03
42
+
43
+ ### Added
44
+ - 6 new supply chain rules (VG860-868)
45
+ - Yarn and pnpm lockfile support
46
+ - Advanced typosquat detection
47
+
48
+ ## [2.3.8] - 2026-04-03
49
+
50
+ ### Changed
51
+ - Capitalize extension name to GuardVibe in Gemini CLI gallery
52
+
53
+ ## [2.3.7] - 2026-04-02
54
+
55
+ ### Added
56
+ - Gemini CLI extensions gallery support (gemini-extension.json)
57
+
58
+ ## [2.3.6] - 2026-04-02
59
+
60
+ ### Added
61
+ - Platform-specific setup guides for all 6 IDEs in README
62
+
63
+ ## [2.3.5] - 2026-04-01
64
+
65
+ ### Fixed
66
+ - Correct rule count: 322 → 307 (actual), update all module counts in README
67
+
68
+ ## [2.3.4] - 2026-04-01
69
+
70
+ ### Fixed
71
+ - Suppress false positives in generate-policy template strings
72
+
73
+ ## [2.3.3] - 2026-04-01
74
+
75
+ ### Changed
76
+ - README: add self-scan dogfooding section, update stats to 322 rules / 25 tools
77
+
78
+ ## [2.3.2] - 2026-04-01
79
+
80
+ ### Fixed
81
+ - Fix ReDoS in policy-check glob matching (VG107)
82
+
83
+ ## [2.3.1] - 2026-04-01
84
+
85
+ ### Changed
86
+ - Scan visibility rules: agent always reports GuardVibe results to user
87
+
88
+ ## [1.7.1] - 2026-04-01
89
+
90
+ ### Added
91
+ - 10 new XSS/injection rules covering form actions, file uploads, rich text editors, and template injection
92
+
93
+ ## [1.7.0] - 2026-04-01
94
+
95
+ ### Added
96
+ - 24 new rules from proactive threat research
97
+ - Supply chain attack detection rules
98
+ - CI/CD pipeline security rules
99
+ - Kubernetes misconfiguration detection
100
+ - AI/LLM security rules
101
+ - New CVE version intelligence entries
102
+
103
+ ## [1.6.1] - 2026-04-01
104
+
105
+ ### Added
106
+ - 4 new supply-chain rules for npm publish leak protection
107
+
108
+ ### Security
109
+ - Self-hardening of the publish pipeline to prevent accidental credential leaks
110
+
111
+ ## [1.6.0] - 2026-03-31
112
+
113
+ ### Added
114
+ - Agent-native security layer
115
+ - Command guard for dangerous shell operations
116
+ - Config diff tool for detecting security regressions
117
+ - Repository security posture scoring
118
+ - Deep remediation with expanded fix suggestions
119
+
120
+ ## [1.5.0] - 2026-03-31
121
+
122
+ ### Added
123
+ - PR review security scanning
124
+ - Git history scan for leaked secrets
125
+ - Policy engine with compliance enforcement
126
+ - Taint analysis for data flow tracking
127
+ - 100% fixCode coverage across all rules
128
+ - Expanded patch generation for auto-fix suggestions
129
+
130
+ ## [1.4.0] - 2026-03-31
131
+
132
+ ### Added
133
+ - `check_package_health` tool for typosquat detection, maintenance status, and adoption metrics
134
+ - `exploit` and `audit` fields on SecurityRule for compliance demonstrations
135
+ - fixCode secure code examples added to all 25 rules that were missing them
136
+
137
+ ### Changed
138
+ - Compliance mapping deepened with GDPR and ISO 27001 controls
139
+ - Performance improvements for large project scanning
140
+
141
+ ## [1.3.3] - 2026-03-31
142
+
143
+ ### Fixed
144
+ - Node.js 18 compatibility issue
145
+
146
+ ### Security
147
+ - npm provenance via Sigstore for cryptographic package signing
148
+ - Branch protection enabled (force push disabled on main)
149
+ - Tag protection for version tags (`v*`)
150
+ - Minimal CI permissions (`contents: read` only)
151
+
152
+ ## [1.3.2] - 2026-03-31
153
+
154
+ ### Changed
155
+ - Rebranded project as GuardVibe with new description and metadata
156
+
157
+ ## [0.6.1] - 2026-03-30
158
+
159
+ ### Fixed
160
+ - OSV severity normalization returning incorrect values
161
+
162
+ ### Changed
163
+ - Updated MCP SDK dependency
164
+
165
+ ## [0.6.0] - 2026-03-30
166
+
167
+ ### Added
168
+ - `.guardviberc` configuration file support with rule disable, severity override, and scan exclusions
169
+ - Compliance mapping for SOC2, PCI-DSS, and HIPAA with `compliance_report` tool
170
+ - Terraform IaC security rules (VG300-VG304): S3, IAM, RDS, security groups
171
+ - SARIF v2.1.0 output for CI/CD integration (`export_sarif` tool)
172
+
173
+ ### Fixed
174
+ - `scan_dependencies` severity and summary showing undefined when fetching OSV details
175
+
176
+ ## [0.5.0] - 2026-03-30
177
+
178
+ ### Added
179
+ - `fixCode` field on SecurityRule type with secure code examples for core, Go, Java, PHP, Ruby rules
180
+ - `scan_staged` tool for pre-commit security scanning
181
+ - Dockerfile security rules (VG200-VG204): root user, secrets in ENV, untagged images
182
+ - CI/CD security rules (VG210-VG213): secrets interpolation, unpinned actions, write-all permissions
183
+ - Security guides for Django, NestJS, Hono, Supabase, and tRPC
184
+ - fixCode snippets rendered in security reports
185
+
186
+ ### Changed
187
+ - Renamed project from VibeGuard to GuardVibe across entire codebase
188
+ - Cleaned up all old VibeGuard references and outdated specs
189
+
190
+ ## [0.4.0] - 2026-03-30
191
+
192
+ ### Added
193
+ - `scan_directory` tool for filesystem-native project scanning
194
+ - `scan_dependencies` tool with manifest parsing and OSV batch query
195
+ - `scan_secrets` tool with pattern-based and entropy-based secret detection
196
+ - `guardvibe-ignore` inline comment suppression (supports `//`, `#`, `<!-- -->`)
197
+ - Finding deduplication in analysis pipeline
198
+
199
+ ### Changed
200
+ - `check_project` refactored to use structured findings instead of string parsing
201
+ - Extracted `analyzeCode()` as reusable analysis function
202
+ - Rules split into per-language modules for maintainability
203
+
204
+ ## [0.3.0] - 2026-03-30
205
+
206
+ ### Added
207
+ - Project scanning with `check_project` tool
208
+ - CLI auto-setup (`npx guardvibe init`) for Claude Code, Cursor, Gemini CLI
209
+ - Go security rules (SQL injection, command injection, template escaping)
210
+ - Java security rules
211
+ - PHP security rules
212
+ - Ruby security rules
213
+ - Test infrastructure with tsx and node:test
214
+ - Rule tests for core, Go, Java, PHP, Ruby
215
+
216
+ ## [0.2.0] - 2026-03-30
217
+
218
+ ### Added
219
+ - New security rules for Python
220
+ - Improved Python support
221
+
222
+ ## [0.1.0] - 2026-03-30
223
+
224
+ ### Added
225
+ - Initial release as VibeGuard Security MCP server
226
+ - Core OWASP security rules (SQL injection, XSS, CSRF, command injection)
227
+ - `check_code` tool for code snippet analysis
228
+ - MCP server with stdio transport
@@ -60,10 +60,10 @@ function isInsideStringLiteral(lines, lineNumber, code, matchIndex) {
60
60
  if (/^\s*\+\s*["']/.test(line))
61
61
  return true; // + "string continuation"
62
62
  // 3. Line contains escaped newlines (\n) suggesting it's inside a string value
63
- const quotesBefore = line.substring(0, line.indexOf(trimmed.charAt(0)));
63
+ const _quotesBefore = line.substring(0, line.indexOf(trimmed.charAt(0)));
64
64
  if (/\\n/.test(line) && /["'`].*\\n/.test(line)) {
65
65
  // Extra check: is the match portion inside quotes on this line?
66
- const matchEnd = matchIndex + 20; // approximate
66
+ const _matchEnd = matchIndex + 20; // approximate
67
67
  const lineStart = code.lastIndexOf("\n", matchIndex) + 1;
68
68
  const col = matchIndex - lineStart;
69
69
  const beforeCol = line.substring(0, col);
@@ -10,7 +10,7 @@ export async function checkDependencies(packages) {
10
10
  ``,
11
11
  ];
12
12
  let totalVulns = 0;
13
- let criticalPackages = [];
13
+ const criticalPackages = [];
14
14
  for (const pkg of packages) {
15
15
  try {
16
16
  const vulns = await queryOsv(pkg.name, pkg.version, pkg.ecosystem);
@@ -45,7 +45,7 @@ function detectLanguage(filePath) {
45
45
  return "dockerfile";
46
46
  return CONFIG_FILE_MAP[basename(filePath)] ?? null;
47
47
  }
48
- function assessConfidence(rule, match) {
48
+ function assessConfidence(rule, _match) {
49
49
  // Higher confidence for specific patterns (secrets, hardcoded values)
50
50
  if (rule.id.startsWith("VG0") || rule.id.startsWith("VG6"))
51
51
  return 0.95; // core + secrets
@@ -29,7 +29,7 @@ function getFileAtCommit(cwd, commitHash, filePath) {
29
29
  return null;
30
30
  }
31
31
  }
32
- function fileExistsAtHead(cwd, filePath) {
32
+ function _fileExistsAtHead(cwd, filePath) {
33
33
  const result = execGit(["cat-file", "-e", `HEAD:${filePath}`], cwd);
34
34
  // cat-file -e returns empty on success, error message on failure
35
35
  return result === "";
@@ -9,13 +9,13 @@
9
9
  // Supports simple glob matching: * matches any segment, ** matches any depth.
10
10
  import { readFileSync } from "fs";
11
11
  import { join } from "path";
12
- let ignoreCache = new Map();
12
+ const ignoreCache = new Map();
13
13
  export function loadIgnoreFile(dir) {
14
14
  const cached = ignoreCache.get(dir);
15
15
  if (cached)
16
16
  return cached;
17
17
  const ignorePath = join(dir, ".guardvibeignore");
18
- let entries = [];
18
+ const entries = [];
19
19
  try {
20
20
  const content = readFileSync(ignorePath, "utf-8");
21
21
  const lines = content.split("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardvibe",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "description": "Security MCP for vibe coding. 313 rules, 25 tools for Next.js, Supabase, Clerk, Stripe, Prisma, tRPC, Hono, GraphQL, Convex, Turso, Uploadthing, AI SDK, and the full AI-generated stack.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,18 +8,30 @@
8
8
  "guardvibe-init": "build/cli.js",
9
9
  "guardvibe-scan": "build/cli.js"
10
10
  },
11
+ "main": "./build/index.js",
12
+ "types": "./build/index.d.ts",
11
13
  "files": [
12
- "build"
14
+ "build",
15
+ "README.md",
16
+ "LICENSE",
17
+ "CHANGELOG.md"
13
18
  ],
14
19
  "exports": {
15
- ".": "./build/index.js",
16
- "./plugins": "./build/plugins/types.js"
20
+ ".": {
21
+ "types": "./build/index.d.ts",
22
+ "default": "./build/index.js"
23
+ },
24
+ "./plugins": {
25
+ "types": "./build/plugins/types.d.ts",
26
+ "default": "./build/plugins/types.js"
27
+ }
17
28
  },
18
29
  "scripts": {
19
30
  "build": "tsc",
20
31
  "dev": "tsc --watch",
21
32
  "start": "node build/index.js",
22
33
  "prepare": "npm run build",
34
+ "lint": "eslint src/",
23
35
  "test": "node --import tsx --test tests/**/*.test.ts"
24
36
  },
25
37
  "keywords": [
@@ -77,6 +89,9 @@
77
89
  "mass-assignment",
78
90
  "auto-fix"
79
91
  ],
92
+ "funding": {
93
+ "url": "https://github.com/sponsors/goklab"
94
+ },
80
95
  "author": "GokLab",
81
96
  "license": "Apache-2.0",
82
97
  "homepage": "https://guardvibe.dev",
@@ -93,8 +108,10 @@
93
108
  },
94
109
  "devDependencies": {
95
110
  "@types/node": "^22.0.0",
111
+ "eslint": "^10.2.0",
96
112
  "tsx": "^4.21.0",
97
- "typescript": "^5.7.0"
113
+ "typescript": "^5.7.0",
114
+ "typescript-eslint": "^8.58.0"
98
115
  },
99
116
  "engines": {
100
117
  "node": ">=18.0.0"