guardvibe 3.10.0 → 3.11.0

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 CHANGED
@@ -5,6 +5,15 @@ All notable changes to GuardVibe are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.11.0] - 2026-06-07
9
+
10
+ ### Changed — S3-1 (cont.): reachability-weighted dependency prioritization (441 rules / 37 tools)
11
+ - The audit's dependency section now **prioritizes** findings: severity first, then **imported (reachable) packages ahead of unused ones** within the same tier — so the agent fixes what its code actually calls into first. Severity is never altered (an unreachable dep can still be exploitable), so no false negatives are introduced.
12
+ - Each dependency `SectionFinding` now carries a structured `reachable` field (agent-consumable), in addition to the existing in-description annotation and the section's "N of M directly imported" count.
13
+ - New exported pure helper `sortDepFindings` (severity-rank + reachable-first), unit-tested. No rule or tool changes (441 / 37). Completes S3-1.
14
+
15
+ Gate green (build / lint / test / self-audit PASS / A / 0).
16
+
8
17
  ## [3.10.0] - 2026-06-07
9
18
 
10
19
  ### Added — Season 3 S3-1: autonomous, prioritized threat intel (441 rules / 37 tools)
@@ -29,7 +29,16 @@ export interface SectionFinding {
29
29
  name?: string;
30
30
  description?: string;
31
31
  fix?: string;
32
+ /** Dependency findings: is the vulnerable package actually imported in source? */
33
+ reachable?: boolean;
32
34
  }
35
+ /**
36
+ * Order dependency findings by severity first, then surface reachable (imported)
37
+ * packages ahead of unreachable ones within the same tier — so the agent fixes
38
+ * what its code actually calls into first. Severity is never altered (an
39
+ * unreachable dep can still be exploitable), so this introduces no false negatives.
40
+ */
41
+ export declare function sortDepFindings(findings: SectionFinding[]): SectionFinding[];
33
42
  export interface AuditSection {
34
43
  name: string;
35
44
  status: "ok" | "error" | "skipped";
@@ -21,6 +21,17 @@ import { loadConfig } from "../utils/config.js";
21
21
  import { isExcludedFilename } from "../utils/constants.js";
22
22
  const _require = createRequire(import.meta.url);
23
23
  const _pkg = _require("../../package.json");
24
+ const DEP_SEV_RANK = { critical: 0, high: 1, medium: 2, low: 3, info: 4 };
25
+ /**
26
+ * Order dependency findings by severity first, then surface reachable (imported)
27
+ * packages ahead of unreachable ones within the same tier — so the agent fixes
28
+ * what its code actually calls into first. Severity is never altered (an
29
+ * unreachable dep can still be exploitable), so this introduces no false negatives.
30
+ */
31
+ export function sortDepFindings(findings) {
32
+ return [...findings].sort((a, b) => (DEP_SEV_RANK[a.severity] ?? 9) - (DEP_SEV_RANK[b.severity] ?? 9) ||
33
+ (Number(b.reachable === true) - Number(a.reachable === true)));
34
+ }
24
35
  // --- Core Logic ---
25
36
  /**
26
37
  * Compute verdict: PASS (0 critical + 0 high), WARN (high > 0), FAIL (critical > 0)
@@ -285,10 +296,14 @@ export async function runFullAudit(path, options) {
285
296
  name: `${pkgRec.name ?? "unknown"}: ${(vuln2.id ?? "CVE")}`,
286
297
  description: `${(vuln2.summary ?? vuln2.details ?? "")}${reachNote}`,
287
298
  fix: `Run: npm update ${pkgRec.name ?? ""}`,
299
+ reachable,
288
300
  });
289
301
  allFindings.push({ ruleId: `DEP:${vuln2.id ?? "CVE"}`, severity: sev, file: "package.json", line: 0 });
290
302
  }
291
303
  }
304
+ // Prioritize: severity first, then imported-and-vulnerable ahead of unused.
305
+ depFindings.sort((a, b) => (DEP_SEV_RANK[a.severity] ?? 9) - (DEP_SEV_RANK[b.severity] ?? 9) ||
306
+ (Number(b.reachable === true) - Number(a.reachable === true)));
292
307
  const counts = { findings: depFindings.length, critical: depCritical, high: depHigh, medium: depMedium };
293
308
  const reachText = typeof reachableVulnerable === "number" && vulnPackages > 0
294
309
  ? ` (${reachableVulnerable} of ${vulnPackages} directly imported in source)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "guardvibe",
3
- "version": "3.10.0",
3
+ "version": "3.11.0",
4
4
  "mcpName": "io.github.goklab/guardvibe",
5
5
  "description": "Security infrastructure your AI can't be — deterministic, current past your model's training cutoff, whole-repo-aware, author-independent. Security MCP for vibe coding. 441 rules, 37 tools, CLI + doctor. Host security, auth coverage mapping, LLM-powered deep scan (IDOR/business logic), taint analysis. 70 CVE rules refreshed daily from GHSA/OSV/CISA KEV — React Router 7 cluster, DOMPurify XSS, Better Auth bypass, Miasma @redhat-cloud-services compromise, Next.js May 2026 13-advisory cluster, Drizzle/MikroORM/Kysely SQL injection, Axios proxy-auth redirect leak, Hono setCookie attribute injection, Clerk SSRF, tRPC prototype pollution, @tanstack supply-chain, node-ipc protestware, OpenClaude sandbox bypass, plus the full AI-generated stack (Supabase, Stripe, Prisma, Hono, GraphQL, Convex, Turso, Uploadthing, AI SDK). 68 AI-native rules including OWASP MCP Top 10 tool-description prompt injection (VG1068), model-controlled sandbox-disable flag detection (VG1063), Session messenger exfil endpoint IOC (VG1075), and CI/CD supply-chain hardening (VG1070 npm --expect-provenance / --ignore-scripts enforcement).",
6
6
  "type": "module",