@aryaminus/controlkeel 0.3.63 → 0.3.66
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 +6 -4
- package/SECURITY.md +9 -6
- package/lib/install.js +20 -9
- package/package.json +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This package is a bootstrap installer for the native ControlKeel CLI.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The npm and GitHub Packages channels use the same bootstrap package when published. The native binary is downloaded from the matching versioned GitHub Release on first use, not during installation.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ npx @aryaminus/controlkeel@latest
|
|
|
17
17
|
|
|
18
18
|
The package installs the `controlkeel` command. The native binary is automatically downloaded on first use.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Companion package names used by supported host install paths:
|
|
21
21
|
|
|
22
22
|
- [`@aryaminus/controlkeel-opencode`](https://www.npmjs.com/package/@aryaminus/controlkeel-opencode) for OpenCode plugin installs
|
|
23
23
|
- [`@aryaminus/controlkeel-pi-extension`](https://www.npmjs.com/package/@aryaminus/controlkeel-pi-extension) for Pi extension installs
|
|
@@ -29,6 +29,8 @@ Main project docs:
|
|
|
29
29
|
- [Agent integrations](https://github.com/aryaminus/controlkeel/blob/main/docs/agent-integrations.md)
|
|
30
30
|
- [Support matrix](https://github.com/aryaminus/controlkeel/blob/main/docs/support-matrix.md)
|
|
31
31
|
|
|
32
|
+
After the first run, complete the repo-local path with `controlkeel setup`, `controlkeel attach <host>`, `controlkeel attach doctor`, `controlkeel provider doctor`, `controlkeel status`, and `controlkeel findings`.
|
|
33
|
+
|
|
32
34
|
You can also install the same bootstrap package from GitHub Packages:
|
|
33
35
|
|
|
34
36
|
```bash
|
|
@@ -42,12 +44,12 @@ npm i -g @aryaminus/controlkeel --registry=https://npm.pkg.github.com
|
|
|
42
44
|
This package uses a lazy download model for maximum security:
|
|
43
45
|
|
|
44
46
|
- No install scripts (removed postinstall)
|
|
45
|
-
-
|
|
47
|
+
- Fixed release repository and package version; environment flags cannot redirect the download source
|
|
46
48
|
- Plain GitHub Release URLs for transparent scanner and reviewer visibility
|
|
47
49
|
- SHA-256 checksum verification for all downloads
|
|
48
50
|
|
|
49
51
|
The native binary is downloaded on first use rather than during installation. For detailed information about security practices, see [SECURITY.md](SECURITY.md).
|
|
50
52
|
|
|
51
|
-
For manual installation, download the binary from [GitHub Releases](https://github.com/aryaminus/controlkeel/releases/latest)
|
|
53
|
+
For manual installation, download the matching binary and checksum from [GitHub Releases](https://github.com/aryaminus/controlkeel/releases/latest). Release bundles or manifests may support local plugin installation, but they do not imply publication in a host's public marketplace.
|
|
52
54
|
|
|
53
55
|
<!-- mcp-name: io.github.aryaminus/controlkeel -->
|
package/SECURITY.md
CHANGED
|
@@ -25,8 +25,9 @@ The package uses a **lazy download model** - the native binary is downloaded on
|
|
|
25
25
|
1. User runs `controlkeel` or imports the package programmatically
|
|
26
26
|
2. Installer detects platform (OS and architecture) using Node.js built-ins
|
|
27
27
|
3. Downloads appropriate binary from official GitHub Releases
|
|
28
|
-
4. Verifies SHA-256 checksum against release's `
|
|
29
|
-
5.
|
|
28
|
+
4. Verifies SHA-256 checksum against the release's `controlkeel-checksums.txt`
|
|
29
|
+
5. Verifies the keyless cosign signature when cosign is available; set `CONTROLKEEL_REQUIRE_SIGNATURE=1` to fail closed when signature material is unavailable
|
|
30
|
+
6. Caches binary locally for subsequent uses
|
|
30
31
|
|
|
31
32
|
**Supported Platforms**
|
|
32
33
|
|
|
@@ -43,7 +44,7 @@ The package uses a **lazy download model** - the native binary is downloaded on
|
|
|
43
44
|
| Measure | Implementation | Threat Mitigated |
|
|
44
45
|
|---------|---------------|------------------|
|
|
45
46
|
| No Install Scripts | Removed all `postinstall` and lifecycle scripts | Code execution during install |
|
|
46
|
-
|
|
|
47
|
+
| Fixed Download Source | Repository and package version cannot be overridden | Configuration-based redirect attacks |
|
|
47
48
|
| Plain URLs | Plaintext, auditable URL strings (base64 removed) | Auditability; no hidden network destinations |
|
|
48
49
|
| Hardcoded Repository | Fixed to `aryaminus/controlkeel` | Repository redirect attacks |
|
|
49
50
|
| HTTPS Only | All downloads use HTTPS | Man-in-the-middle attacks |
|
|
@@ -53,7 +54,7 @@ The package uses a **lazy download model** - the native binary is downloaded on
|
|
|
53
54
|
|
|
54
55
|
### Configuration
|
|
55
56
|
|
|
56
|
-
**Hardcoded
|
|
57
|
+
**Hardcoded download values** (cannot be overridden):
|
|
57
58
|
|
|
58
59
|
- Repository: `aryaminus/controlkeel`
|
|
59
60
|
- Version: Matched to package.json version
|
|
@@ -66,6 +67,8 @@ The package uses a **lazy download model** - the native binary is downloaded on
|
|
|
66
67
|
- `CONTROLKEEL_SKIP_DOWNLOAD` - Skip auto-download
|
|
67
68
|
- `CONTROLKEEL_ALLOW_CUSTOM_SOURCE` - Custom source guard
|
|
68
69
|
|
|
70
|
+
`CONTROLKEEL_SKIP_SIGNATURE` and `CONTROLKEEL_REQUIRE_SIGNATURE` only control optional cosign verification. SHA-256 verification is mandatory in the npm bootstrap and cannot be disabled.
|
|
71
|
+
|
|
69
72
|
**Rationale**: Hardcoding eliminates attack vectors from environment variable manipulation or configuration redirection.
|
|
70
73
|
|
|
71
74
|
---
|
|
@@ -83,8 +86,8 @@ The package uses a **lazy download model** - the native binary is downloaded on
|
|
|
83
86
|
|
|
84
87
|
- **Status**: ✅ RESOLVED
|
|
85
88
|
- **Original Issue**: Package accessed `process.env.CONTROLKEEL_*` variables
|
|
86
|
-
- **Resolution**: Removed
|
|
87
|
-
- **Verification**:
|
|
89
|
+
- **Resolution**: Removed environment overrides for the repository, version, and download source; those values are hardcoded
|
|
90
|
+
- **Verification**: Download URL construction does not read environment variables
|
|
88
91
|
|
|
89
92
|
### Alert: URL Strings
|
|
90
93
|
|
package/lib/install.js
CHANGED
|
@@ -232,18 +232,29 @@ async function ensureBinary({ forceDownload = false } = {}) {
|
|
|
232
232
|
|
|
233
233
|
ensureVendorDir();
|
|
234
234
|
const asset = assetName();
|
|
235
|
-
const tempPath =
|
|
235
|
+
const tempPath = `${destination}.${process.pid}.tmp`;
|
|
236
236
|
const url = `${releaseBaseUrl()}/${asset}`;
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
238
|
+
try {
|
|
239
|
+
await download(url, tempPath);
|
|
240
|
+
await verifyChecksum(tempPath, asset);
|
|
241
|
+
await verifySignature(tempPath, asset, releaseBaseUrl());
|
|
242
|
+
|
|
243
|
+
// On Windows, fs.renameSync can fail if the destination already exists
|
|
244
|
+
// (e.g. forced refresh). Fall back to copy+unlink for atomic-ish replace.
|
|
245
|
+
try {
|
|
246
|
+
fs.renameSync(tempPath, destination);
|
|
247
|
+
} catch (renameErr) {
|
|
248
|
+
if (!fs.existsSync(destination)) throw renameErr;
|
|
249
|
+
fs.copyFileSync(tempPath, destination);
|
|
250
|
+
fs.rmSync(tempPath, { force: true });
|
|
251
|
+
}
|
|
244
252
|
|
|
245
|
-
|
|
246
|
-
|
|
253
|
+
if (process.platform !== "win32") {
|
|
254
|
+
fs.chmodSync(destination, 0o755);
|
|
255
|
+
}
|
|
256
|
+
} finally {
|
|
257
|
+
fs.rmSync(tempPath, { force: true });
|
|
247
258
|
}
|
|
248
259
|
|
|
249
260
|
return destination;
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"url": "https://github.com/aryaminus/controlkeel.git",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.3.
|
|
10
|
+
"version": "0.3.66",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@aryaminus/controlkeel",
|
|
15
|
-
"version": "0.3.
|
|
15
|
+
"version": "0.3.66",
|
|
16
16
|
"runtimeHint": "npx",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|