cantarella-framework 1.10.0 → 1.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
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.11.0
4
+
5
+ - New modules: Gobuster path brute forcing, Assetfinder subdomain enumeration, ssh-audit server audits, kube-bench Kubernetes benchmarks, Flawfinder C/C++ audits, AlienVault OTX threat lookups, URL parsing, gau archived URL listing, Sleuth Kit fls disk listings, and access log parsing.
6
+
3
7
  ## 1.10.0
4
8
 
5
9
  - New modules: wafw00f WAF detection, Subfinder subdomain enumeration, Hashcat hash cracking, ClamAV malware scans, printable strings extraction, base64/hex/URL conversion, Gitleaks secret scanning, Nessus import, Apktool APK decoding, and waybackurls archived URL listing.
@@ -0,0 +1,42 @@
1
+ import { readFileSync } from "node:fs";
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
+ try {
10
+ const result = parseLog(String(request.target ?? ""));
11
+ emit({ type: "result", summary: result.summary, data: result.data });
12
+ emit({ type: "done", summary: `Log parsing finished: ${result.data.total} entries.` });
13
+ } catch (error) {
14
+ emit({ type: "error", message: error.message });
15
+ process.exitCode = 1;
16
+ }
17
+ });
18
+
19
+ function parseLog(target) {
20
+ let raw;
21
+ try {
22
+ raw = readFileSync(target, "utf8");
23
+ } catch {
24
+ throw new Error(`Cannot read log file: ${target}.`);
25
+ }
26
+ const entries = [];
27
+ const byStatus = { "2xx": 0, "3xx": 0, "4xx": 0, "5xx": 0, other: 0 };
28
+ for (const line of raw.split("\n")) {
29
+ const trimmed = line.trim();
30
+ if (!trimmed) continue;
31
+ const match = trimmed.match(/^(\S+) \S+ \S+ \[([^\]]+)\] "(\S+) (\S+) [^"]*" (\d{3}) (\S+)/);
32
+ if (!match) continue;
33
+ const status = Number(match[5]);
34
+ const bucket = status >= 200 && status < 300 ? "2xx" : status >= 300 && status < 400 ? "3xx" : status >= 400 && status < 500 ? "4xx" : status >= 500 && status < 600 ? "5xx" : "other";
35
+ byStatus[bucket] += 1;
36
+ entries.push({ ip: match[1], time: match[2], method: match[3], path: match[4], status, size: match[6] === "-" ? null : Number(match[6]) });
37
+ }
38
+ return {
39
+ summary: `Parsed ${entries.length} log entries from ${target}.`,
40
+ data: { file: target, total: entries.length, by_status: byStatus, entries: entries.slice(0, 200) },
41
+ };
42
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "category": "incident-response",
3
+ "core_api": "^0.1.0",
4
+ "description": "Parses web server access log lines into structured entries with status counts.",
5
+ "entry": "index.mjs",
6
+ "id": "incident-response/log-parser",
7
+ "kind": "native",
8
+ "maintenance": "active",
9
+ "name": "Log Parser",
10
+ "options": [],
11
+ "risk": "low",
12
+ "schema_version": 1,
13
+ "version": "0.1.0"
14
+ }
@@ -0,0 +1,40 @@
1
+ let input = "";
2
+ process.stdin.setEncoding("utf8");
3
+ process.stdin.on("data", (chunk) => (input += chunk));
4
+ process.stdin.on("end", () => {
5
+ const request = JSON.parse(input || "{}");
6
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
7
+ try {
8
+ const result = parseUrl(String(request.target ?? ""));
9
+ emit({ type: "result", summary: result.summary, data: result.data });
10
+ emit({ type: "done", summary: `URL parsing finished: ${result.data.host}.` });
11
+ } catch (error) {
12
+ emit({ type: "error", message: error.message });
13
+ process.exitCode = 1;
14
+ }
15
+ });
16
+
17
+ function parseUrl(target) {
18
+ let parsed;
19
+ try {
20
+ parsed = new URL(target.trim());
21
+ } catch {
22
+ throw new Error(`Invalid input: expected a URL such as https://example.com/path, got ${target}.`);
23
+ }
24
+ const query = {};
25
+ for (const [key, value] of parsed.searchParams.entries()) {
26
+ query[key] = value;
27
+ }
28
+ return {
29
+ summary: `${parsed.protocol}//${parsed.host}${parsed.pathname}`,
30
+ data: {
31
+ input: target,
32
+ scheme: parsed.protocol.replace(":", ""),
33
+ host: parsed.hostname,
34
+ port: parsed.port ? Number(parsed.port) : null,
35
+ path: parsed.pathname,
36
+ query,
37
+ fragment: parsed.hash ? parsed.hash.slice(1) : "",
38
+ },
39
+ };
40
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "category": "lab",
3
+ "core_api": "^0.1.0",
4
+ "description": "Parses a URL into scheme, host, port, path, query parameters, and fragment.",
5
+ "entry": "index.mjs",
6
+ "id": "lab/url-parser",
7
+ "kind": "native",
8
+ "maintenance": "active",
9
+ "name": "URL Parser",
10
+ "options": [],
11
+ "risk": "info",
12
+ "schema_version": 1,
13
+ "version": "0.1.0"
14
+ }
@@ -0,0 +1,35 @@
1
+ let input = "";
2
+ process.stdin.setEncoding("utf8");
3
+ process.stdin.on("data", (chunk) => (input += chunk));
4
+ process.stdin.on("end", () => {
5
+ const request = JSON.parse(input || "{}");
6
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
7
+ lookup(String(request.target ?? ""), emit).catch((error) => {
8
+ emit({ type: "error", message: error.message });
9
+ process.exitCode = 1;
10
+ });
11
+ });
12
+
13
+ async function lookup(target, emit) {
14
+ const apiKey = process.env.CANTA_OTX_API_KEY ?? "";
15
+ if (!apiKey) {
16
+ throw new Error("OTX lookup needs an API key: set CANTA_OTX_API_KEY.");
17
+ }
18
+ const base = (process.env.CANTA_OTX_API_URL ?? "https://otx.alienvault.com/api/v1").replace(/\/$/, "");
19
+ const isIp = /^\d+\.\d+\.\d+\.\d+$/.test(target);
20
+ const kind = isIp ? "IPv4" : "domain";
21
+ const url = `${base}/indicators/${kind}/${encodeURIComponent(target)}/general`;
22
+ const response = await fetch(url, { headers: { "X-OTX-API-KEY": apiKey } });
23
+ if (!response.ok) {
24
+ throw new Error(`OTX lookup failed: HTTP ${response.status} for ${target}.`);
25
+ }
26
+ const report = await response.json();
27
+ const pulses = Array.isArray(report.pulse_info?.pulses) ? report.pulse_info.pulses : [];
28
+ const count = Number(report.pulse_info?.count ?? pulses.length);
29
+ emit({
30
+ type: "result",
31
+ summary: count ? `${target} appears in ${count} OTX pulses.` : `${target} appears in no OTX pulses.`,
32
+ data: { target, type: kind, pulses: count, pulse_names: pulses.slice(0, 20).map((pulse) => pulse.name ?? "") },
33
+ });
34
+ emit({ type: "done", summary: `OTX lookup finished: ${count} pulses.` });
35
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "category": "threat-intel",
3
+ "core_api": "^0.1.0",
4
+ "description": "Looks up an IP or domain in AlienVault OTX and reports the threat pulses that mention it.",
5
+ "entry": "index.mjs",
6
+ "id": "threat-intel/otx",
7
+ "kind": "native",
8
+ "maintenance": "active",
9
+ "name": "OTX Lookup",
10
+ "options": [],
11
+ "risk": "low",
12
+ "schema_version": 1,
13
+ "version": "0.1.0"
14
+ }
@@ -0,0 +1,42 @@
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("assetfinder", ["--subs-only", 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: `Assetfinder 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 subdomains = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ if (!trimmed) continue;
25
+ if (!/^[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(trimmed)) continue;
26
+ if (trimmed === target) continue;
27
+ if (!trimmed.endsWith(`.${target}`)) continue;
28
+ subdomains.push(trimmed);
29
+ }
30
+ if (code !== 0 && !subdomains.length) {
31
+ emit({ type: "error", message: `Assetfinder failed: ${stderr.trim() || `exited with ${code}`}` });
32
+ process.exitCode = 1;
33
+ return;
34
+ }
35
+ emit({
36
+ type: "result",
37
+ summary: `Assetfinder found ${subdomains.length} subdomains for ${target}.`,
38
+ data: { target, subdomains: [...new Set(subdomains)].slice(0, 500) },
39
+ });
40
+ emit({ type: "done", summary: `Assetfinder finished: ${subdomains.length} subdomains.` });
41
+ });
42
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "recon",
3
+ "core_api": "^0.1.0",
4
+ "description": "Enumerates subdomains for a domain with Assetfinder and reports the subdomains found.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "assetfinder",
9
+ "install_hint": "Install Assetfinder with go install github.com/tomnomnom/assetfinder@latest.",
10
+ "name": "Assetfinder"
11
+ }
12
+ ],
13
+ "id": "recon/assetfinder",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "Assetfinder",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -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("flawfinder", [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: `Flawfinder 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 findings = [];
22
+ for (const line of plain.split("\n")) {
23
+ const trimmed = line.trim();
24
+ const match = trimmed.match(/^(.*?):(\d+):\s+\[(\d+)\]\s+\(([^)]+)\)\s+(.+)$/);
25
+ if (!match) continue;
26
+ findings.push({ file: match[1], line: Number(match[2]), level: Number(match[3]), category: match[4], description: match[5].trim() });
27
+ }
28
+ if (code !== 0 && !findings.length) {
29
+ emit({ type: "error", message: `Flawfinder failed: ${stderr.trim() || `exited with ${code}`}` });
30
+ process.exitCode = 1;
31
+ return;
32
+ }
33
+ emit({
34
+ type: "result",
35
+ summary: `Flawfinder found ${findings.length} risky calls in ${target}.`,
36
+ data: { target, total: findings.length, findings: findings.slice(0, 100) },
37
+ });
38
+ emit({ type: "done", summary: `Flawfinder finished: ${findings.length} risky calls.` });
39
+ });
40
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "code-audit",
3
+ "core_api": "^0.1.0",
4
+ "description": "Audits C and C++ code with Flawfinder and reports the risky calls found.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "flawfinder",
9
+ "install_hint": "Install Flawfinder from your distribution packages or with pipx install flawfinder.",
10
+ "name": "Flawfinder"
11
+ }
12
+ ],
13
+ "id": "code-audit/flawfinder",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "Flawfinder",
17
+ "options": [],
18
+ "risk": "low",
19
+ "schema_version": 1,
20
+ "version": "0.1.0"
21
+ }
@@ -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,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
+ }
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "release:notes": "node scripts/release-notes.mjs"
20
20
  },
21
21
  "type": "module",
22
- "version": "1.10.0",
22
+ "version": "1.11.0",
23
23
  "workspaces": [
24
24
  "packages/*"
25
25
  ],
@@ -11,7 +11,7 @@ process.stdout.on("error", (error) => {
11
11
  process.exit(0);
12
12
  throw error;
13
13
  });
14
- const VERSION = "1.10.0";
14
+ const VERSION = "1.11.0";
15
15
  const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../..");
16
16
  function banner() {
17
17
  return (process.stdout.columns ?? 80) >= 72 ? BANNER : COMPACT_BANNER;
@@ -78,8 +78,8 @@ export function createGuiServer(root) {
78
78
  }
79
79
  }
80
80
  sendJson(response, 200, {
81
- version: "1.10.0",
82
- update_message: (await checkForUpdate("1.10.0")).message,
81
+ version: "1.11.0",
82
+ update_message: (await checkForUpdate("1.11.0")).message,
83
83
  categories: CATEGORIES,
84
84
  modules: modules.map(({ manifest }) => manifest),
85
85
  external_tools: [...tools.values()],