@memrov2/pentcloud-recon 0.1.0 → 0.1.1-dev.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/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # PentCloud tools
2
2
 
3
+ [![Quality](https://github.com/Memrov/PentCloud-tools/actions/workflows/quality.yml/badge.svg)](https://github.com/Memrov/PentCloud-tools/actions/workflows/quality.yml)
4
+ [![codecov](https://codecov.io/gh/Memrov/PentCloud-tools/branch/main/graph/badge.svg)](https://app.codecov.io/gh/Memrov/PentCloud-tools)
5
+ [![npm](https://badgen.net/npm/v/@memrov2/pentcloud-recon)](https://www.npmjs.com/package/@memrov2/pentcloud-recon)
6
+ [![Adapter license: MIT](https://badgen.net/static/adapter%20license/MIT/blue)](LICENSE)
7
+
3
8
  Small, versioned tool runtimes for Cloudflare. The first package, **`@memrov2/pentcloud-recon`**, runs the original httpx, dnsx, Katana and Subfinder binaries together in one lightweight Linux container.
4
9
 
5
10
  Each tool is callable separately. Cloudflare Workflows can orchestrate the calls, or an agent harness can call the same Durable Object binding. This repository does not deploy or modify the PentCloud application.
@@ -73,7 +78,7 @@ Version `0.1.0` identifies the recon pack and its SDK contract. `tools.lock.json
73
78
 
74
79
  Pin the npm package and container image digest together. The runner checks the image's release manifest before executing commands and rejects a mismatched running image. Finish active runs before upgrading their SDK/image pair; retain prior images and matching adapters for retries and rollback. Publishing a package does not deploy it to customer accounts or replace a running container.
75
80
 
76
- To prepare a release: update the package/lock versions together, run the tests and Cloudflare smoke check, build the image, inspect `npm pack --dry-run`, and attach the verified npm tarball, image archive and SHA-256 checksums to the release. Authentication belongs in native CLI login or a secret store, never source files. No GitHub Actions are configured.
81
+ To prepare a release: update the package/lock versions together, run the tests and Cloudflare smoke check, build the image, inspect `npm pack --dry-run`, and attach the verified npm tarball, image archive and SHA-256 checksums to the release. Authentication belongs in native CLI login or a secret store, never source files. GitHub Actions runs synthetic quality checks only; publishing uses the maintainer’s local npm authentication. No scanners or assessments run in Actions.
77
82
 
78
83
  ## Limits and safety
79
84
 
@@ -94,3 +99,15 @@ The runtime supports Linux/amd64 on Cloudflare Containers. It does not make thes
94
99
  - [Third-party notices](THIRD_PARTY_NOTICES.md)
95
100
 
96
101
  MIT license for the PentCloud adapter. Included executables and base-image packages retain their upstream licenses.
102
+
103
+ ## Tool-pack inventory and quality
104
+
105
+ See [tool packs and agent capabilities](docs/tool-packs.md) for the current Kali interface inventory, the needs of each agent, and the proposed next bundles. Candidate tools are clearly separated from released support.
106
+
107
+ Run `npm run coverage` after the development setup in [testing and coverage](docs/testing.md). Reports use standard Node LCOV, Go coverprofile and Python Cobertura formats. The public Quality workflow runs these synthetic tests and uploads explicit coverage reports to Codecov. Cloud account, npm publishing and target credentials are not available to the workflow.
108
+
109
+ The [release table](docs/releases.md) lists the npm SDKs and their image-distribution requirements. [HTTP, Nuclei and SQLmap](docs/bundles.md) and [the other tool families](docs/remaining-bundles.md) each have their own pinned image and bounded interface. Browser automation stays with managed Browser Run. These profiles do not replace every Kali operation.
110
+
111
+ ## Named instance presets (development)
112
+
113
+ The next SDK version uses Cloudflare's named Container presets. Most bounded packs start on `lite`; recon, password and Metasploit use `standard-1`. `ready()` verifies and prepares a runtime without executing a scanner. Actual tool execution still waits for readiness and verifies the image manifest. SDK-only lifecycle/sizing updates can retain the same tool lock and image when their executable payload and image manifest are unchanged. Released SDK versions remain immutable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memrov2/pentcloud-recon",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-dev.0",
4
4
  "description": "A small Cloudflare-native runtime for httpx, dnsx, Katana and Subfinder",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -31,7 +31,11 @@
31
31
  "image:build": "node scripts/build-image.mjs",
32
32
  "prepublishOnly": "npm test && npm run test:runner && npm run test:image && npm run typecheck",
33
33
  "typecheck": "wrangler types --config examples/cloudflare/wrangler.jsonc .cache/worker-types.d.ts && tsc --noEmit --strict --skipLibCheck --module nodenext --moduleResolution nodenext --target es2022 .cache/worker-types.d.ts test/types.ts",
34
- "test:image": "python3 -m unittest discover -s test -p \"*_test.py\""
34
+ "test:image": "python3 -m unittest discover -s test -p \"*_test.py\"",
35
+ "coverage": "node scripts/coverage.mjs",
36
+ "test:bundles": "node --test test/packs.test.mjs test/pack-runtime.test.mjs",
37
+ "image:pack": "python3 scripts/prepare-pack.py",
38
+ "image:pack:build": "node scripts/build-pack.mjs"
35
39
  },
36
40
  "engines": {
37
41
  "node": ">=22"
@@ -42,5 +46,8 @@
42
46
  "devDependencies": {
43
47
  "typescript": "5.9.3",
44
48
  "wrangler": "4.157.0"
45
- }
49
+ },
50
+ "workspaces": [
51
+ "packages/*"
52
+ ]
46
53
  }
package/src/worker.d.mts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { DurableObject } from "cloudflare:workers";
2
2
  import type { ReconRequest, ReconResult } from "./index.mjs";
3
3
  export declare class ReconRunner extends DurableObject {
4
+ ready(): Promise<{ image: string; instance: "standard-1"; readyMs: number }>;
4
5
  run(request: ReconRequest): Promise<ReconResult & { readyMs: number }>;
6
+ retire(): Promise<{ stopped: boolean; retired: true }>;
5
7
  stop(): Promise<{ stopped: boolean }>;
6
8
  }
package/src/worker.mjs CHANGED
@@ -28,6 +28,7 @@ export class ReconRunner extends DurableObject {
28
28
  return result;
29
29
  }
30
30
  async #ready() {
31
+ if (await this.ctx.storage.get("retired")) throw new Error("Owned tool runtime is retired");
31
32
  const container = this.ctx.container,
32
33
  image = container.images.recon,
33
34
  start = Date.now();
@@ -41,7 +42,7 @@ export class ReconRunner extends DurableObject {
41
42
  } else
42
43
  container.start({
43
44
  image,
44
- instance: { vcpu: 1, memoryMib: 512, diskMb: 2000 },
45
+ instance: "standard-1",
45
46
  enableInternet: true,
46
47
  labels: { pack: "recon", version: packVersion },
47
48
  });
@@ -90,7 +91,10 @@ export class ReconRunner extends DurableObject {
90
91
  const info = await container.inspect();
91
92
  if (info?.image !== image)
92
93
  throw new Error("Unable to verify recon image identity");
93
- return { image, readyMs: Date.now() - start };
94
+ return { image, instance: "standard-1", readyMs: Date.now() - start };
95
+ }
96
+ ready() {
97
+ return this.#serialize(() => this.#ready());
94
98
  }
95
99
  run(input) {
96
100
  const command = buildCommand(input);
@@ -129,6 +133,13 @@ export class ReconRunner extends DurableObject {
129
133
  };
130
134
  });
131
135
  }
136
+ retire() {
137
+ return this.#serialize(async () => {
138
+ await this.ctx.storage.put("retired", true);
139
+ if (this.ctx.container.running) await this.ctx.container.destroy();
140
+ return { stopped: !this.ctx.container.running, retired: true };
141
+ });
142
+ }
132
143
  stop() {
133
144
  return this.#serialize(async () => {
134
145
  if (this.ctx.container.running) await this.ctx.container.destroy();