vibe-shield 1.0.0 → 1.2.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.
@@ -1,9 +1,17 @@
1
- import type { SecurityIssue, IssueSummary } from "./types";
1
+ import type { SecurityIssue, IssueSummary, Severity } from "./types";
2
2
  /**
3
3
  * Format issues into an "Agent Protocol" string that AI agents can read and act on.
4
4
  */
5
- export declare function formatAgentPrompt(issues: SecurityIssue[]): string;
5
+ export declare function formatAgentPrompt(issues: SecurityIssue[], useColors?: boolean): string;
6
6
  /**
7
7
  * Generate a summary of issues by type.
8
8
  */
9
9
  export declare function generateSummary(issues: SecurityIssue[]): IssueSummary;
10
+ /**
11
+ * Generate severity summary
12
+ */
13
+ export declare function generateSeveritySummary(issues: SecurityIssue[]): Record<Severity, number>;
14
+ /**
15
+ * Format issues as JSON for CI/CD pipelines
16
+ */
17
+ export declare function formatJson(issues: SecurityIssue[], warnings: string[]): string;
package/dist/scanner.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { SecurityIssue } from "./types";
1
+ import type { ScanResult } from "./types";
2
2
  /**
3
3
  * Scan all files in a directory for security issues.
4
4
  */
5
- export declare function scanFiles(dir: string): SecurityIssue[];
5
+ export declare function scanFiles(dir: string): ScanResult;
package/dist/types.d.ts CHANGED
@@ -1,8 +1,10 @@
1
+ export type Severity = "critical" | "high" | "medium" | "low";
1
2
  export interface SecurityPattern {
2
3
  id: string;
3
4
  name: string;
4
5
  regex: RegExp;
5
6
  fixPrompt: string;
7
+ severity: Severity;
6
8
  }
7
9
  export interface SecurityIssue {
8
10
  file: string;
@@ -11,6 +13,7 @@ export interface SecurityIssue {
11
13
  patternName: string;
12
14
  fixPrompt: string;
13
15
  match: string;
16
+ severity: Severity;
14
17
  }
15
18
  export interface InitResult {
16
19
  success: boolean;
@@ -20,3 +23,7 @@ export interface InitResult {
20
23
  export interface IssueSummary {
21
24
  [patternName: string]: number;
22
25
  }
26
+ export interface ScanResult {
27
+ issues: SecurityIssue[];
28
+ warnings: string[];
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-shield",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Security scanner for vibe coders - find and fix AI-generated security issues",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "scripts": {
15
15
  "dev": "bun run src/cli.ts",
16
- "build": "bun build src/cli.ts --outdir dist --target node && bun build src/index.ts --outdir dist --target node && bun x tsc --emitDeclarationOnly",
16
+ "build": "bun build src/cli.ts --outdir dist --target node && bun build src/mcp-server.ts --outdir dist --target node && bun build src/index.ts --outdir dist --target node && bun x tsc --emitDeclarationOnly",
17
17
  "prepublishOnly": "bun run build",
18
18
  "typecheck": "tsc --noEmit",
19
19
  "test": "bun test"
@@ -28,7 +28,8 @@
28
28
  "claude",
29
29
  "devtools",
30
30
  "linter",
31
- "vulnerabilities"
31
+ "vulnerabilities",
32
+ "mcp"
32
33
  ],
33
34
  "author": "",
34
35
  "license": "MIT",
@@ -43,9 +44,12 @@
43
44
  "engines": {
44
45
  "node": ">=18.0.0"
45
46
  },
47
+ "dependencies": {
48
+ "@modelcontextprotocol/sdk": "^1.0.0"
49
+ },
46
50
  "devDependencies": {
47
51
  "@types/bun": "latest",
48
52
  "@types/node": "^20.10.0",
49
53
  "typescript": "^5.3.0"
50
54
  }
51
- }
55
+ }