Lp3
Medium
- Category
- MCP Least Privilege
- Confidence
- 70% confidence
- Finding
- Without declared permissions the skill's intent is opaque and cannot be validated.
Security audit
Security checks for vulnerabilities and agentic risk
The skill is not malicious, but it mixes observability with persistent preference-learning and self-modification guidance that users should review before installing.
Install only if you are comfortable with a local skill retaining preference and usage/error notes in learned_patterns.json. Review or clear that file regularly, avoid logging secrets or sensitive payloads, and treat the advertised audit-log persistence as incomplete until the logger is fixed.
# 1) 入链
log.emit("tool_call", "read /etc/hosts", "ok", "agent-7", "low", duration_ms=12)
log.emit("tool_call", "write /tmp/x", "ok", "agent-7", "low", duration_ms=30)
log.emit("tool_call", "delete /data", "error", "agent-7", "critical", duration_ms=5)
log.emit("llm_call", "plan next", "ok", "planner", "low", duration_ms=420)
assert len(log.events) == 4
print("[1] 入链 4 条事件 ✓")# 2) 查询过滤
errs = log.query(status="error")
assert len(errs) == 1 and errs[0]["action"] == "delete /data"
print("[2] 查询 status=error -> 1 条 ✓")
# 3) 错误率No suspicious patterns detected.