@podo/skill-validator 0.0.0-stage → 0.1.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 +21 -0
- package/README.md +286 -2
- package/THIRD_PARTY_NOTICES.md +58 -0
- package/dist/cli.js +8612 -0
- package/package.json +34 -4
- package/schema/report.schema.json +83 -0
package/package.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podo/skill-validator",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Validate agent skills (SKILL.md packages): structure, security, and token budget.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"bin": {
|
|
8
|
+
"skill-validator": "./dist/cli.js",
|
|
9
|
+
"skillval": "./dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"files": ["dist", "schema", "THIRD_PARTY_NOTICES.md"],
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=22"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"registry": "https://registry.npmjs.org/"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup",
|
|
21
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
22
|
+
"test": "npm run build && node --test test/*.test.mjs",
|
|
23
|
+
"prepack": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/js-yaml": "^4.0.9",
|
|
27
|
+
"@types/picomatch": "^4.0.2",
|
|
28
|
+
"@types/node": "^22.0.0",
|
|
29
|
+
"ajv": "^8.17.1",
|
|
30
|
+
"fast-xml-parser": "^5.3.0",
|
|
31
|
+
"js-yaml": "^4.1.1",
|
|
32
|
+
"picomatch": "^4.0.3",
|
|
33
|
+
"tsup": "^8.0.0",
|
|
34
|
+
"typescript": "^5.6.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "urn:podo:skill-validator:cli:report:v1",
|
|
4
|
+
"title": "Skill Validator CLI report v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "toolVersion", "skills", "summary", "gate"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"toolVersion": { "type": "string" },
|
|
11
|
+
"skills": { "type": "array", "items": { "$ref": "#/definitions/skill" } },
|
|
12
|
+
"summary": {
|
|
13
|
+
"type": "object", "additionalProperties": false,
|
|
14
|
+
"required": ["bySeverity", "byCategory", "byRule", "skills", "skillsWithFindings", "skippedChecks", "failOn", "exitCode"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"bySeverity": {
|
|
17
|
+
"type": "object", "additionalProperties": false,
|
|
18
|
+
"required": ["critical", "high", "suggestion", "info"],
|
|
19
|
+
"properties": { "critical": { "$ref": "#/definitions/count" }, "high": { "$ref": "#/definitions/count" }, "suggestion": { "$ref": "#/definitions/count" }, "info": { "$ref": "#/definitions/count" } }
|
|
20
|
+
},
|
|
21
|
+
"byCategory": { "$ref": "#/definitions/counts" },
|
|
22
|
+
"byRule": { "$ref": "#/definitions/counts" },
|
|
23
|
+
"skills": { "$ref": "#/definitions/count" },
|
|
24
|
+
"skillsWithFindings": { "$ref": "#/definitions/count" },
|
|
25
|
+
"skippedChecks": { "$ref": "#/definitions/strings" },
|
|
26
|
+
"failOn": { "$ref": "#/definitions/failOn" },
|
|
27
|
+
"exitCode": { "enum": [0, 1] }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"gate": {
|
|
31
|
+
"type": "object", "additionalProperties": false, "required": ["failOn", "passed", "exitCode"],
|
|
32
|
+
"properties": { "failOn": { "$ref": "#/definitions/failOn" }, "passed": { "type": "boolean" }, "exitCode": { "enum": [0, 1] } }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"definitions": {
|
|
36
|
+
"count": { "type": "integer", "minimum": 0 },
|
|
37
|
+
"counts": { "type": "object", "additionalProperties": { "$ref": "#/definitions/count" } },
|
|
38
|
+
"strings": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
39
|
+
"severity": { "enum": ["critical", "high", "suggestion", "info"] },
|
|
40
|
+
"failOn": { "enum": ["critical", "high", "suggestion", "info", "none"] },
|
|
41
|
+
"path": { "type": "string", "minLength": 1, "pattern": "^(?!/)(?!\\\\)(?![A-Za-z]:[/\\\\])(?![\\s\\S]*(?:^|/)\\.\\.(?:/|$))[\\s\\S]+$" },
|
|
42
|
+
"finding": {
|
|
43
|
+
"type": "object", "additionalProperties": false,
|
|
44
|
+
"required": ["id", "severity", "category", "title", "rationale", "fingerprint"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"id": { "type": "string" }, "severity": { "$ref": "#/definitions/severity" },
|
|
47
|
+
"originalSeverity": { "$ref": "#/definitions/severity" },
|
|
48
|
+
"category": { "type": "string" }, "title": { "type": "string" }, "rationale": { "type": "string" },
|
|
49
|
+
"file": { "$ref": "#/definitions/path" }, "line": { "type": "integer", "minimum": 1 },
|
|
50
|
+
"snippet": { "type": "string" }, "suggestion": { "type": "string" }, "source": { "type": "string" },
|
|
51
|
+
"family": { "type": "string" }, "owaspAsi": { "type": "string" },
|
|
52
|
+
"fingerprint": { "type": "string", "pattern": "^[a-f0-9]{16}$" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"skill": {
|
|
56
|
+
"type": "object", "additionalProperties": false,
|
|
57
|
+
"required": ["dir", "name", "findings", "risk", "tokenBudget", "skippedChecks"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"dir": { "$ref": "#/definitions/path" }, "name": { "type": "string" },
|
|
60
|
+
"findings": { "type": "array", "items": { "$ref": "#/definitions/finding" } },
|
|
61
|
+
"skippedChecks": { "$ref": "#/definitions/strings" }, "error": { "type": "string" },
|
|
62
|
+
"risk": {
|
|
63
|
+
"type": "object", "additionalProperties": false, "required": ["score", "level", "label"],
|
|
64
|
+
"properties": { "score": { "type": "number", "minimum": 0, "maximum": 100 }, "level": { "enum": ["safe", "caution", "do_not_install"] }, "label": { "type": "string" } }
|
|
65
|
+
},
|
|
66
|
+
"tokenBudget": {
|
|
67
|
+
"type": "object", "additionalProperties": false,
|
|
68
|
+
"required": ["totalTokens", "totalBytes", "skillMdTokens", "skillMdOverBudget", "bundleOverBudget", "files"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"totalTokens": { "$ref": "#/definitions/count" }, "totalBytes": { "$ref": "#/definitions/count" },
|
|
71
|
+
"skillMdTokens": { "$ref": "#/definitions/count" }, "skillMdOverBudget": { "type": "boolean" }, "bundleOverBudget": { "type": "boolean" },
|
|
72
|
+
"files": {
|
|
73
|
+
"type": "array", "items": {
|
|
74
|
+
"type": "object", "additionalProperties": false, "required": ["path", "bytes", "tokens"],
|
|
75
|
+
"properties": { "path": { "$ref": "#/definitions/path" }, "bytes": { "$ref": "#/definitions/count" }, "tokens": { "$ref": "#/definitions/count" } }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|