cantarella-framework 1.10.0 → 1.12.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/modules/api-robots-checker/index.mjs +55 -0
  3. package/modules/api-robots-checker/module.json +14 -0
  4. package/modules/incident-response-log-parser/index.mjs +42 -0
  5. package/modules/incident-response-log-parser/module.json +14 -0
  6. package/modules/lab-url-parser/index.mjs +40 -0
  7. package/modules/lab-url-parser/module.json +14 -0
  8. package/modules/osint-shodan/index.mjs +43 -0
  9. package/modules/osint-shodan/module.json +14 -0
  10. package/modules/reporting-csv-export/index.mjs +51 -0
  11. package/modules/reporting-csv-export/module.json +14 -0
  12. package/modules/threat-intel-otx/index.mjs +35 -0
  13. package/modules/threat-intel-otx/module.json +14 -0
  14. package/modules/threat-intel-urlhaus/index.mjs +40 -0
  15. package/modules/threat-intel-urlhaus/module.json +14 -0
  16. package/modules/vuln-management-openvas-import/index.mjs +62 -0
  17. package/modules/vuln-management-openvas-import/module.json +14 -0
  18. package/modules/wrapper-assetfinder/index.mjs +42 -0
  19. package/modules/wrapper-assetfinder/module.json +21 -0
  20. package/modules/wrapper-flawfinder/index.mjs +40 -0
  21. package/modules/wrapper-flawfinder/module.json +21 -0
  22. package/modules/wrapper-gau/index.mjs +40 -0
  23. package/modules/wrapper-gau/module.json +21 -0
  24. package/modules/wrapper-gobuster/index.mjs +41 -0
  25. package/modules/wrapper-gobuster/module.json +28 -0
  26. package/modules/wrapper-kube-bench/index.mjs +41 -0
  27. package/modules/wrapper-kube-bench/module.json +21 -0
  28. package/modules/wrapper-ldapsearch/index.mjs +43 -0
  29. package/modules/wrapper-ldapsearch/module.json +21 -0
  30. package/modules/wrapper-mobsfscan/index.mjs +47 -0
  31. package/modules/wrapper-mobsfscan/module.json +21 -0
  32. package/modules/wrapper-osquery/index.mjs +39 -0
  33. package/modules/wrapper-osquery/module.json +21 -0
  34. package/modules/wrapper-reaver/index.mjs +39 -0
  35. package/modules/wrapper-reaver/module.json +28 -0
  36. package/modules/wrapper-sleuthkit-fls/index.mjs +40 -0
  37. package/modules/wrapper-sleuthkit-fls/module.json +21 -0
  38. package/modules/wrapper-ssh-audit/index.mjs +39 -0
  39. package/modules/wrapper-ssh-audit/module.json +21 -0
  40. package/modules/wrapper-terraform/index.mjs +46 -0
  41. package/modules/wrapper-terraform/module.json +21 -0
  42. package/package.json +1 -1
  43. package/packages/cli/dist/cli.js +1 -1
  44. package/packages/gui/dist/server.js +2 -2
