agent-security-lens 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.
Files changed (81) hide show
  1. package/.env.example +10 -0
  2. package/.mcp/server.json +42 -0
  3. package/CHANGELOG.md +17 -0
  4. package/LICENSE +17 -0
  5. package/PRIVACY.md +37 -0
  6. package/README.md +150 -0
  7. package/RELEASE-MANIFEST.json +449 -0
  8. package/SECURITY.md +24 -0
  9. package/apps/mcp-server/agent-security-lens-mcp.mjs +441 -0
  10. package/bin/agent-security-lens.mjs +117 -0
  11. package/data/ecosystems/agent-candidates.json +230 -0
  12. package/data/intelligence/components.json +22989 -0
  13. package/data/intelligence/security-evaluation-standard.json +221 -0
  14. package/data/recommendations/core/recommendations.json +256 -0
  15. package/data/trust/signal-taxonomy.json +107 -0
  16. package/docs/asl-agent-component-safety-standard-v0.2.md +56 -0
  17. package/examples/dot-hermes/.hermes/config.json +17 -0
  18. package/examples/dot-openclaw/.openclaw/openclaw.json +17 -0
  19. package/examples/hermes-like/.env.example +2 -0
  20. package/examples/hermes-like/config.json +37 -0
  21. package/examples/hermes-like/optional-mcps/github-tools.json +8 -0
  22. package/examples/hermes-like/skills/openclaw-imports/browser-skill/SKILL.md +8 -0
  23. package/examples/openclaw-like/.env.example +2 -0
  24. package/examples/openclaw-like/AGENTS.md +7 -0
  25. package/examples/openclaw-like/openclaw.json +28 -0
  26. package/examples/openclaw-like/workspace/skills/browser-control/SKILL.md +8 -0
  27. package/llms.txt +25 -0
  28. package/package.json +50 -0
  29. package/profiles/generic-agent/profile.json +19 -0
  30. package/profiles/hermes-like/profile.json +23 -0
  31. package/profiles/mcp-server/profile.json +18 -0
  32. package/profiles/openclaw-like/profile.json +22 -0
  33. package/profiles/skill-runtime/profile.json +19 -0
  34. package/rule-packs/core/rules.json +82 -0
  35. package/rule-packs/hermes/rules.json +44 -0
  36. package/rule-packs/mcp/rules.json +65 -0
  37. package/rule-packs/openclaw/rules.json +46 -0
  38. package/rule-packs/skills/rules.json +45 -0
  39. package/schemas/agent-install-decision.schema.json +432 -0
  40. package/schemas/agent-usage-event.schema.json +45 -0
  41. package/schemas/assessment-result.schema.json +361 -0
  42. package/schemas/comparison-result.schema.json +113 -0
  43. package/schemas/component-alternative-graph.schema.json +187 -0
  44. package/schemas/component-intelligence.schema.json +93 -0
  45. package/schemas/decision-feedback.schema.json +49 -0
  46. package/schemas/ecosystem-candidate-registry.schema.json +98 -0
  47. package/schemas/profile.schema.json +65 -0
  48. package/schemas/recommendation-pack.schema.json +114 -0
  49. package/schemas/rule-pack.schema.json +113 -0
  50. package/schemas/trust-signal-taxonomy.schema.json +68 -0
  51. package/scripts/verify-examples.mjs +121 -0
  52. package/scripts/verify-mcp-server.mjs +278 -0
  53. package/scripts/verify-registry.mjs +264 -0
  54. package/server.json +42 -0
  55. package/src/assessment/assess.mjs +108 -0
  56. package/src/assessment/discover-targets.mjs +127 -0
  57. package/src/assessment/risk-domains.mjs +83 -0
  58. package/src/assessment/summarize.mjs +57 -0
  59. package/src/core/files.mjs +74 -0
  60. package/src/intelligence/cloud-client.mjs +260 -0
  61. package/src/intelligence/component-intelligence.mjs +358 -0
  62. package/src/intelligence/decision-engine.mjs +772 -0
  63. package/src/intelligence/finding-context.mjs +180 -0
  64. package/src/intelligence/safety-score-v0.2.mjs +294 -0
  65. package/src/observations/json-observations.mjs +211 -0
  66. package/src/observations/observation-rules.mjs +157 -0
  67. package/src/profiles/load-profiles.mjs +130 -0
  68. package/src/recommendations/component-alternative-graph.mjs +94 -0
  69. package/src/recommendations/load-recommendations.mjs +17 -0
  70. package/src/recommendations/match-recommendations.mjs +79 -0
  71. package/src/report/comparison-console.mjs +71 -0
  72. package/src/report/console.mjs +103 -0
  73. package/src/report/markdown.mjs +145 -0
  74. package/src/results/compare-results.mjs +106 -0
  75. package/src/results/save-result.mjs +29 -0
  76. package/src/rules/load-rules.mjs +22 -0
  77. package/src/rules/match-rules.mjs +99 -0
  78. package/src/rules/supersedes.mjs +39 -0
  79. package/src/store/assessment-store.mjs +78 -0
  80. package/src/trust/derive-trust-signals.mjs +73 -0
  81. package/src/trust/load-trust-signals.mjs +17 -0
