cantarella-framework 1.17.0 → 1.19.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 (60) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/modules/api-burp-import/index.mjs +45 -0
  3. package/modules/api-burp-import/module.json +14 -0
  4. package/modules/code-audit-codeql-import/index.mjs +46 -0
  5. package/modules/code-audit-codeql-import/module.json +14 -0
  6. package/modules/forensics-autopsy-import/index.mjs +42 -0
  7. package/modules/forensics-autopsy-import/module.json +14 -0
  8. package/modules/internal-bloodhound-import/index.mjs +43 -0
  9. package/modules/internal-bloodhound-import/module.json +14 -0
  10. package/modules/mobile-mobsf-import/index.mjs +45 -0
  11. package/modules/mobile-mobsf-import/module.json +14 -0
  12. package/modules/wrapper-aapt/index.mjs +56 -0
  13. package/modules/wrapper-aapt/module.json +21 -0
  14. package/modules/wrapper-bettercap/index.mjs +41 -0
  15. package/modules/wrapper-bettercap/module.json +21 -0
  16. package/modules/wrapper-bulk-extractor/index.mjs +60 -0
  17. package/modules/wrapper-bulk-extractor/module.json +21 -0
  18. package/modules/wrapper-cloudsploit/index.mjs +61 -0
  19. package/modules/wrapper-cloudsploit/module.json +21 -0
  20. package/modules/wrapper-cupp/index.mjs +48 -0
  21. package/modules/wrapper-cupp/module.json +40 -0
  22. package/modules/wrapper-eslint/index.mjs +53 -0
  23. package/modules/wrapper-eslint/module.json +21 -0
  24. package/modules/wrapper-frida/index.mjs +41 -0
  25. package/modules/wrapper-frida/module.json +21 -0
  26. package/modules/wrapper-grype/index.mjs +48 -0
  27. package/modules/wrapper-grype/module.json +21 -0
  28. package/modules/wrapper-impacket/index.mjs +41 -0
  29. package/modules/wrapper-impacket/module.json +34 -0
  30. package/modules/wrapper-kismet/index.mjs +45 -0
  31. package/modules/wrapper-kismet/module.json +21 -0
  32. package/modules/wrapper-kiterunner/index.mjs +41 -0
  33. package/modules/wrapper-kiterunner/module.json +21 -0
  34. package/modules/wrapper-kube-hunter/index.mjs +44 -0
  35. package/modules/wrapper-kube-hunter/module.json +21 -0
  36. package/modules/wrapper-ldapdomaindump/index.mjs +48 -0
  37. package/modules/wrapper-ldapdomaindump/module.json +40 -0
  38. package/modules/wrapper-recon-ng/index.mjs +40 -0
  39. package/modules/wrapper-recon-ng/module.json +21 -0
  40. package/modules/wrapper-ripgrep/index.mjs +42 -0
  41. package/modules/wrapper-ripgrep/module.json +28 -0
  42. package/modules/wrapper-scoutsuite/index.mjs +61 -0
  43. package/modules/wrapper-scoutsuite/module.json +21 -0
  44. package/modules/wrapper-spiderfoot/index.mjs +44 -0
  45. package/modules/wrapper-spiderfoot/module.json +21 -0
  46. package/modules/wrapper-syft/index.mjs +43 -0
  47. package/modules/wrapper-syft/module.json +21 -0
  48. package/modules/wrapper-testssl/index.mjs +50 -0
  49. package/modules/wrapper-testssl/module.json +21 -0
  50. package/modules/wrapper-tfsec/index.mjs +43 -0
  51. package/modules/wrapper-tfsec/module.json +21 -0
  52. package/modules/wrapper-trufflehog/index.mjs +49 -0
  53. package/modules/wrapper-trufflehog/module.json +21 -0
  54. package/modules/wrapper-tshark/index.mjs +41 -0
  55. package/modules/wrapper-tshark/module.json +21 -0
  56. package/modules/wrapper-zap/index.mjs +44 -0
  57. package/modules/wrapper-zap/module.json +21 -0
  58. package/package.json +1 -1
  59. package/packages/cli/dist/cli.js +1 -1
  60. package/packages/gui/dist/server.js +2 -2
@@ -0,0 +1,44 @@
1
+ import { spawn } from "node:child_process";
2
+ import { mkdtemp, readFile } from "node:fs/promises";
3
+ import { tmpdir } from "node:os";
4
+ import { join } from "node:path";
5
+
6
+ let input = "";
7
+ process.stdin.setEncoding("utf8");
8
+ process.stdin.on("data", (chunk) => (input += chunk));
9
+ process.stdin.on("end", async () => {
10
+ const request = JSON.parse(input || "{}");
11
+ const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
12
+ const target = String(request.target ?? "");
13
+ const dir = await mkdtemp(join(tmpdir(), "cantarella-zap-"));
14
+ const report = join(dir, "report.html");
15
+ const child = spawn("zap.sh", ["-cmd", "-quickurl", target, "-quickout", report], { stdio: ["ignore", "pipe", "pipe"] });
16
+ let stdout = "";
17
+ let stderr = "";
18
+ child.stdout.on("data", (chunk) => (stdout += chunk));
19
+ child.stderr.on("data", (chunk) => (stderr += chunk));
20
+ child.on("error", (error) => {
21
+ emit({ type: "error", message: `OWASP ZAP failed: ${error.message}` });
22
+ process.exitCode = 1;
23
+ });
24
+ child.on("close", async (code) => {
25
+ let html = "";
26
+ try {
27
+ html = await readFile(report, "utf8");
28
+ } catch {
29
+ html = "";
30
+ }
31
+ const alerts = (html.match(/<tr>/gi) ?? []).length;
32
+ if (code !== 0 && !alerts && !html.trim()) {
33
+ emit({ type: "error", message: `OWASP ZAP failed: ${stderr.trim() || `exited with ${code}`}` });
34
+ process.exitCode = 1;
35
+ return;
36
+ }
37
+ emit({
38
+ type: "result",
39
+ summary: `OWASP ZAP found ${alerts} alerts on ${target}.`,
40
+ data: { target, alerts, report },
41
+ });
42
+ emit({ type: "done", summary: `OWASP ZAP finished: ${alerts} alerts.` });
43
+ });
44
+ });
@@ -0,0 +1,21 @@
1
+ {
2
+ "category": "web",
3
+ "core_api": "^0.1.0",
4
+ "description": "Runs an OWASP ZAP quick scan on a URL and reports the alerts it found.",
5
+ "entry": "index.mjs",
6
+ "external_tools": [
7
+ {
8
+ "command": "zap.sh",
9
+ "install_hint": "Install OWASP ZAP from your distribution packages or the ZAP releases.",
10
+ "name": "OWASP ZAP"
11
+ }
12
+ ],
13
+ "id": "web/zap",
14
+ "kind": "wrapper",
15
+ "maintenance": "active",
16
+ "name": "OWASP ZAP",
17
+ "options": [],
18
+ "risk": "medium",
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.17.0",
22
+ "version": "1.19.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.17.0";
14
+ const VERSION = "1.19.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.17.0",
82
- update_message: (await checkForUpdate("1.17.0")).message,
81
+ version: "1.19.0",
82
+ update_message: (await checkForUpdate("1.19.0")).message,
83
83
  categories: CATEGORIES,
84
84
  modules: modules.map(({ manifest }) => manifest),
85
85
  external_tools: [...tools.values()],