@aiwg/cli 2026.8.11 → 2026.8.13
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/bin/aiwg.mjs +2 -0
- package/dist/src/api/index.d.ts +6 -0
- package/dist/src/api/index.js +6 -0
- package/dist/src/cli/handlers/artifact-verify.js +171 -0
- package/dist/src/cli/handlers/index.js +3 -1
- package/dist/src/cli/handlers/setup-manifest.js +52 -3
- package/dist/src/cli/handlers/setup.js +15 -2
- package/dist/src/cli/handlers/use.js +71 -6
- package/dist/src/cli/scope-resolver.js +6 -1
- package/dist/src/cli/services/deployment-verification.js +65 -7
- package/dist/src/config/aiwg-config.js +4 -3
- package/dist/src/config/cli.js +3 -1
- package/dist/src/config/gitignore.js +67 -21
- package/dist/src/config/workspace.js +8 -1
- package/dist/src/extensions/commands/definitions.js +19 -0
- package/dist/src/extensions/project-quickref.js +9 -0
- package/dist/src/marketplace/artifact-attestation.js +195 -0
- package/dist/src/marketplace/exchange.js +437 -79
- package/dist/src/marketplace/provenance-types.js +1 -0
- package/dist/src/marketplace/provenance.js +7 -1
- package/dist/src/providers/hermes-home.js +20 -0
- package/dist/src/providers/provider-definitions.js +5 -4
- package/dist/src/providers/transformation-receipt-integration.js +448 -0
- package/dist/src/providers/transformation-receipt.js +215 -0
- package/dist/src/resources/web-release.d.ts +11 -0
- package/dist/src/resources/web-release.js +61 -6
- package/dist/src/security/artifact-attestation.js +117 -0
- package/dist/src/security/artifact-trust.js +557 -0
- package/dist/src/security/artifact-verifier.js +478 -0
- package/dist/src/skills/deployer.js +5 -1
- package/dist/src/tracker/capability-protocol.js +7 -2
- package/package.json +5 -1
- package/schemas/security/aiwg-artifact-attestation.v1.schema.json +106 -0
- package/schemas/security/aiwg-artifact-provenance.v1.schema.json +204 -0
- package/schemas/security/aiwg-artifact-trust-root.v1.schema.json +59 -0
- package/schemas/security/aiwg-artifact-trust-state.v1.schema.json +32 -0
- package/schemas/security/aiwg-artifact-verification-result.v1.schema.json +46 -0
- package/schemas/security/threat-assessment-input.v1.schema.json +57 -0
- package/schemas/security/threat-assessment-report.v1.schema.json +104 -0
- package/tools/agents/deploy-agents.mjs +8 -2
- package/tools/agents/providers/base.mjs +29 -2
- package/tools/agents/providers/hermes.mjs +163 -19
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/security/aiwg-artifact-provenance.v1.schema.json",
|
|
4
|
+
"title": "AIWG artifact provenance in-toto Statement v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["_type", "subject", "predicateType", "predicate"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"_type": {
|
|
10
|
+
"const": "https://in-toto.io/Statement/v1"
|
|
11
|
+
},
|
|
12
|
+
"subject": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"items": { "$ref": "#/$defs/resourceDescriptor" }
|
|
16
|
+
},
|
|
17
|
+
"predicateType": {
|
|
18
|
+
"const": "https://aiwg.io/attestations/artifact-provenance/v1"
|
|
19
|
+
},
|
|
20
|
+
"predicate": {
|
|
21
|
+
"$ref": "#/$defs/predicate"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"$defs": {
|
|
25
|
+
"sha256": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
28
|
+
},
|
|
29
|
+
"nonEmpty": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1
|
|
32
|
+
},
|
|
33
|
+
"resourceDescriptor": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["name", "digest"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"name": { "$ref": "#/$defs/nonEmpty" },
|
|
39
|
+
"uri": { "type": "string", "format": "uri-reference" },
|
|
40
|
+
"mediaType": { "$ref": "#/$defs/nonEmpty" },
|
|
41
|
+
"digest": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": ["sha256"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"sha256": { "$ref": "#/$defs/sha256" }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"assetType": {
|
|
52
|
+
"oneOf": [
|
|
53
|
+
{
|
|
54
|
+
"enum": [
|
|
55
|
+
"setup-manifest",
|
|
56
|
+
"agentic-flow",
|
|
57
|
+
"agent",
|
|
58
|
+
"skill",
|
|
59
|
+
"command",
|
|
60
|
+
"rule",
|
|
61
|
+
"behavior",
|
|
62
|
+
"tool",
|
|
63
|
+
"mcp-server",
|
|
64
|
+
"hook",
|
|
65
|
+
"workflow",
|
|
66
|
+
"profile",
|
|
67
|
+
"persona",
|
|
68
|
+
"theme",
|
|
69
|
+
"media",
|
|
70
|
+
"reference",
|
|
71
|
+
"template",
|
|
72
|
+
"documentation",
|
|
73
|
+
"framework",
|
|
74
|
+
"addon",
|
|
75
|
+
"extension",
|
|
76
|
+
"plugin",
|
|
77
|
+
"schema",
|
|
78
|
+
"package",
|
|
79
|
+
"release-manifest",
|
|
80
|
+
"sbom",
|
|
81
|
+
"web-resource",
|
|
82
|
+
"index",
|
|
83
|
+
"fortemi-shard",
|
|
84
|
+
"fortemi-receipt",
|
|
85
|
+
"marketplace-envelope",
|
|
86
|
+
"marketplace-catalog",
|
|
87
|
+
"generated-provider-artifact",
|
|
88
|
+
"project-artifact",
|
|
89
|
+
"site-deployment"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "string",
|
|
94
|
+
"format": "uri",
|
|
95
|
+
"pattern": "^https://"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"publisher": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": ["id", "namespace"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"id": { "$ref": "#/$defs/nonEmpty" },
|
|
105
|
+
"namespace": { "$ref": "#/$defs/nonEmpty" },
|
|
106
|
+
"role": { "$ref": "#/$defs/nonEmpty" }
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"publication": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"required": ["version", "channel", "sequence"],
|
|
113
|
+
"properties": {
|
|
114
|
+
"version": { "$ref": "#/$defs/nonEmpty" },
|
|
115
|
+
"channel": { "$ref": "#/$defs/nonEmpty" },
|
|
116
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
117
|
+
"sourceUri": { "type": "string", "format": "uri" },
|
|
118
|
+
"collection": { "$ref": "#/$defs/resourceDescriptor" },
|
|
119
|
+
"supersedes": { "$ref": "#/$defs/resourceDescriptor" }
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"material": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"required": ["uri", "digest"],
|
|
126
|
+
"properties": {
|
|
127
|
+
"name": { "$ref": "#/$defs/nonEmpty" },
|
|
128
|
+
"uri": { "type": "string", "format": "uri-reference" },
|
|
129
|
+
"mediaType": { "$ref": "#/$defs/nonEmpty" },
|
|
130
|
+
"digest": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"additionalProperties": false,
|
|
133
|
+
"required": ["sha256"],
|
|
134
|
+
"properties": {
|
|
135
|
+
"sha256": { "$ref": "#/$defs/sha256" }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"derivation": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"required": ["builder", "materials"],
|
|
144
|
+
"properties": {
|
|
145
|
+
"builder": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"required": ["id"],
|
|
149
|
+
"properties": {
|
|
150
|
+
"id": { "$ref": "#/$defs/nonEmpty" },
|
|
151
|
+
"version": { "$ref": "#/$defs/nonEmpty" }
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"transformation": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"additionalProperties": false,
|
|
157
|
+
"required": ["id", "version"],
|
|
158
|
+
"properties": {
|
|
159
|
+
"id": { "$ref": "#/$defs/nonEmpty" },
|
|
160
|
+
"version": { "$ref": "#/$defs/nonEmpty" },
|
|
161
|
+
"provider": { "$ref": "#/$defs/nonEmpty" }
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"materials": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"minItems": 1,
|
|
167
|
+
"items": { "$ref": "#/$defs/material" }
|
|
168
|
+
},
|
|
169
|
+
"reproducible": { "type": "boolean" },
|
|
170
|
+
"invocationId": { "$ref": "#/$defs/nonEmpty" }
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"provenanceGraph": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"additionalProperties": false,
|
|
176
|
+
"required": ["standard", "uri", "sha256"],
|
|
177
|
+
"properties": {
|
|
178
|
+
"standard": { "const": "W3C-PROV" },
|
|
179
|
+
"uri": { "type": "string", "format": "uri-reference" },
|
|
180
|
+
"sha256": { "$ref": "#/$defs/sha256" }
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"predicate": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"additionalProperties": false,
|
|
186
|
+
"required": ["schemaVersion", "assetType", "publisher", "publication", "issuedAt"],
|
|
187
|
+
"properties": {
|
|
188
|
+
"schemaVersion": { "const": "aiwg.artifact-provenance.v1" },
|
|
189
|
+
"assetType": { "$ref": "#/$defs/assetType" },
|
|
190
|
+
"publisher": { "$ref": "#/$defs/publisher" },
|
|
191
|
+
"publication": { "$ref": "#/$defs/publication" },
|
|
192
|
+
"issuedAt": { "type": "string", "format": "date-time" },
|
|
193
|
+
"notBefore": { "type": "string", "format": "date-time" },
|
|
194
|
+
"expiresAt": { "type": "string", "format": "date-time" },
|
|
195
|
+
"derivation": { "$ref": "#/$defs/derivation" },
|
|
196
|
+
"provenanceGraph": { "$ref": "#/$defs/provenanceGraph" },
|
|
197
|
+
"dependencies": {
|
|
198
|
+
"type": "array",
|
|
199
|
+
"items": { "$ref": "#/$defs/resourceDescriptor" }
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/security/aiwg-artifact-trust-root.v1.schema.json",
|
|
4
|
+
"title": "AIWG versioned artifact trust root v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["mediaType", "signed", "signatures"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"mediaType": { "const": "application/vnd.aiwg.artifact-trust-root.v1+json" },
|
|
10
|
+
"signed": {
|
|
11
|
+
"type": "object", "additionalProperties": false,
|
|
12
|
+
"required": ["schemaVersion", "version", "issuedAt", "expiresAt", "identities", "sigstoreProfiles", "root", "delegations", "revocations", "policy"],
|
|
13
|
+
"properties": {
|
|
14
|
+
"schemaVersion": { "const": "aiwg.artifact-trust-root.v1" },
|
|
15
|
+
"version": { "type": "integer", "minimum": 1 }, "issuedAt": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" },
|
|
16
|
+
"identities": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/identity" } },
|
|
17
|
+
"sigstoreProfiles": { "type": "array", "items": { "$ref": "#/$defs/sigstoreProfile" } },
|
|
18
|
+
"root": { "$ref": "#/$defs/role" },
|
|
19
|
+
"delegations": { "type": "array", "items": { "$ref": "#/$defs/delegation" } },
|
|
20
|
+
"revocations": { "type": "array", "items": { "$ref": "#/$defs/revocation" } },
|
|
21
|
+
"policy": {
|
|
22
|
+
"type": "object", "additionalProperties": false, "required": ["name", "requireMaterialDigests", "maxFreezeSeconds", "allowPolicyExempt"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"name": { "$ref": "#/$defs/nonEmpty" },
|
|
25
|
+
"requireMaterialDigests": { "type": "boolean" },
|
|
26
|
+
"maxFreezeSeconds": { "type": "integer", "minimum": 0 },
|
|
27
|
+
"allowPolicyExempt": { "type": "array", "items": { "$ref": "#/$defs/scope" } },
|
|
28
|
+
"marketplace": {
|
|
29
|
+
"type": "object", "additionalProperties": false,
|
|
30
|
+
"required": ["evidenceMode", "legacySignatureMigrationGate", "recursiveDependencies"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"evidenceMode": { "enum": ["marketplace-only", "dual-required", "cross-asset-required"] },
|
|
33
|
+
"legacySignatureMigrationGate": { "type": "boolean" },
|
|
34
|
+
"recursiveDependencies": { "enum": ["if-present", "required"] }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"signatures": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/signature" } }
|
|
42
|
+
},
|
|
43
|
+
"$defs": {
|
|
44
|
+
"nonEmpty": { "type": "string", "minLength": 1 },
|
|
45
|
+
"stringSet": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/nonEmpty" } },
|
|
46
|
+
"scope": { "type": "object", "additionalProperties": false, "required": ["assetTypes", "namespaces", "channels"], "properties": { "assetTypes": { "$ref": "#/$defs/stringSet" }, "namespaces": { "$ref": "#/$defs/stringSet" }, "channels": { "$ref": "#/$defs/stringSet" } } },
|
|
47
|
+
"role": { "type": "object", "additionalProperties": false, "required": ["keyIds", "threshold", "scope"], "properties": { "keyIds": { "$ref": "#/$defs/stringSet" }, "threshold": { "type": "integer", "minimum": 1 }, "scope": { "$ref": "#/$defs/scope" } } },
|
|
48
|
+
"delegation": { "type": "object", "additionalProperties": false, "required": ["id", "parent", "keyIds", "threshold", "scope"], "properties": { "id": { "$ref": "#/$defs/nonEmpty" }, "parent": { "$ref": "#/$defs/nonEmpty" }, "keyIds": { "$ref": "#/$defs/stringSet" }, "threshold": { "type": "integer", "minimum": 1 }, "scope": { "$ref": "#/$defs/scope" }, "notBefore": { "type": "string", "format": "date-time" }, "expiresAt": { "type": "string", "format": "date-time" } } },
|
|
49
|
+
"identity": {
|
|
50
|
+
"oneOf": [
|
|
51
|
+
{ "type": "object", "additionalProperties": false, "required": ["id", "independenceGroup", "kind", "algorithm", "publicKey"], "properties": { "id": { "$ref": "#/$defs/nonEmpty" }, "independenceGroup": { "$ref": "#/$defs/nonEmpty" }, "kind": { "const": "public-key" }, "algorithm": { "enum": ["ed25519", "ecdsa-p256-sha256", "rsa-pss-sha256"] }, "publicKey": { "$ref": "#/$defs/nonEmpty" } } },
|
|
52
|
+
{ "type": "object", "additionalProperties": false, "required": ["id", "independenceGroup", "kind", "profile", "subjectAlternativeName"], "properties": { "id": { "$ref": "#/$defs/nonEmpty" }, "independenceGroup": { "$ref": "#/$defs/nonEmpty" }, "kind": { "const": "sigstore" }, "profile": { "$ref": "#/$defs/nonEmpty" }, "subjectAlternativeName": { "$ref": "#/$defs/nonEmpty" }, "issuer": { "$ref": "#/$defs/nonEmpty" } } }
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"sigstoreProfile": { "type": "object", "additionalProperties": false, "required": ["id", "trustedRoot", "tlogThreshold", "ctlogThreshold", "timestampThreshold"], "properties": { "id": { "$ref": "#/$defs/nonEmpty" }, "trustedRoot": { "type": "object" }, "tlogThreshold": { "type": "integer", "minimum": 0 }, "ctlogThreshold": { "type": "integer", "minimum": 0 }, "timestampThreshold": { "type": "integer", "minimum": 0 } } },
|
|
56
|
+
"revocation": { "type": "object", "additionalProperties": false, "required": ["identityId", "effectiveAt", "scope", "reason"], "properties": { "identityId": { "$ref": "#/$defs/nonEmpty" }, "effectiveAt": { "type": "string", "format": "date-time" }, "compromisedFrom": { "type": "string", "format": "date-time" }, "compromisedUntil": { "type": "string", "format": "date-time" }, "scope": { "$ref": "#/$defs/scope" }, "reason": { "$ref": "#/$defs/nonEmpty" } } },
|
|
57
|
+
"signature": { "type": "object", "additionalProperties": false, "required": ["sig"], "properties": { "identityId": { "$ref": "#/$defs/nonEmpty" }, "sig": { "$ref": "#/$defs/nonEmpty" } } }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/security/aiwg-artifact-trust-state.v1.schema.json",
|
|
4
|
+
"title": "AIWG persisted artifact trust state v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "rootVersion", "rootSha256", "trustedTime", "channels"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "aiwg.artifact-trust-state.v1" },
|
|
10
|
+
"rootVersion": { "type": "integer", "minimum": 1 },
|
|
11
|
+
"rootSha256": { "$ref": "#/$defs/sha256" },
|
|
12
|
+
"trustedTime": { "type": "string", "format": "date-time" },
|
|
13
|
+
"channels": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": {
|
|
16
|
+
"type": "object", "additionalProperties": false,
|
|
17
|
+
"dependentRequired": { "subject": ["assetType"], "assetType": ["subject"] },
|
|
18
|
+
"required": ["namespace", "channel", "sequence", "artifactSha256", "version", "verifiedAt"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"namespace": { "$ref": "#/$defs/nonEmpty" }, "channel": { "$ref": "#/$defs/nonEmpty" },
|
|
21
|
+
"subject": { "$ref": "#/$defs/nonEmpty" }, "assetType": { "$ref": "#/$defs/nonEmpty" },
|
|
22
|
+
"sequence": { "type": "integer", "minimum": 1 }, "artifactSha256": { "$ref": "#/$defs/sha256" },
|
|
23
|
+
"version": { "$ref": "#/$defs/nonEmpty" }, "verifiedAt": { "type": "string", "format": "date-time" }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"$defs": {
|
|
29
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
30
|
+
"nonEmpty": { "type": "string", "minLength": 1 }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/security/aiwg-artifact-verification-result.v1.schema.json",
|
|
4
|
+
"title": "AIWG cross-asset verification result v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "status", "exitCode", "artifact", "identities", "diagnostics"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": "aiwg.verify.result.v1" },
|
|
10
|
+
"status": { "enum": ["verified", "policy-exempt", "unsigned", "unknown-signer", "expired", "revoked", "stale", "mismatched", "malformed", "offline-evidence-missing", "policy-denied"] },
|
|
11
|
+
"exitCode": { "enum": [0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] },
|
|
12
|
+
"artifact": {
|
|
13
|
+
"type": "object", "additionalProperties": false, "required": ["name", "sha256"],
|
|
14
|
+
"properties": { "name": { "type": "string", "minLength": 1 }, "sha256": { "$ref": "#/$defs/sha256" } }
|
|
15
|
+
},
|
|
16
|
+
"policy": { "type": "string", "minLength": 1 },
|
|
17
|
+
"identities": { "type": "array", "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
|
|
18
|
+
"rootVersion": { "type": "integer", "minimum": 1 },
|
|
19
|
+
"freshness": {
|
|
20
|
+
"type": "object", "additionalProperties": false, "required": ["namespace", "channel", "sequence", "version"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"namespace": { "type": "string", "minLength": 1 }, "channel": { "type": "string", "minLength": 1 },
|
|
23
|
+
"sequence": { "type": "integer", "minimum": 1 }, "version": { "type": "string", "minLength": 1 }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"diagnostics": {
|
|
27
|
+
"type": "array", "minItems": 1,
|
|
28
|
+
"items": { "type": "object", "additionalProperties": false, "required": ["code", "message"], "properties": { "code": { "type": "string", "minLength": 1 }, "message": { "type": "string", "minLength": 1 } } }
|
|
29
|
+
},
|
|
30
|
+
"nextState": { "$ref": "aiwg-artifact-trust-state.v1.schema.json" }
|
|
31
|
+
},
|
|
32
|
+
"oneOf": [
|
|
33
|
+
{ "properties": { "status": { "const": "verified" }, "exitCode": { "const": 0 } } },
|
|
34
|
+
{ "properties": { "status": { "const": "policy-exempt" }, "exitCode": { "const": 20 } } },
|
|
35
|
+
{ "properties": { "status": { "const": "unsigned" }, "exitCode": { "const": 21 } } },
|
|
36
|
+
{ "properties": { "status": { "const": "unknown-signer" }, "exitCode": { "const": 22 } } },
|
|
37
|
+
{ "properties": { "status": { "const": "expired" }, "exitCode": { "const": 23 } } },
|
|
38
|
+
{ "properties": { "status": { "const": "revoked" }, "exitCode": { "const": 24 } } },
|
|
39
|
+
{ "properties": { "status": { "const": "stale" }, "exitCode": { "const": 25 } } },
|
|
40
|
+
{ "properties": { "status": { "const": "mismatched" }, "exitCode": { "const": 26 } } },
|
|
41
|
+
{ "properties": { "status": { "const": "malformed" }, "exitCode": { "const": 27 } } },
|
|
42
|
+
{ "properties": { "status": { "const": "offline-evidence-missing" }, "exitCode": { "const": 28 } } },
|
|
43
|
+
{ "properties": { "status": { "const": "policy-denied" }, "exitCode": { "const": 29 } } }
|
|
44
|
+
],
|
|
45
|
+
"$defs": { "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }
|
|
46
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/security/threat-assessment-input.v1.schema.json",
|
|
4
|
+
"title": "ThreatAssessmentInput",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["surface"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"surface": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["issue-title", "issue-body", "issue-comment", "pull-request-title", "pull-request-body", "pull-request-diff-summary", "review-comment", "release-note", "handoff", "outbound-maintainer-comment"]
|
|
12
|
+
},
|
|
13
|
+
"content": { "type": "string" },
|
|
14
|
+
"semanticContext": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": ["requested", "negative", "quoted", "documentation"]
|
|
17
|
+
},
|
|
18
|
+
"parts": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["text"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"id": { "type": "string" },
|
|
26
|
+
"text": { "type": "string" },
|
|
27
|
+
"context": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": ["requested", "negative", "quoted", "documentation"]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"source": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": true,
|
|
37
|
+
"properties": {
|
|
38
|
+
"kind": { "type": "string" },
|
|
39
|
+
"id": { "type": ["string", "number"] }
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"actor": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": true,
|
|
45
|
+
"properties": {
|
|
46
|
+
"id": { "type": "string" },
|
|
47
|
+
"trust": { "type": "string" },
|
|
48
|
+
"provider": { "type": "string" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"requestedAction": { "type": "string" }
|
|
52
|
+
},
|
|
53
|
+
"oneOf": [
|
|
54
|
+
{ "required": ["content"] },
|
|
55
|
+
{ "required": ["parts"] }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://aiwg.io/schemas/security/threat-assessment-report.v1.schema.json",
|
|
4
|
+
"title": "ThreatAssessmentReport",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"engineVersion",
|
|
10
|
+
"policyVersion",
|
|
11
|
+
"profileVersion",
|
|
12
|
+
"policyHash",
|
|
13
|
+
"mode",
|
|
14
|
+
"profile",
|
|
15
|
+
"surface",
|
|
16
|
+
"source",
|
|
17
|
+
"actor",
|
|
18
|
+
"requestedAction",
|
|
19
|
+
"policyProvenance",
|
|
20
|
+
"assessed",
|
|
21
|
+
"findings",
|
|
22
|
+
"risk",
|
|
23
|
+
"decision"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schemaVersion": { "const": "1" },
|
|
27
|
+
"engineVersion": { "type": "string", "minLength": 1 },
|
|
28
|
+
"policyVersion": { "type": "string", "minLength": 1 },
|
|
29
|
+
"profileVersion": { "type": "string", "minLength": 1 },
|
|
30
|
+
"policyHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
31
|
+
"mode": { "enum": ["off", "audit", "enforce"] },
|
|
32
|
+
"profile": { "type": "string", "minLength": 1 },
|
|
33
|
+
"surface": {
|
|
34
|
+
"enum": ["issue-title", "issue-body", "issue-comment", "pull-request-title", "pull-request-body", "pull-request-diff-summary", "review-comment", "release-note", "handoff", "outbound-maintainer-comment"]
|
|
35
|
+
},
|
|
36
|
+
"source": { "type": "object", "additionalProperties": true },
|
|
37
|
+
"actor": { "type": "object", "additionalProperties": true },
|
|
38
|
+
"requestedAction": { "type": "string" },
|
|
39
|
+
"policyProvenance": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["source", "path"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"source": { "type": "string" },
|
|
45
|
+
"path": { "type": "string" }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"assessed": { "type": "boolean" },
|
|
49
|
+
"findings": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": { "$ref": "#/definitions/finding" }
|
|
52
|
+
},
|
|
53
|
+
"risk": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["score", "severity", "likelihood", "impact"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"score": { "type": "number", "minimum": 0 },
|
|
59
|
+
"severity": { "$ref": "#/definitions/severity" },
|
|
60
|
+
"likelihood": { "type": "number", "minimum": 0, "maximum": 5 },
|
|
61
|
+
"impact": { "type": "number", "minimum": 0, "maximum": 5 }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"decision": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["action", "wouldAction", "interrupts", "reason"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"action": { "$ref": "#/definitions/action" },
|
|
70
|
+
"wouldAction": { "$ref": "#/definitions/action" },
|
|
71
|
+
"interrupts": { "type": "boolean" },
|
|
72
|
+
"reason": { "type": "string" },
|
|
73
|
+
"matchedMandatoryRule": { "type": "string" }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"definitions": {
|
|
78
|
+
"severity": {
|
|
79
|
+
"enum": ["informational", "low", "moderate", "high", "critical"]
|
|
80
|
+
},
|
|
81
|
+
"action": {
|
|
82
|
+
"enum": ["proceed", "record", "flag", "require-authorization", "reject"]
|
|
83
|
+
},
|
|
84
|
+
"finding": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": ["ruleId", "ruleProvenance", "severity", "likelihood", "impact", "taxonomy", "partId", "context", "evidence", "suppressed", "matchedStatements"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"ruleId": { "type": "string" },
|
|
90
|
+
"ruleProvenance": { "type": "string" },
|
|
91
|
+
"severity": { "$ref": "#/definitions/severity" },
|
|
92
|
+
"likelihood": { "type": "number", "minimum": 1, "maximum": 5 },
|
|
93
|
+
"impact": { "type": "number", "minimum": 1, "maximum": 5 },
|
|
94
|
+
"taxonomy": { "type": "array", "items": { "type": "string" } },
|
|
95
|
+
"partId": { "type": "string" },
|
|
96
|
+
"context": { "enum": ["requested", "negative", "quoted", "documentation"] },
|
|
97
|
+
"evidence": { "type": "string" },
|
|
98
|
+
"suppressed": { "type": "boolean" },
|
|
99
|
+
"suppressionReason": { "type": "string" },
|
|
100
|
+
"matchedStatements": { "type": "array", "items": { "type": "string" } }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -210,7 +210,13 @@ function resolveCommandMirrorDir(provider, target) {
|
|
|
210
210
|
// Closest conventional location for providers whose primary command
|
|
211
211
|
// surface is MCP/aggregation rather than a documented command directory.
|
|
212
212
|
if (provider.name === 'hermes') {
|
|
213
|
-
|
|
213
|
+
// #2119: HERMES_HOME is the single source of truth the running Hermes
|
|
214
|
+
// runtime uses to locate its files — resolve the home the same way the
|
|
215
|
+
// provider does instead of hardcoding $HOME/.hermes.
|
|
216
|
+
const hermesHome = typeof provider.getHermesHome === 'function'
|
|
217
|
+
? provider.getHermesHome()
|
|
218
|
+
: path.join(os.homedir(), '.hermes');
|
|
219
|
+
return path.resolve(hermesHome, 'commands');
|
|
214
220
|
}
|
|
215
221
|
|
|
216
222
|
return null;
|
|
@@ -530,7 +536,7 @@ Providers (all deploy agents, commands, skills, and rules):
|
|
|
530
536
|
devin - Devin Desktop (preferred; aliases: devin-desktop, windsurf)
|
|
531
537
|
Paths: .windsurf/agents/, .windsurf/workflows/, .windsurf/skills/, .windsurf/rules/
|
|
532
538
|
hermes - Hermes Agent (MCP-based integration)
|
|
533
|
-
Skills:
|
|
539
|
+
Skills: $HERMES_HOME/skills/ (user-global; defaults to ~/.hermes/skills/) | Agents: AGENTS.md
|
|
534
540
|
Commands/Rules: served via MCP, not file-deployed
|
|
535
541
|
|
|
536
542
|
Modes:
|
|
@@ -463,9 +463,36 @@ export function injectPlatformInContent(content, targetPlatform) {
|
|
|
463
463
|
return open + fmLines.join('\n') + close + body;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
-
/**
|
|
466
|
+
/**
|
|
467
|
+
* Remove the `platforms:` field from a SKILL.md frontmatter block.
|
|
468
|
+
*
|
|
469
|
+
* Hermes (and other providers that treat `platforms:` as an OS gate —
|
|
470
|
+
* linux / macos / windows) hide any skill whose value isn't a recognized
|
|
471
|
+
* OS. AIWG source skills use the field as a *provider* restriction token
|
|
472
|
+
* (`[all]`, provider names), which is the opposite meaning, so deployed
|
|
473
|
+
* copies destined for such providers must drop the field entirely. An
|
|
474
|
+
* absent field is the documented "compatible with all platforms" default.
|
|
475
|
+
*/
|
|
467
476
|
export function stripPlatformsFromContent(content) {
|
|
468
|
-
|
|
477
|
+
const fmMatch = content.match(/^(---\r?\n)([\s\S]*?)(\r?\n---(?:\r?\n|$))([\s\S]*)$/);
|
|
478
|
+
if (!fmMatch) return content;
|
|
479
|
+
|
|
480
|
+
const [, open, fm, close, body] = fmMatch;
|
|
481
|
+
let updated = fm.replace(/^platforms:[^\r\n]*(?:\r?\n|$)/m, '');
|
|
482
|
+
|
|
483
|
+
// Multi-line list form:
|
|
484
|
+
// platforms:
|
|
485
|
+
// - claude-code
|
|
486
|
+
// - hermes
|
|
487
|
+
if (updated === fm) {
|
|
488
|
+
updated = fm.replace(
|
|
489
|
+
/^platforms:[ \t]*\r?\n(?:[ \t]+-[ \t]+\S[^\r\n]*(?:\r?\n|$))*/m,
|
|
490
|
+
'',
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
if (updated === fm) return content;
|
|
495
|
+
return open + updated + close + body;
|
|
469
496
|
}
|
|
470
497
|
|
|
471
498
|
/**
|