ikanban 0.0.0-stage → 0.2.1

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/README.md CHANGED
@@ -1,3 +1,26 @@
1
- # Temporary Holding Version
1
+ # ikanban
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The iKanban command line. It scans your own repo on your machine and, when you ask, files the
4
+ results into [iKanban](https://i-kanban.com).
5
+
6
+ ```bash
7
+ npx ikanban secscan # dependencies, committed secrets, risky file permissions
8
+ npx ikanban aiscan --help # red-team scan of your AI app (OWASP LLM Top 10)
9
+ npx ikanban secscan --publish # also file the report and findings into iKanban
10
+ ```
11
+
12
+ ## What you need
13
+
14
+ - Node.js 18 or newer.
15
+ - Python 3.9 or newer. The scanners are Python; `ikanban` finds `python3`, `python` or `py -3`.
16
+
17
+ ## Free and paid
18
+
19
+ Scans run on your machine for free, with no account. `--publish` sends the results to iKanban.
20
+ It needs an API token (`--token` or `VIBE_API_TOKEN`) and a team (`--team` or `IKANBAN_TEAM_ID`).
21
+ iKanban checks your plan when you publish; a plan that does not include it gets a clear message.
22
+
23
+ ## What it sends
24
+
25
+ Nothing, unless you pass `--publish`. With `--publish`, the report and its findings go to iKanban.
26
+ Secrets found in your repo are masked in the report before anything is sent.
package/bin/ikanban.js ADDED
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+ // ikanban: one CLI for iKanban. Each command runs a bundled Python scanner.
3
+ // Scans run free on your machine; only --publish talks to iKanban, and the
4
+ // server checks your plan there (a 402 means the plan, not the scan).
5
+ const { spawnSync } = require("node:child_process");
6
+ const path = require("node:path");
7
+ const { version } = require("../package.json");
8
+
9
+ const COMMANDS = {
10
+ aiscan: { file: "ikanban-aiscan.py", about: "Red-team scan of your AI app (OWASP LLM Top 10)" },
11
+ secscan: { file: "ikanban-secscan.py", about: "Dependency, secret and file-permission scan of a repo" },
12
+ };
13
+
14
+ function help() {
15
+ const lines = Object.entries(COMMANDS).map(([n, c]) => ` ${n.padEnd(9)}${c.about}`);
16
+ console.log(`ikanban ${version}
17
+
18
+ Usage: ikanban <command> [options]
19
+
20
+ Commands:
21
+ ${lines.join("\n")}
22
+
23
+ Run "ikanban <command> --help" for its options. Add --publish to file the
24
+ results into iKanban (needs an API token; the server checks your plan).
25
+ Needs Python 3.9 or newer.`);
26
+ }
27
+
28
+ // python3 on macOS/Linux; on Windows usually "py -3" or "python".
29
+ function findPython() {
30
+ const candidates = process.platform === "win32"
31
+ ? [["py", ["-3"]], ["python", []], ["python3", []]]
32
+ : [["python3", []], ["python", []]];
33
+ for (const [cmd, pre] of candidates) {
34
+ const r = spawnSync(cmd, [...pre, "-c", "import sys; sys.exit(0 if sys.version_info >= (3, 9) else 1)"]);
35
+ if (r.status === 0) return [cmd, pre];
36
+ }
37
+ return null;
38
+ }
39
+
40
+ const [cmd, ...args] = process.argv.slice(2);
41
+ if (!cmd || cmd === "help" || cmd === "--help" || cmd === "-h") {
42
+ help();
43
+ process.exit(0);
44
+ }
45
+ if (cmd === "--version" || cmd === "-v") {
46
+ console.log(version);
47
+ process.exit(0);
48
+ }
49
+ const command = COMMANDS[cmd];
50
+ if (!command) {
51
+ console.error(`ikanban: unknown command "${cmd}". Run "ikanban --help".`);
52
+ process.exit(2);
53
+ }
54
+ const python = findPython();
55
+ if (!python) {
56
+ console.error("ikanban: Python 3.9 or newer was not found. Install it from https://www.python.org/downloads/ and run again.");
57
+ process.exit(1);
58
+ }
59
+ const [py, pre] = python;
60
+ const script = path.join(__dirname, "..", "scanners", command.file);
61
+ // Windows consoles default to cp1252, which lacks characters the reports print.
62
+ const env = { ...process.env, PYTHONIOENCODING: "utf-8", PYTHONUTF8: "1" };
63
+ const r = spawnSync(py, [...pre, script, ...args], { stdio: "inherit", env });
64
+ process.exit(r.status === null ? 1 : r.status);
package/package.json CHANGED
@@ -1,6 +1,17 @@
1
1
  {
2
2
  "name": "ikanban",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.1",
4
+ "description": "iKanban CLI: AI and security scans of your own repo, with results filed into iKanban",
5
+ "bin": { "ikanban": "bin/ikanban.js" },
6
+ "files": ["bin", "scanners", "README.md"],
7
+ "scripts": {
8
+ "prepack": "node scripts/copy-scanners.js",
9
+ "pretest": "node scripts/copy-scanners.js",
10
+ "test": "node --test test/cli.test.js"
11
+ },
12
+ "engines": { "node": ">=18" },
13
+ "homepage": "https://i-kanban.com",
14
+ "keywords": ["ikanban", "security", "scanner", "ai", "cli"],
15
+ "author": "VerBodh <support@verbodh.com>",
16
+ "license": "UNLICENSED"
17
+ }