@@ -0,0 +1,93 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentsecuritylens.dev/schemas/component-intelligence.schema.json",
4
+ "title": "AgentSecurityLens Component Intelligence Database",
5
+ "type": "object",
6
+ "required": ["schema_version", "updated_at", "components"],
7
+ "properties": {
8
+ "schema_version": { "type": "string" },
9
+ "updated_at": { "type": "string" },
10
+ "counts": {
11
+ "type": "object",
12
+ "required": ["total_records", "strict_reviewed", "curated_baseline"],
13
+ "properties": {
14
+ "total_records": { "type": "integer", "minimum": 0 },
15
+ "strict_reviewed": { "type": "integer", "minimum": 0 },
16
+ "curated_baseline": { "type": "integer", "minimum": 0 }
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "components": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "required": [
25
+ "id",
26
+ "name",
27
+ "type",
28
+ "aliases",
29
+ "source_patterns",
30
+ "trust_score",
31
+ "risk_level",
32
+ "risk_signals",
33
+ "safe_install_plan",
34
+ "alternatives",
35
+ "decision"
36
+ ],
37
+ "properties": {
38
+ "id": { "type": "string" },
39
+ "name": { "type": "string" },
40
+ "type": {
41
+ "type": "string",
42
+ "enum": ["agent-framework", "mcp", "skill", "tool", "prompt", "workflow", "memory", "unknown"]
43
+ },
44
+ "aliases": {
45
+ "type": "array",
46
+ "items": { "type": "string" }
47
+ },
48
+ "source_patterns": {
49
+ "type": "array",
50
+ "items": { "type": "string" }
51
+ },
52
+ "intelligence_state": {
53
+ "type": "string",
54
+ "enum": ["strict_reviewed", "curated_baseline"]
55
+ },
56
+ "review_state": {
57
+ "type": "string",
58
+ "enum": ["reviewed", "curated_baseline"]
59
+ },
60
+ "evidence_status": { "type": "string" },
61
+ "disclosure": { "type": "string" },
62
+ "trust_score": {
63
+ "type": "integer",
64
+ "minimum": 0,
65
+ "maximum": 100
66
+ },
67
+ "risk_level": {
68
+ "type": "string",
69
+ "enum": ["low", "medium", "high"]
70
+ },
71
+ "risk_signals": {
72
+ "type": "array",
73
+ "items": { "type": "string" }
74
+ },
75
+ "safe_install_plan": {
76
+ "type": "array",
77
+ "items": { "type": "string" }
78
+ },
79
+ "alternatives": {
80
+ "type": "array",
81
+ "items": { "type": "string" }
82
+ },
83
+ "decision": {
84
+ "type": "string",
85
+ "enum": ["allow", "allow_with_restrictions", "ask_user", "avoid"]
86
+ }
87
+ },
88
+ "additionalProperties": true
89
+ }
90
+ }
91
+ },
92
+ "additionalProperties": false
93
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentsecuritylens.dev/schemas/decision-feedback.schema.json",
4
+ "title": "AgentSecurityLens Decision Feedback",
5
+ "type": "object",
6
+ "required": ["schema_version", "client", "feedback"],
7
+ "properties": {
8
+ "schema_version": { "type": "string" },
9
+ "client": {
10
+ "type": "object",
11
+ "properties": {
12
+ "name": { "type": "string" },
13
+ "agent_id": { "type": "string" },
14
+ "agent_name": { "type": "string" },
15
+ "client_type": { "type": "string" },
16
+ "mode": { "type": "string" },
17
+ "protocol": { "type": "string" },
18
+ "tier": { "type": "string" }
19
+ },
20
+ "additionalProperties": true
21
+ },
22
+ "feedback": {
23
+ "type": "object",
24
+ "required": ["feedback_type"],
25
+ "properties": {
26
+ "component_name": { "type": "string" },
27
+ "component_type": { "type": "string" },
28
+ "decision": { "type": "string" },
29
+ "feedback_type": {
30
+ "type": "string",
31
+ "enum": ["helpful", "too_strict", "too_permissive", "missing_component", "missing_alternative", "incorrect_risk", "other"]
32
+ },
33
+ "rating": {
34
+ "type": "number",
35
+ "minimum": 1,
36
+ "maximum": 5
37
+ },
38
+ "comment": { "type": "string" },
39
+ "recorded_at": { "type": "string" }
40
+ },
41
+ "additionalProperties": true
42
+ },
43
+ "privacy_policy": {
44
+ "type": "object",
45
+ "additionalProperties": true
46
+ }
47
+ },
48
+ "additionalProperties": true
49
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentsecuritylens.dev/schemas/ecosystem-candidate-registry.schema.json",
4
+ "title": "AgentSecurityLens Ecosystem Candidate Registry",
5
+ "type": "object",
6
+ "required": ["id", "version", "status", "candidates"],
7
+ "properties": {
8
+ "id": {
9
+ "type": "string",
10
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
11
+ },
12
+ "version": { "type": "string" },
13
+ "status": {
14
+ "type": "string",
15
+ "enum": ["draft", "experimental", "active", "deprecated", "archived"]
16
+ },
17
+ "candidates": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "required": [
22
+ "id",
23
+ "name",
24
+ "entity_type",
25
+ "lifecycle_status",
26
+ "claim_status",
27
+ "priority",
28
+ "regions",
29
+ "why_candidate",
30
+ "known_or_expected_artifacts",
31
+ "data_needs",
32
+ "profile_impacts"
33
+ ],
34
+ "properties": {
35
+ "id": {
36
+ "type": "string",
37
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
38
+ },
39
+ "name": { "type": "string" },
40
+ "entity_type": {
41
+ "type": "string",
42
+ "enum": ["agent-ecosystem", "mcp-ecosystem", "skill-ecosystem", "agent-bundle"]
43
+ },
44
+ "lifecycle_status": {
45
+ "type": "string",
46
+ "enum": ["discovered", "candidate", "draft-profile", "experimental-profile", "active-profile", "deprecated", "archived"]
47
+ },
48
+ "claim_status": {
49
+ "type": "string",
50
+ "enum": ["unverified-user-supplied", "research-needed", "partially-verified", "verified"]
51
+ },
52
+ "priority": { "type": "integer" },
53
+ "regions": {
54
+ "type": "array",
55
+ "items": { "type": "string" }
56
+ },
57
+ "why_candidate": {
58
+ "type": "array",
59
+ "items": { "type": "string" }
60
+ },
61
+ "known_or_expected_artifacts": {
62
+ "type": "array",
63
+ "items": { "type": "string" }
64
+ },
65
+ "data_needs": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "object",
69
+ "required": ["id", "description", "status"],
70
+ "properties": {
71
+ "id": {
72
+ "type": "string",
73
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
74
+ },
75
+ "description": { "type": "string" },
76
+ "status": {
77
+ "type": "string",
78
+ "enum": ["needed", "in-progress", "collected", "blocked"]
79
+ }
80
+ },
81
+ "additionalProperties": false
82
+ }
83
+ },
84
+ "profile_impacts": {
85
+ "type": "array",
86
+ "items": { "type": "string" }
87
+ },
88
+ "notes": {
89
+ "type": "array",
90
+ "items": { "type": "string" }
91
+ }
92
+ },
93
+ "additionalProperties": false
94
+ }
95
+ }
96
+ },
97
+ "additionalProperties": false
98
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentsecuritylens.dev/schemas/profile.schema.json",
4
+ "title": "AgentSecurityLens Profile",
5
+ "type": "object",
6
+ "required": [
7
+ "id",
8
+ "version",
9
+ "status",
10
+ "confidence",
11
+ "coverage",
12
+ "rule_packs",
13
+ "path_hints",
14
+ "known_limitations"
15
+ ],
16
+ "properties": {
17
+ "id": {
18
+ "type": "string",
19
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
20
+ },
21
+ "version": {
22
+ "type": "string"
23
+ },
24
+ "status": {
25
+ "type": "string",
26
+ "enum": ["draft", "experimental", "active", "deprecated", "archived"]
27
+ },
28
+ "confidence": {
29
+ "type": "number",
30
+ "minimum": 0,
31
+ "maximum": 1
32
+ },
33
+ "coverage": {
34
+ "type": "number",
35
+ "minimum": 0,
36
+ "maximum": 1
37
+ },
38
+ "extends": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string"
42
+ }
43
+ },
44
+ "rule_packs": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string",
48
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
49
+ }
50
+ },
51
+ "path_hints": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "string"
55
+ }
56
+ },
57
+ "known_limitations": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ },
64
+ "additionalProperties": false
65
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentsecuritylens.dev/schemas/recommendation-pack.schema.json",
4
+ "title": "AgentSecurityLens Recommendation Pack",
5
+ "type": "object",
6
+ "required": ["id", "version", "status", "recommendations"],
7
+ "properties": {
8
+ "id": {
9
+ "type": "string",
10
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
11
+ },
12
+ "version": {
13
+ "type": "string"
14
+ },
15
+ "status": {
16
+ "type": "string",
17
+ "enum": ["draft", "experimental", "active", "deprecated", "archived"]
18
+ },
19
+ "recommendations": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "object",
23
+ "required": [
24
+ "id",
25
+ "title",
26
+ "type",
27
+ "status",
28
+ "source",
29
+ "confidence",
30
+ "rank",
31
+ "applies_to",
32
+ "recommended_actions",
33
+ "recommended_alternatives",
34
+ "agent_instruction",
35
+ "rollback_note"
36
+ ],
37
+ "properties": {
38
+ "id": {
39
+ "type": "string",
40
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
41
+ },
42
+ "title": { "type": "string" },
43
+ "type": {
44
+ "type": "string",
45
+ "enum": ["replacement", "configuration", "credential", "workflow", "review"]
46
+ },
47
+ "status": {
48
+ "type": "string",
49
+ "enum": ["candidate", "draft", "experimental", "active", "deprecated", "archived"]
50
+ },
51
+ "source": { "type": "string" },
52
+ "confidence": {
53
+ "type": "number",
54
+ "minimum": 0,
55
+ "maximum": 1
56
+ },
57
+ "rank": { "type": "integer" },
58
+ "applies_to": {
59
+ "type": "object",
60
+ "properties": {
61
+ "rule_ids": {
62
+ "type": "array",
63
+ "items": { "type": "string" }
64
+ },
65
+ "categories": {
66
+ "type": "array",
67
+ "items": { "type": "string" }
68
+ },
69
+ "permissions_any": {
70
+ "type": "array",
71
+ "items": { "type": "string" }
72
+ },
73
+ "permissions_all": {
74
+ "type": "array",
75
+ "items": { "type": "string" }
76
+ },
77
+ "profile_ids": {
78
+ "type": "array",
79
+ "items": { "type": "string" }
80
+ }
81
+ },
82
+ "additionalProperties": false
83
+ },
84
+ "recommended_actions": {
85
+ "type": "array",
86
+ "items": { "type": "string" }
87
+ },
88
+ "recommended_alternatives": {
89
+ "type": "array",
90
+ "items": { "type": "string" }
91
+ },
92
+ "agent_instruction": { "type": "string" },
93
+ "one_step_commands": {
94
+ "type": "array",
95
+ "items": {
96
+ "type": "object",
97
+ "required": ["title", "command", "platform", "requires_confirmation"],
98
+ "properties": {
99
+ "title": { "type": "string" },
100
+ "command": { "type": "string" },
101
+ "platform": { "type": "string" },
102
+ "requires_confirmation": { "type": "boolean" }
103
+ },
104
+ "additionalProperties": false
105
+ }
106
+ },
107
+ "rollback_note": { "type": "string" }
108
+ },
109
+ "additionalProperties": false
110
+ }
111
+ }
112
+ },
113
+ "additionalProperties": false
114
+ }
@@ -0,0 +1,113 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentsecuritylens.dev/schemas/rule-pack.schema.json",
4
+ "title": "AgentSecurityLens Rule Pack",
5
+ "type": "object",
6
+ "required": ["id", "version", "rules"],
7
+ "properties": {
8
+ "id": {
9
+ "type": "string",
10
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
11
+ },
12
+ "version": {
13
+ "type": "string"
14
+ },
15
+ "rules": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "required": [
20
+ "id",
21
+ "title",
22
+ "category",
23
+ "severity",
24
+ "confidence",
25
+ "permissions",
26
+ "target_paths",
27
+ "patterns",
28
+ "why_it_matters",
29
+ "recommended_actions",
30
+ "recommended_alternatives",
31
+ "migration_instruction"
32
+ ],
33
+ "properties": {
34
+ "id": {
35
+ "type": "string",
36
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
37
+ },
38
+ "title": {
39
+ "type": "string"
40
+ },
41
+ "category": {
42
+ "type": "string",
43
+ "enum": [
44
+ "execution-risk",
45
+ "remote-access-risk",
46
+ "data-exposure-risk",
47
+ "supply-chain-risk",
48
+ "persistence-automation-risk"
49
+ ]
50
+ },
51
+ "severity": {
52
+ "type": "string",
53
+ "enum": ["critical", "high", "medium", "low", "info"]
54
+ },
55
+ "confidence": {
56
+ "type": "number",
57
+ "minimum": 0,
58
+ "maximum": 1
59
+ },
60
+ "permissions": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "target_paths": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "patterns": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "match_scope": {
79
+ "type": "string",
80
+ "enum": ["line", "file"],
81
+ "default": "line"
82
+ },
83
+ "supersedes": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string"
87
+ }
88
+ },
89
+ "why_it_matters": {
90
+ "type": "string"
91
+ },
92
+ "recommended_actions": {
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string"
96
+ }
97
+ },
98
+ "recommended_alternatives": {
99
+ "type": "array",
100
+ "items": {
101
+ "type": "string"
102
+ }
103
+ },
104
+ "migration_instruction": {
105
+ "type": "string"
106
+ }
107
+ },
108
+ "additionalProperties": false
109
+ }
110
+ }
111
+ },
112
+ "additionalProperties": false
113
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentsecuritylens.dev/schemas/trust-signal-taxonomy.schema.json",
4
+ "title": "AgentSecurityLens Trust Signal Taxonomy",
5
+ "type": "object",
6
+ "required": ["id", "version", "status", "signals"],
7
+ "properties": {
8
+ "id": {
9
+ "type": "string",
10
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
11
+ },
12
+ "version": { "type": "string" },
13
+ "status": {
14
+ "type": "string",
15
+ "enum": ["draft", "experimental", "active", "deprecated", "archived"]
16
+ },
17
+ "signals": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "object",
21
+ "required": [
22
+ "id",
23
+ "title",
24
+ "direction",
25
+ "weight",
26
+ "source_type",
27
+ "applies_to",
28
+ "evidence_required",
29
+ "description"
30
+ ],
31
+ "properties": {
32
+ "id": {
33
+ "type": "string",
34
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
35
+ },
36
+ "title": { "type": "string" },
37
+ "direction": {
38
+ "type": "string",
39
+ "enum": ["positive", "negative", "neutral"]
40
+ },
41
+ "weight": {
42
+ "type": "integer",
43
+ "minimum": -100,
44
+ "maximum": 100
45
+ },
46
+ "source_type": {
47
+ "type": "string",
48
+ "enum": ["static-analysis", "github", "community", "transparency", "manual-review"]
49
+ },
50
+ "applies_to": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string",
54
+ "enum": ["agent", "mcp", "skill", "maintainer", "version", "recommendation"]
55
+ }
56
+ },
57
+ "evidence_required": {
58
+ "type": "array",
59
+ "items": { "type": "string" }
60
+ },
61
+ "description": { "type": "string" }
62
+ },
63
+ "additionalProperties": false
64
+ }
65
+ }
66
+ },
67
+ "additionalProperties": false
68
+ }