securevibe 0.1.10 → 0.1.13

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.
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { Box, Text } from "ink";
3
+ import path from "node:path";
4
+ import { llmAvailability } from "../../engine/fix/llm.js";
5
+ const h = React.createElement;
6
+ /**
7
+ * target: <basename> · fixer: <groq|anthropic|none>, right-aligned, dim.
8
+ * fixer reflects the same provider-selection precedence fix's LLM path
9
+ * already uses (llmAvailability), not a separately reimplemented rule.
10
+ */
11
+ export function StatusLine({ targetRoot }) {
12
+ const avail = llmAvailability(false);
13
+ const fixer = avail.provider ?? "none";
14
+ return h(Box, { justifyContent: "flex-end" }, h(Text, { dimColor: true }, `target: ${path.basename(targetRoot)} · fixer: ${fixer}`));
15
+ }
@@ -0,0 +1,38 @@
1
+ export const COMMANDS = [
2
+ { name: "scan", args: "[--json]", description: "full scan" },
3
+ { name: "fix", args: "[--apply] [--yes] [--no-llm] [--json]", description: "fix findings" },
4
+ { name: "explain", args: "[--json]", description: "AI explanations for critical/high findings" },
5
+ { name: "ai-audit", args: "[--json]", description: "focus on the AI-agent attack surface" },
6
+ { name: "protect", args: "[--json]", description: "AI execution firewall guidance" },
7
+ { name: "attack-map", args: "[--json]", description: "map findings to attacker paths" },
8
+ { name: "score", args: "[--json]", description: "score-only view" },
9
+ { name: "deps", args: "[--json]", description: "dependency / CVE audit" },
10
+ { name: "ready", args: "[--json]", description: "launch readiness scorecard" },
11
+ { name: "init", args: "[--force]", description: "wire up the pre-commit guard + CI" },
12
+ {
13
+ name: "config",
14
+ args: "show | set-key <groq|anthropic> | unset-key <groq|anthropic>",
15
+ description: "manage AI-fixer keys",
16
+ },
17
+ { name: "db", args: "update | status", description: "manage the local OSV database" },
18
+ { name: "cd", args: "<path>", description: "change the scan target" },
19
+ { name: "pwd", args: "", description: "show the current scan target" },
20
+ { name: "help", args: "", description: "this message" },
21
+ { name: "exit", args: "", description: "leave the session (aliases: quit, q)" },
22
+ ];
23
+ /** Prefix match on command name, case-insensitive. Empty query returns all. */
24
+ export function filterCommands(query) {
25
+ const q = query.toLowerCase();
26
+ return COMMANDS.filter((c) => c.name.toLowerCase().startsWith(q));
27
+ }
28
+ /** Plain-text `help` output, one line per command. */
29
+ export function renderHelp() {
30
+ const lines = [" Commands:"];
31
+ for (const c of COMMANDS) {
32
+ const left = ` ${c.name}${c.args ? " " + c.args : ""}`;
33
+ lines.push(left.length < 44 ? left.padEnd(44) + c.description : left + " " + c.description);
34
+ }
35
+ lines.push("");
36
+ lines.push(" Anything else you type is a question for the AI about your last scan (needs a key: `config set-key groq`).");
37
+ return lines.join("\n");
38
+ }
@@ -0,0 +1,16 @@
1
+ import { Writable } from "node:stream";
2
+ /**
3
+ * A real Writable whose _write feeds every chunk to a callback instead of a
4
+ * terminal. Lets dispatch()'s existing `io.output.write(text)` calls feed
5
+ * Ink's <Static> scrollback region instead of writing directly to stdout,
6
+ * which would corrupt Ink's own live-region redraws (the input box, status
7
+ * line, spinner, and slash menu all redraw in place on every keystroke).
8
+ */
9
+ export function makeCallbackWritable(onWrite) {
10
+ return new Writable({
11
+ write(chunk, _encoding, callback) {
12
+ onWrite(chunk.toString());
13
+ callback();
14
+ },
15
+ });
16
+ }
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  // Single source of truth for the CLI's own version, so it can't drift from
3
3
  // what commander reports and what the update-check compares against.
4
4
  // Kept in sync with the "version" field in package.json by hand at release time.