@@ -0,0 +1,40 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("gau", [target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `gau failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const urls = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed) continue;
25
+ if (!/^https?:\/\//.test(trimmed)) continue;
26
+ urls.push(trimmed);
27
+ }
28
+ if (code !== 0 && !urls.length) {
29
+ emit({ type: "error", message: `gau failed: ${stderr.trim() || `exited with ${code}`}` });
30
+ process.exitCode = 1;
31
+ return;
32
+ }
33
+ emit({
34
+ type: "result",
35
+ summary: `gau found ${urls.length} archived URLs for ${target}.`,
36
+ data: { target, urls: [...new Set(urls)].slice(0, 500) },
37
+ });
38
+ emit({ type: "done", summary: `gau finished: ${urls.length} archived URLs.` });
39
+ });
40
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "bug-bounty",
3
+ "core_api": "^0.1.0",
4
+ "description": "Lists archived URLs for a domain from the Wayback Machine with gau.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "gau",
9
+ "install_hint": "Install gau with go install github.com/lc/gau/v2/cmd/gau@latest.",
10
+ "name": "gau"
11
+ }
12
+ ],
13
+ "id": "bug-bounty/gau",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "gau",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,41 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const wordlist = String(request.options?.wordlist ?? "/usr/share/wordlists/dirb/common.txt");
11
+ const child = spawn("gobuster", ["dir", "-u", target, "-w", wordlist], { stdio: ["ignore", "pipe", "pipe"] });
12
+ let stdout = "";
13
+ let stderr = "";
14
+ child.stdout.on("data", (chunk) => (stdout += chunk));
15
+ child.stderr.on("data", (chunk) => (stderr += chunk));
16
+ child.on("error", (error) => {
17
+ emit({ type: "error", message: `Gobuster failed: ${error.message}` });
18
+ process.exitCode = 1;
19
+ });
20
+ child.on("close", (code) => {
21
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
22
+ const paths = [];
23
+ for (const line of plain.split("\n")) {
24
+ const trimmed = line.trim();
25
+ const match = trimmed.match(/^(\S+)\s+\(Status:\s+(\d+)\)\s+\[Size:\s+(\d+)\]/);
26
+ if (!match) continue;
27
+ paths.push({ path: match[1], status: Number(match[2]), size: Number(match[3]) });
28
+ }
29
+ if (code !== 0 && !paths.length) {
30
+ emit({ type: "error", message: `Gobuster failed: ${stderr.trim() || `exited with ${code}`}` });
31
+ process.exitCode = 1;
32
+ return;
33
+ }
34
+ emit({
35
+ type: "result",
36
+ summary: `Gobuster found ${paths.length} paths on ${target}.`,
37
+ data: { target, paths: paths.slice(0, 500) },
38
+ });
39
+ emit({ type: "done", summary: `Gobuster finished: ${paths.length} paths.` });
40
+ });
41
+ });
@@ -0,0 +1,28 @@
1
+ {
2
+ "category": "web",
3
+ "core_api": "^0.1.0",
4
+ "description": "Brute forces hidden paths on a website with Gobuster and reports the paths found.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "gobuster",
9
+ "install_hint": "Install Gobuster from your distribution packages or the OJ Gobuster releases.",
10
+ "name": "Gobuster"
11
+ }
12
+ ],
13
+ "id": "web/gobuster",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "Gobuster",
17
+ "options": [
18
+ {
19
+ "default": "/usr/share/wordlists/dirb/common.txt",
20
+ "description": "Wordlist of paths to try.",
21
+ "name": "wordlist",
22
+ "type": "string"
23
+ }
24
+ ],
25
+ "risk": "medium",
26
+ "schema_version": 1,
27
+ "version": "0.1.0"
28
+ }
@@ -0,0 +1,41 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const child = spawn("kube-bench", [], { stdio: ["ignore", "pipe", "pipe"] });
10
+ let stdout = "";
11
+ let stderr = "";
12
+ child.stdout.on("data", (chunk) => (stdout += chunk));
13
+ child.stderr.on("data", (chunk) => (stderr += chunk));
14
+ child.on("error", (error) => {
15
+ emit({ type: "error", message: `kube-bench failed: ${error.message}` });
16
+ process.exitCode = 1;
17
+ });
18
+ child.on("close", (code) => {
19
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
20
+ const checks = [];
21
+ for (const line of plain.split("\n")) {
22
+ const trimmed = line.trim();
23
+ const match = trimmed.match(/^\[(PASS|FAIL|WARN|INFO)\]\s+(\d+\.\d+\.\d+)\s+(.+)$/);
24
+ if (!match) continue;
25
+ checks.push({ status: match[1], id: match[2], description: match[3].trim() });
26
+ }
27
+ if (code !== 0 && !checks.length) {
28
+ emit({ type: "error", message: `kube-bench failed: ${stderr.trim() || `exited with ${code}`}` });
29
+ process.exitCode = 1;
30
+ return;
31
+ }
32
+ const passed = checks.filter((check) => check.status === "PASS").length;
33
+ const failed = checks.filter((check) => check.status === "FAIL").length;
34
+ emit({
35
+ type: "result",
36
+ summary: `kube-bench reported ${failed} failed and ${passed} passed checks.`,
37
+ data: { passed, failed, checks: checks.slice(0, 200) },
38
+ });
39
+ emit({ type: "done", summary: `kube-bench finished: ${failed} failed, ${passed} passed.` });
40
+ });
41
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "cloud",
3
+ "core_api": "^0.1.0",
4
+ "description": "Runs CIS Kubernetes benchmarks with kube-bench and reports passing and failing checks.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "kube-bench",
9
+ "install_hint": "Install kube-bench from your distribution packages or the aquasecurity releases.",
10
+ "name": "kube-bench"
11
+ }
12
+ ],
13
+ "id": "cloud/kube-bench",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "kube-bench",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,43 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("ldapsearch", ["-x", "-H", `ldap://${target}`, "-b", "", "-s", "base", "(objectclass=*)"], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `ldapsearch failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const attributes = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed) continue;
25
+ if (trimmed.startsWith("#")) continue;
26
+ const match = trimmed.match(/^([a-zA-Z][a-zA-Z0-9-]*):\s*(.*)$/);
27
+ if (!match) continue;
28
+ if (match[1] === "search" || match[1] === "result" || match[1] === "dn") continue;
29
+ attributes.push({ key: match[1], value: match[2].trim() });
30
+ }
31
+ if (code !== 0 && !attributes.length) {
32
+ emit({ type: "error", message: `ldapsearch failed: ${stderr.trim() || `exited with ${code}`}` });
33
+ process.exitCode = 1;
34
+ return;
35
+ }
36
+ emit({
37
+ type: "result",
38
+ summary: `ldapsearch returned ${attributes.length} rootDSE attributes for ${target}.`,
39
+ data: { target, attributes: attributes.slice(0, 100) },
40
+ });
41
+ emit({ type: "done", summary: `ldapsearch finished: ${attributes.length} attributes.` });
42
+ });
43
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "internal",
3
+ "core_api": "^0.1.0",
4
+ "description": "Queries the LDAP rootDSE of a directory server with ldapsearch and reports its attributes.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "ldapsearch",
9
+ "install_hint": "Install ldapsearch from your distribution packages (openldap-clients).",
10
+ "name": "ldapsearch"
11
+ }
12
+ ],
13
+ "id": "internal/ldapsearch",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "ldapsearch",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,47 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("mobsfscan", ["--json", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `MobSFScan failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ let report = null;
21
+ try {
22
+ report = JSON.parse(stdout);
23
+ } catch {
24
+ report = null;
25
+ }
26
+ const findings = [];
27
+ const raw = Array.isArray(report?.results) ? report.results : [];
28
+ for (const finding of raw) {
29
+ findings.push({ title: finding.title ?? "", severity: finding.severity ?? "UNKNOWN", file: finding.file ?? "" });
30
+ }
31
+ if (code !== 0 && !findings.length && !report) {
32
+ emit({ type: "error", message: `MobSFScan failed: ${stderr.trim() || `exited with ${code}`}` });
33
+ process.exitCode = 1;
34
+ return;
35
+ }
36
+ const bySeverity = {};
37
+ for (const finding of findings) {
38
+ bySeverity[finding.severity] = (bySeverity[finding.severity] ?? 0) + 1;
39
+ }
40
+ emit({
41
+ type: "result",
42
+ summary: `MobSFScan found ${findings.length} findings in ${target}.`,
43
+ data: { target, total: findings.length, by_severity: bySeverity, findings: findings.slice(0, 100) },
44
+ });
45
+ emit({ type: "done", summary: `MobSFScan finished: ${findings.length} findings.` });
46
+ });
47
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "mobile",
3
+ "core_api": "^0.1.0",
4
+ "description": "Scans mobile app code with MobSFScan and reports the security findings.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "mobsfscan",
9
+ "install_hint": "Install MobSFScan from your distribution packages or with pipx install mobsfscan.",
10
+ "name": "MobSFScan"
11
+ }
12
+ ],
13
+ "id": "mobile/mobsfscan",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "MobSFScan",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,39 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("osqueryi", ["--json", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `osquery failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ let rows = null;
21
+ try {
22
+ rows = JSON.parse(stdout);
23
+ } catch {
24
+ rows = null;
25
+ }
26
+ if (code !== 0 && !Array.isArray(rows)) {
27
+ emit({ type: "error", message: `osquery failed: ${stderr.trim() || `exited with ${code}`}` });
28
+ process.exitCode = 1;
29
+ return;
30
+ }
31
+ if (!Array.isArray(rows)) rows = [];
32
+ emit({
33
+ type: "result",
34
+ summary: `osquery returned ${rows.length} rows.`,
35
+ data: { query: target, rows: rows.length, results: rows.slice(0, 50) },
36
+ });
37
+ emit({ type: "done", summary: `osquery finished: ${rows.length} rows.` });
38
+ });
39
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "blue-team",
3
+ "core_api": "^0.1.0",
4
+ "description": "Runs an osquery SQL query and reports the rows it returns.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "osqueryi",
9
+ "install_hint": "Install osquery from your distribution packages or the osquery releases.",
10
+ "name": "osquery"
11
+ }
12
+ ],
13
+ "id": "blue-team/osquery",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "osquery",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,39 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const iface = String(request.options?.interface ?? "wlan0mon");
11
+ const child = spawn("reaver", ["-i", iface, "-b", target, "-vv"], { stdio: ["ignore", "pipe", "pipe"] });
12
+ let stdout = "";
13
+ let stderr = "";
14
+ child.stdout.on("data", (chunk) => (stdout += chunk));
15
+ child.stderr.on("data", (chunk) => (stderr += chunk));
16
+ child.on("error", (error) => {
17
+ emit({ type: "error", message: `Reaver failed: ${error.message}` });
18
+ process.exitCode = 1;
19
+ });
20
+ child.on("close", (code) => {
21
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
22
+ const pinMatch = plain.match(/WPS PIN:\s*'(\d+)'/);
23
+ const pskMatch = plain.match(/WPA PSK:\s*'([^']+)'/);
24
+ const ssidMatch = plain.match(/AP SSID:\s*'([^']+)'/);
25
+ const psk = pskMatch ? pskMatch[1] : null;
26
+ const pin = pinMatch ? pinMatch[1] : null;
27
+ if (code !== 0 && !psk && !pin) {
28
+ emit({ type: "error", message: `Reaver failed: ${stderr.trim() || `exited with ${code}`}` });
29
+ process.exitCode = 1;
30
+ return;
31
+ }
32
+ emit({
33
+ type: "result",
34
+ summary: psk ? `Reaver recovered the PSK for ${ssidMatch ? ssidMatch[1] : target}.` : `Reaver did not recover the PSK for ${target}.`,
35
+ data: { target, ssid: ssidMatch ? ssidMatch[1] : null, pin, psk, cracked: Boolean(psk) },
36
+ });
37
+ emit({ type: "done", summary: psk ? "Reaver finished: PSK recovered." : "Reaver finished: PSK not recovered." });
38
+ });
39
+ });
@@ -0,0 +1,28 @@
1
+ {
2
+ "category": "wireless",
3
+ "core_api": "^0.1.0",
4
+ "description": "Attacks a WPS-enabled access point with Reaver and reports the recovered PIN and PSK.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "reaver",
9
+ "install_hint": "Install Reaver from your distribution packages.",
10
+ "name": "Reaver"
11
+ }
12
+ ],
13
+ "id": "wireless/reaver",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "Reaver",
17
+ "options": [
18
+ {
19
+ "default": "wlan0mon",
20
+ "description": "Wireless interface in monitor mode.",
21
+ "name": "interface",
22
+ "type": "string"
23
+ }
24
+ ],
25
+ "risk": "high",
26
+ "schema_version": 1,
27
+ "version": "0.1.0"
28
+ }
@@ -0,0 +1,40 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("fls", ["-r", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `fls failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ const entries = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ const match = trimmed.match(/^([rwdl-])\/([rwdl-])\s+(\d+):\s+(.+)$/);
25
+ if (!match) continue;
26
+ entries.push({ type: `${match[1]}/${match[2]}`, inode: Number(match[3]), name: match[4].trim() });
27
+ }
28
+ if (code !== 0 && !entries.length) {
29
+ emit({ type: "error", message: `fls failed: ${stderr.trim() || `exited with ${code}`}` });
30
+ process.exitCode = 1;
31
+ return;
32
+ }
33
+ emit({
34
+ type: "result",
35
+ summary: `fls listed ${entries.length} entries in ${target}.`,
36
+ data: { target, entries: entries.slice(0, 500) },
37
+ });
38
+ emit({ type: "done", summary: `fls finished: ${entries.length} entries.` });
39
+ });
40
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "forensics",
3
+ "core_api": "^0.1.0",
4
+ "description": "Lists files in a disk image with The Sleuth Kit fls and reports the entries found.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "fls",
9
+ "install_hint": "Install The Sleuth Kit from your distribution packages.",
10
+ "name": "The Sleuth Kit"
11
+ }
12
+ ],
13
+ "id": "forensics/sleuthkit-fls",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "Sleuth Kit fls",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,39 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("ssh-audit", ["-j", target], { stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `ssh-audit failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ let report = null;
21
+ try {
22
+ report = JSON.parse(stdout);
23
+ } catch {
24
+ report = null;
25
+ }
26
+ if (code !== 0 && !report) {
27
+ emit({ type: "error", message: `ssh-audit failed: ${stderr.trim() || `exited with ${code}`}` });
28
+ process.exitCode = 1;
29
+ return;
30
+ }
31
+ const recommendations = Array.isArray(report?.recommendations) ? report.recommendations : [];
32
+ emit({
33
+ type: "result",
34
+ summary: `ssh-audit reported ${recommendations.length} recommendations for ${target}.`,
35
+ data: { target, banner: report?.banner ?? "", grade: report?.grade ?? "", recommendations: recommendations.slice(0, 100) },
36
+ });
37
+ emit({ type: "done", summary: `ssh-audit finished: ${recommendations.length} recommendations.` });
38
+ });
39
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "network",
3
+ "core_api": "^0.1.0",
4
+ "description": "Audits an SSH server with ssh-audit and reports the recommendations found.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "ssh-audit",
9
+ "install_hint": "Install ssh-audit from your distribution packages or with pipx install ssh-audit.",
10
+ "name": "ssh-audit"
11
+ }
12
+ ],
13
+ "id": "network/ssh-audit",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "ssh-audit",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -0,0 +1,46 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ let input = "";
4
+ process.stdin.setEncoding("utf8");
5
+ process.stdin.on("data", (chunk) => (input += chunk));
6
+ process.stdin.on("end", () => {
7
+ const request = JSON.parse(input || "{}");
8
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
9
+ const target = String(request.target ?? "");
10
+ const child = spawn("terraform", ["plan", "-no-color", "-input=false"], { cwd: target, stdio: ["ignore", "pipe", "pipe"] });
11
+ let stdout = "";
12
+ let stderr = "";
13
+ child.stdout.on("data", (chunk) => (stdout += chunk));
14
+ child.stderr.on("data", (chunk) => (stderr += chunk));
15
+ child.on("error", (error) => {
16
+ emit({ type: "error", message: `Terraform failed: ${error.message}` });
17
+ process.exitCode = 1;
18
+ });
19
+ child.on("close", (code) => {
20
+ const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
21
+ let add = 0;
22
+ let change = 0;
23
+ let destroy = 0;
24
+ let found = false;
25
+ const planMatch = plain.match(/Plan:\s+(\d+) to add, (\d+) to change, (\d+) to destroy/);
26
+ if (planMatch) {
27
+ add = Number(planMatch[1]);
28
+ change = Number(planMatch[2]);
29
+ destroy = Number(planMatch[3]);
30
+ found = true;
31
+ } else if (/No changes\./.test(plain)) {
32
+ found = true;
33
+ }
34
+ if (code !== 0 && !found) {
35
+ emit({ type: "error", message: `Terraform failed: ${stderr.trim() || `exited with ${code}`}` });
36
+ process.exitCode = 1;
37
+ return;
38
+ }
39
+ emit({
40
+ type: "result",
41
+ summary: `Terraform plan: ${add} to add, ${change} to change, ${destroy} to destroy.`,
42
+ data: { target, add, change, destroy },
43
+ });
44
+ emit({ type: "done", summary: `Terraform plan finished: ${add} to add, ${change} to change, ${destroy} to destroy.` });
45
+ });
46
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "automation",
3
+ "core_api": "^0.1.0",
4
+ "description": "Runs terraform plan in a directory and reports the planned changes.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "terraform",
9
+ "install_hint": "Install Terraform from your distribution packages or the HashiCorp releases.",
10
+ "name": "Terraform"
11
+ }
12
+ ],
13
+ "id": "automation/terraform",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "Terraform Plan",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }