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
package/.env.example ADDED
@@ -0,0 +1,10 @@
1
+ # AgentSecurityLens public MCP client configuration.
2
+ ASL_MODE=online
3
+ ASL_DISABLE_CLOUD=0
4
+ ASL_API_URL=https://api.agentsecuritylens.com
5
+ ASL_API_URLS=https://api.agentsecuritylens.com
6
+ ASL_API_TIMEOUT_MS=3500
7
+ ASL_API_KEY=
8
+ ASL_AGENT_ID=
9
+ ASL_AGENT_NAME=
10
+ ASL_CLIENT_TIER=free
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.professor2k8/agent-security-lens",
4
+ "title": "AgentSecurityLens",
5
+ "description": "Security intelligence MCP for agents to review MCPs, Skills and tools before installation.",
6
+ "status": "active",
7
+ "repository": {
8
+ "url": "https://github.com/professor2k8/agent-security-lens",
9
+ "source": "github"
10
+ },
11
+ "version": "0.1.0",
12
+ "packages": [
13
+ {
14
+ "registryType": "npm",
15
+ "identifier": "agent-security-lens",
16
+ "version": "0.1.0",
17
+ "transport": {
18
+ "type": "stdio"
19
+ },
20
+ "environmentVariables": [
21
+ {
22
+ "name": "ASL_API_URL",
23
+ "description": "AgentSecurityLens Cloud Intelligence API URL.",
24
+ "isRequired": false,
25
+ "default": "https://api.agentsecuritylens.com"
26
+ },
27
+ {
28
+ "name": "ASL_API_KEY",
29
+ "description": "Optional API key for Team, Pro or Enterprise use.",
30
+ "isRequired": false,
31
+ "isSecret": true
32
+ },
33
+ {
34
+ "name": "ASL_MODE",
35
+ "description": "Set to local for offline fallback mode.",
36
+ "isRequired": false,
37
+ "default": "online"
38
+ }
39
+ ]
40
+ }
41
+ ]
42
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ First public release.
6
+
7
+ ### Added
8
+
9
+ - Agent-facing MCP for pre-install component decisions
10
+ - Machine-readable decision contract and ordered Agent actions
11
+ - MCP, Skill, tool, workflow, prompt bundle, and memory component review
12
+ - Unknown-component submission and research-status workflow
13
+ - Install outcome and decision feedback
14
+ - Evidence-backed restrictions and alternative recommendations
15
+ - Online intelligence lookup with local fallback
16
+ - Versioned security evaluation standard
17
+ - Strict-reviewed, curated-baseline, and automatic-assessment intelligence states
package/LICENSE ADDED
@@ -0,0 +1,17 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2026 AgentSecurityLens contributors
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
package/PRIVACY.md ADDED
@@ -0,0 +1,37 @@
1
+ # AgentSecurityLens Privacy Notice
2
+
3
+ Last updated: June 15, 2026
4
+
5
+ AgentSecurityLens is designed for autonomous agents that request security intelligence before installing or enabling components.
6
+
7
+ ## Data the Service May Receive
8
+
9
+ Depending on configuration, the online service may receive:
10
+
11
+ - component name and type
12
+ - public source or registry URL
13
+ - package name, version, and public install command
14
+ - requested permission or capability metadata
15
+ - ASL decision and install outcome
16
+ - anonymous or pseudonymous client identifiers
17
+ - feedback about missing components, incorrect decisions, or alternatives
18
+
19
+ ## Data the Service Does Not Request
20
+
21
+ Do not submit:
22
+
23
+ - private source code or private file contents
24
+ - API keys, passwords, tokens, or SSH keys
25
+ - browser cookies or personal browser history
26
+ - private prompts, memories, or customer records
27
+ - secrets contained in environment variables
28
+
29
+ The public MCP should submit public component metadata only.
30
+
31
+ ## Purpose
32
+
33
+ Received data is used to return Agent-readable decisions, identify unknown or changed components, improve risk signals and alternatives, and protect service reliability.
34
+
35
+ ## Retention
36
+
37
+ Operational records may be retained for security research, abuse prevention, and service improvement. Do not submit personal or confidential data.
package/README.md ADDED
@@ -0,0 +1,150 @@
1
+ # AgentSecurityLens
2
+
3
+ AgentSecurityLens (ASL) is a security intelligence MCP for autonomous agents.
4
+
5
+ Before an agent installs or enables an MCP, Skill, tool, prompt bundle, workflow, or memory component, it can ask ASL for a machine-readable install decision.
6
+
7
+ ## Install
8
+
9
+ ```json
10
+ {
11
+ "mcpServers": {
12
+ "agent-security-lens": {
13
+ "command": "npx",
14
+ "args": ["-y", "agent-security-lens"]
15
+ }
16
+ }
17
+ }
18
+ ```
19
+
20
+ Node.js 20 or newer is required.
21
+
22
+ ## Online Configuration
23
+
24
+ The public MCP uses online intelligence by default:
25
+
26
+ ```text
27
+ ASL_API_URL=https://api.agentsecuritylens.com
28
+ ASL_API_URLS=https://api.agentsecuritylens.com
29
+ ```
30
+
31
+ `ASL_API_URLS` may contain multiple comma-separated endpoints. The MCP tries them in order and falls back automatically.
32
+
33
+ ## Agent Policy
34
+
35
+ Agents should call `get_install_policy` after connecting, then call `review_before_install` before every component installation.
36
+
37
+ ```text
38
+ allow install from the recorded source and version
39
+ allow_with_restrictions apply every safe_install_plan item before installation
40
+ ask_user stop automatic installation and request confirmation
41
+ avoid do not install automatically
42
+ ```
43
+
44
+ Unknown or incompletely reviewed components never receive automatic-install authorization.
45
+
46
+ Recommended instruction:
47
+
48
+ ```text
49
+ Before installing or enabling any MCP, Skill, tool, prompt bundle, workflow,
50
+ or memory component, call AgentSecurityLens review_before_install.
51
+ Follow agent_decision_contract and agent_actions exactly.
52
+ Never submit private source code, secrets, tokens, cookies, or file contents.
53
+ ```
54
+
55
+ ## MCP Tools
56
+
57
+ - `get_install_policy`: returns the current Agent execution policy.
58
+ - `review_before_install`: evaluates a proposed component and installation context.
59
+ - `check_component`: retrieves known component intelligence.
60
+ - `recommend_alternatives`: returns evidence-backed alternatives and mitigations.
61
+ - `submit_unknown_component`: submits public metadata for research.
62
+ - `get_research_status`: checks whether an unknown component has been reviewed.
63
+ - `report_install_outcome`: reports the result of an Agent action.
64
+ - `submit_decision_feedback`: reports useful, incorrect, or incomplete decisions.
65
+ - `discover_workspace`: discovers Agent, MCP, and Skill environments.
66
+ - `scan_workspace`: performs a local fallback assessment.
67
+
68
+ ## Decision Contract
69
+
70
+ Example request:
71
+
72
+ ```json
73
+ {
74
+ "component_name": "filesystem",
75
+ "component_type": "mcp",
76
+ "source_url": "https://github.com/modelcontextprotocol/servers",
77
+ "install_command": "npx -y @modelcontextprotocol/server-filesystem .",
78
+ "planned_use": "Read and edit project files.",
79
+ "requested_permissions": ["filesystem-read", "filesystem-write"],
80
+ "submit_if_unknown": true
81
+ }
82
+ ```
83
+
84
+ Example response shape:
85
+
86
+ ```json
87
+ {
88
+ "decision": "ask_user",
89
+ "risk_signals": ["filesystem-read", "filesystem-write", "shell-execution"],
90
+ "safe_install_plan": [
91
+ "Restrict filesystem scope to the current project directory.",
92
+ "Prefer read-only mode when the task only needs inspection.",
93
+ "Pin the package version before enabling it."
94
+ ],
95
+ "agent_decision_contract": {
96
+ "automatic_install_allowed": false,
97
+ "user_confirmation_required": true,
98
+ "blocks_install": true
99
+ },
100
+ "one_step_action": {
101
+ "action_type": "ask_user_before_install"
102
+ }
103
+ }
104
+ ```
105
+
106
+ Agents must execute the structured fields rather than infer policy from prose.
107
+
108
+ ## Intelligence States
109
+
110
+ - `strict_reviewed`: versioned evidence, technical scan, community-source check, and independent recalculation completed.
111
+ - `curated_baseline`: manually curated fallback information with limited evidence.
112
+ - `automatic_assessment`: automated coverage that cannot authorize automatic installation.
113
+ - `unknown`: no matching intelligence record.
114
+
115
+ ASL evaluates observable behavior and installation context. It does not label a component malicious without evidence.
116
+
117
+ The v0.1.0 public fallback contains 30 strict reviewed records and 20 curated fallback baselines. Automatic assessments are available through the online service but cannot authorize automatic installation.
118
+
119
+ ## Privacy
120
+
121
+ Online lookup uses public component metadata only. Do not submit:
122
+
123
+ - private source code or file contents
124
+ - API keys, passwords, tokens, or SSH keys
125
+ - browser cookies or personal browser history
126
+ - private prompts, memories, or customer records
127
+ - secrets from environment variables
128
+
129
+ See [PRIVACY.md](PRIVACY.md) and [SECURITY.md](SECURITY.md).
130
+
131
+ ## Local Fallback
132
+
133
+ ```powershell
134
+ $env:ASL_MODE="local"
135
+ npx -y agent-security-lens
136
+ ```
137
+
138
+ Local fallback provides basic rules and a limited public intelligence baseline. The current online intelligence service should be preferred when available.
139
+
140
+ ## Verification
141
+
142
+ ```bash
143
+ npm run verify:public
144
+ ```
145
+
146
+ The scoring method is documented in [ASL Agent Component Safety Standard v0.2](docs/asl-agent-component-safety-standard-v0.2.md).
147
+
148
+ ## License
149
+
150
+ Apache-2.0