@agenthead/security 0.0.0-stage → 0.3.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/LICENSE +201 -0
- package/README.md +12 -2
- package/THIRD_PARTY_NOTICES.md +403 -0
- package/dist/adapters.d.ts +21 -0
- package/dist/adapters.js +230 -0
- package/dist/adapters.js.map +1 -0
- package/dist/audit.d.ts +29 -0
- package/dist/audit.js +126 -0
- package/dist/audit.js.map +1 -0
- package/dist/findings.d.ts +32 -0
- package/dist/findings.js +266 -0
- package/dist/findings.js.map +1 -0
- package/dist/fix.d.ts +17 -0
- package/dist/fix.js +432 -0
- package/dist/fix.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/runner.d.ts +32 -0
- package/dist/runner.js +189 -0
- package/dist/runner.js.map +1 -0
- package/dist/scope.d.ts +50 -0
- package/dist/scope.js +331 -0
- package/dist/scope.js.map +1 -0
- package/dist/security.d.ts +44 -0
- package/dist/security.js +440 -0
- package/dist/security.js.map +1 -0
- package/dist/tools.d.ts +15 -0
- package/dist/tools.js +100 -0
- package/dist/tools.js.map +1 -0
- package/dist/verification.d.ts +27 -0
- package/dist/verification.js +184 -0
- package/dist/verification.js.map +1 -0
- package/package.json +49 -4
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { lstatSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { SecretFilter } from "@agenthead/core";
|
|
4
|
+
import { audit } from "./audit.js";
|
|
5
|
+
import { digest, record } from "./findings.js";
|
|
6
|
+
import { cleanEnv, installed, invoke, scanWorkspace } from "./runner.js";
|
|
7
|
+
import { scopeHash } from "./scope.js";
|
|
8
|
+
function provenanceCheck(text, sha256, allowed) {
|
|
9
|
+
try {
|
|
10
|
+
let statement = record(JSON.parse(text));
|
|
11
|
+
if (statement.payload !== undefined) {
|
|
12
|
+
if (statement.payloadType !== "application/vnd.in-toto+json" ||
|
|
13
|
+
typeof statement.payload !== "string")
|
|
14
|
+
throw new Error("Expected an in-toto DSSE payload");
|
|
15
|
+
statement = record(JSON.parse(Buffer.from(statement.payload, "base64").toString("utf8")));
|
|
16
|
+
}
|
|
17
|
+
const v1 = statement.predicateType === "https://slsa.dev/provenance/v1";
|
|
18
|
+
if (![
|
|
19
|
+
"https://in-toto.io/Statement/v1",
|
|
20
|
+
"https://in-toto.io/Statement/v0.1",
|
|
21
|
+
].includes(String(statement._type)) ||
|
|
22
|
+
(!v1 && statement.predicateType !== "https://slsa.dev/provenance/v0.2"))
|
|
23
|
+
throw new Error("Expected an in-toto SLSA v1 or v0.2 statement");
|
|
24
|
+
const predicate = record(statement.predicate);
|
|
25
|
+
const builderId = record(v1 ? record(predicate.runDetails).builder : predicate.builder).id;
|
|
26
|
+
const subjectMatches = Array.isArray(statement.subject) &&
|
|
27
|
+
statement.subject.some((s) => record(record(s).digest).sha256 === sha256);
|
|
28
|
+
if (!subjectMatches)
|
|
29
|
+
throw new Error("SLSA subject SHA-256 does not match artifact");
|
|
30
|
+
if (typeof builderId !== "string" || !allowed.includes(builderId))
|
|
31
|
+
throw new Error("SLSA builder id is outside scope slsa.allowedBuilders");
|
|
32
|
+
return {
|
|
33
|
+
status: "passed",
|
|
34
|
+
builderId,
|
|
35
|
+
authenticated: false,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
return {
|
|
40
|
+
status: "failed",
|
|
41
|
+
reason: new SecretFilter().redact(String(error)),
|
|
42
|
+
authenticated: false,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** Verify immutable scoped copies, using the existing installed-tool and audit runner. */
|
|
47
|
+
export async function verifyArtifact(service, file, options) {
|
|
48
|
+
if (Object.keys(options).some((key) => !["bundle", "identity", "issuer", "attestation"].includes(key)))
|
|
49
|
+
throw new Error("Extra verification arguments are refused");
|
|
50
|
+
for (const value of [options.bundle, options.identity, options.issuer])
|
|
51
|
+
if (typeof value !== "string" ||
|
|
52
|
+
!value.trim() ||
|
|
53
|
+
[...value].some((char) => char.charCodeAt(0) < 32))
|
|
54
|
+
throw new Error("Verification requires --bundle, --identity and --issuer");
|
|
55
|
+
const guard = service.guard();
|
|
56
|
+
guard.tool("cosign");
|
|
57
|
+
const paths = [
|
|
58
|
+
file,
|
|
59
|
+
options.bundle,
|
|
60
|
+
...(options.attestation ? [options.attestation] : []),
|
|
61
|
+
].map((path) => guard.path(path));
|
|
62
|
+
// All verification inputs must be regular, bounded local files, never directories or URLs.
|
|
63
|
+
for (const path of paths) {
|
|
64
|
+
const stat = lstatSync(guard.boundary.resolveSource(path).absolutePath);
|
|
65
|
+
if (!stat.isFile() || stat.size > guard.scope.sandbox.maxOutputBytes)
|
|
66
|
+
throw new Error("Verification inputs must be regular files within the byte cap");
|
|
67
|
+
}
|
|
68
|
+
const trustedRoot = "security-sigstore/trusted_root.json";
|
|
69
|
+
let hasRoot = false;
|
|
70
|
+
try {
|
|
71
|
+
guard.path(trustedRoot);
|
|
72
|
+
const stat = lstatSync(guard.boundary.resolveSource(trustedRoot).absolutePath);
|
|
73
|
+
hasRoot = stat.isFile() && stat.size <= guard.scope.sandbox.maxOutputBytes;
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
/* Missing or out-of-scope trust material fails closed below. */
|
|
77
|
+
}
|
|
78
|
+
const w = scanWorkspace(guard, [...paths, ...(hasRoot ? [trustedRoot] : [])]);
|
|
79
|
+
try {
|
|
80
|
+
const inputs = Object.fromEntries(w.files.map((path) => [path, digest(readFileSync(join(w.cwd, path)))]));
|
|
81
|
+
if (paths.some((path) => !w.files.includes(path)))
|
|
82
|
+
throw new Error("Verification input omitted by source boundary");
|
|
83
|
+
const report = {
|
|
84
|
+
file: paths[0],
|
|
85
|
+
sha256: inputs[paths[0]],
|
|
86
|
+
inputs,
|
|
87
|
+
identity: options.identity,
|
|
88
|
+
issuer: options.issuer,
|
|
89
|
+
signature: { status: "unavailable", reason: "cosign is not installed" },
|
|
90
|
+
};
|
|
91
|
+
if (options.attestation)
|
|
92
|
+
report.provenance = provenanceCheck(readFileSync(join(w.cwd, paths[2]), "utf8"), report.sha256, guard.scope.slsa.allowedBuilders);
|
|
93
|
+
const binary = await (service.dependencies.findBinary ?? installed)("cosign", guard);
|
|
94
|
+
if (binary) {
|
|
95
|
+
report.signature = {
|
|
96
|
+
status: "failed",
|
|
97
|
+
reason: "Offline verification requires scoped security-sigstore/trusted_root.json; provision a trusted Sigstore root separately (no downloads are allowed)",
|
|
98
|
+
};
|
|
99
|
+
if (hasRoot) {
|
|
100
|
+
const argv = [
|
|
101
|
+
"verify-blob",
|
|
102
|
+
"--offline",
|
|
103
|
+
"--bundle",
|
|
104
|
+
join(w.cwd, paths[1]),
|
|
105
|
+
"--certificate-identity",
|
|
106
|
+
options.identity,
|
|
107
|
+
"--certificate-oidc-issuer",
|
|
108
|
+
options.issuer,
|
|
109
|
+
"--trusted-root",
|
|
110
|
+
join(w.cwd, trustedRoot),
|
|
111
|
+
join(w.cwd, paths[0]),
|
|
112
|
+
];
|
|
113
|
+
try {
|
|
114
|
+
const result = await invoke(service.store, guard, "cosign", {
|
|
115
|
+
binary,
|
|
116
|
+
argv,
|
|
117
|
+
cwd: w.cwd,
|
|
118
|
+
env: cleanEnv(w.home),
|
|
119
|
+
...guard.scope.sandbox,
|
|
120
|
+
}, service.dependencies.runner);
|
|
121
|
+
const evidence = service.store.put({
|
|
122
|
+
kind: "tool_output",
|
|
123
|
+
raw: Buffer.from(JSON.stringify({ stdout: result.stdout, stderr: result.stderr })),
|
|
124
|
+
source: {
|
|
125
|
+
type: "command",
|
|
126
|
+
command: JSON.stringify(["cosign", ...argv]),
|
|
127
|
+
exit_code: result.exitCode,
|
|
128
|
+
},
|
|
129
|
+
provenance: "executed",
|
|
130
|
+
produced_by: "@agenthead/security",
|
|
131
|
+
task_id: "security",
|
|
132
|
+
});
|
|
133
|
+
report.evidenceId = evidence.id;
|
|
134
|
+
report.signature =
|
|
135
|
+
result.exitCode === 0 && !result.timedOut && !result.capped
|
|
136
|
+
? { status: "passed" }
|
|
137
|
+
: {
|
|
138
|
+
status: "failed",
|
|
139
|
+
reason: "Cosign failed, timed out or exceeded its output cap",
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
report.signature = {
|
|
144
|
+
status: "failed",
|
|
145
|
+
reason: "Cosign verification could not execute",
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
let changed = true;
|
|
151
|
+
try {
|
|
152
|
+
changed =
|
|
153
|
+
scopeHash(service.root) !== guard.scopeHash ||
|
|
154
|
+
w.files.some((path) => digest(readFileSync(join(w.cwd, path))) !== inputs[path]);
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
/* Deleted or unreadable inputs also invalidate verification. */
|
|
158
|
+
}
|
|
159
|
+
if (changed) {
|
|
160
|
+
report.signature = {
|
|
161
|
+
status: "failed",
|
|
162
|
+
reason: "Verification inputs or scope changed during verification",
|
|
163
|
+
};
|
|
164
|
+
if (report.provenance)
|
|
165
|
+
report.provenance = {
|
|
166
|
+
status: "failed",
|
|
167
|
+
authenticated: false,
|
|
168
|
+
reason: "Verification inputs or scope changed",
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
// audit() mirrors each result as an observed ledger fact without modifying earlier records.
|
|
172
|
+
const safe = JSON.parse(new SecretFilter().redact(JSON.stringify(report)));
|
|
173
|
+
audit(service.store, "artifact_verification", {
|
|
174
|
+
...safe,
|
|
175
|
+
root: guard.boundary.root,
|
|
176
|
+
scopeHash: guard.scopeHash,
|
|
177
|
+
});
|
|
178
|
+
return safe;
|
|
179
|
+
}
|
|
180
|
+
finally {
|
|
181
|
+
w.dispose();
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=verification.js.map
|
|
@@ -0,0 +1 @@
|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SAAS;oBAC3C,CAAC,CAAC,KAAK,CAAC,IAAI,CACV,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,CACnE,CAAC;QACN,CAAC;QAAC,MAAM,CAAC;YACP,gEAAgE;QAClE,CAAC;QACD,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,CAAC,SAAS,GAAG;gBACjB,MAAM,EAAE,QAAQ;gBAChB,MAAM,EAAE,0DAA0D;aACnE,CAAC;YACF,IAAI,MAAM,CAAC,UAAU;gBACnB,MAAM,CAAC,UAAU,GAAG;oBAClB,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE,KAAK;oBACpB,MAAM,EAAE,sCAAsC;iBAC/C,CAAC;QACN,CAAC;QACD,4FAA4F;QAC5F,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CACrB,IAAI,YAAY,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAC1B,CAAC;QAC1B,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,uBAAuB,EAAE;YAC5C,GAAG,IAAI;YACP,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI;YACzB,SAAS,EAAE,KAAK,CAAC,SAAS;SAC3B,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,CAAC,CAAC,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenthead/security",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"THIRD_PARTY_NOTICES.md",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@agenthead/core": "0.3.0",
|
|
21
|
+
"@agenthead/conductor": "0.3.0",
|
|
22
|
+
"@types/node": "^22.20.7"
|
|
23
|
+
},
|
|
24
|
+
"license": "Apache-2.0",
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=22"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"prepack": "tsc -b --force && node ../../scripts/prepare-package.mjs"
|
|
30
|
+
},
|
|
31
|
+
"description": "Scoped local security scans, findings, audit records and verified remediation for AgentHead.",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"agenthead",
|
|
34
|
+
"security",
|
|
35
|
+
"sarif",
|
|
36
|
+
"scanning",
|
|
37
|
+
"audit",
|
|
38
|
+
"remediation"
|
|
39
|
+
],
|
|
40
|
+
"author": "Harsh Singh",
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/singhharsh1708/agenthead.git",
|
|
47
|
+
"directory": "packages/security"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://singhharsh1708.github.io/agenthead/",
|
|
50
|
+
"bugs": "https://github.com/singhharsh1708/agenthead/issues"
|
|
51
|
+
}
|