5
- export const VERSION = "0.1.10";
5
+ export const VERSION = "0.1.13";
package/package.json CHANGED
@@ -1,66 +1,71 @@
1
- {
2
- "name": "securevibe",
3
- "version": "0.1.10",
4
- "description": "Autonomous AI security engineer for AI generated apps: scan, fix, verify, and gate every commit before you launch",
5
- "type": "module",
6
- "license": "SEE LICENSE IN LICENSE",
7
- "author": "Benedict Patrick <benedictroger2006@gmail.com>",
8
- "homepage": "https://github.com/Benedictpatrick/secure-vibe#readme",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/Benedictpatrick/secure-vibe.git",
12
- "directory": "packages/cli"
13
- },
14
- "bugs": {
15
- "url": "https://github.com/Benedictpatrick/secure-vibe/issues"
16
- },
17
- "keywords": [
18
- "security",
19
- "scanner",
20
- "sast",
21
- "ai security",
22
- "prompt injection",
23
- "vulnerability",
24
- "secrets",
25
- "sca",
26
- "cve",
27
- "launch readiness",
28
- "vibe coding",
29
- "cli"
30
- ],
31
- "engines": {
32
- "node": ">=20"
33
- },
34
- "bin": {
35
- "securevibe": "./dist/index.js"
36
- },
37
- "files": [
38
- "dist",
39
- "data",
40
- "LICENSE"
41
- ],
42
- "scripts": {
43
- "build": "tsc -p tsconfig.json",
44
- "dev": "tsx src/index.ts",
45
- "start": "node dist/index.js",
46
- "test": "node run-tests.mjs"
47
- },
48
- "dependencies": {
49
- "commander": "^12.1.0",
50
- "diff": "^5.2.0",
51
- "picocolors": "^1.1.1",
52
- "tree-sitter-wasms": "^0.1.12",
53
- "web-tree-sitter": "^0.25.10",
54
- "yauzl": "^3.2.0"
55
- },
56
- "optionalDependencies": {
57
- "@anthropic-ai/sdk": "^0.39.0"
58
- },
59
- "devDependencies": {
60
- "@types/diff": "^5.2.0",
61
- "@types/node": "^20.14.0",
62
- "@types/yauzl": "^2.10.3",
63
- "tsx": "^4.19.0",
64
- "typescript": "^5.6.0"
65
- }
66
- }
1
+ {
2
+ "name": "securevibe",
3
+ "version": "0.1.13",
4
+ "description": "Autonomous AI security engineer for AI generated apps: scan, fix, verify, and gate every commit before you launch",
5
+ "type": "module",
6
+ "license": "SEE LICENSE IN LICENSE",
7
+ "author": "Benedict Patrick <benedictroger2006@gmail.com>",
8
+ "homepage": "https://github.com/Benedictpatrick/secure-vibe#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Benedictpatrick/secure-vibe.git",
12
+ "directory": "packages/cli"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/Benedictpatrick/secure-vibe/issues"
16
+ },
17
+ "keywords": [
18
+ "security",
19
+ "scanner",
20
+ "sast",
21
+ "ai security",
22
+ "prompt injection",
23
+ "vulnerability",
24
+ "secrets",
25
+ "sca",
26
+ "cve",
27
+ "launch readiness",
28
+ "vibe coding",
29
+ "cli"
30
+ ],
31
+ "engines": {
32
+ "node": ">=20"
33
+ },
34
+ "bin": {
35
+ "securevibe": "./dist/index.js"
36
+ },
37
+ "files": [
38
+ "dist",
39
+ "data",
40
+ "LICENSE"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsc -p tsconfig.json",
44
+ "dev": "tsx src/index.ts",
45
+ "start": "node dist/index.js",
46
+ "test": "node run-tests.mjs"
47
+ },
48
+ "dependencies": {
49
+ "commander": "^12.1.0",
50
+ "diff": "^5.2.0",
51
+ "ink": "^6.8.0",
52
+ "ink-text-input": "^6.0.0",
53
+ "picocolors": "^1.1.1",
54
+ "react": "^19.2.7",
55
+ "tree-sitter-wasms": "^0.1.12",
56
+ "web-tree-sitter": "^0.25.10",
57
+ "yauzl": "^3.2.0"
58
+ },
59
+ "optionalDependencies": {
60
+ "@anthropic-ai/sdk": "^0.39.0"
61
+ },
62
+ "devDependencies": {
63
+ "@types/diff": "^5.2.0",
64
+ "@types/node": "^20.14.0",
65
+ "@types/react": "^19.2.17",
66
+ "@types/yauzl": "^2.10.3",
67
+ "ink-testing-library": "^4.0.0",
68
+ "tsx": "^4.19.0",
69
+ "typescript": "^5.6.0"
70
+ }
71
+ }