detector
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "detector" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-e954dd85c8629ae3f536a4b7cb8d393d3e251cb5de51d0fd33023b4b2ba0db56. Verify the upstream source and version against https://skillhub.cn/skills/user_f12a44b7/clawhong-anomaly-detector before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
CNB repository anomaly detection: monitors abnormal commit patterns (sensitive file changes, bulk deletions, commits at unusual times, sudden activity changes) and alerts immediately when security issues are detected. Suitable for repository security inspections and scheduled security monitoring scenarios.
Introduction source: third_party · user_f12a44b7 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- python3 scripts/anomaly_detector.py --json ```
- Software, accounts and paid services
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: detector
slug: clawhong-anomaly-detector
description: "CNB仓库异常行为检测:监控仓库异常提交模式(敏感文件变更、大批量删除、异常时段提交、活跃度突变),发现安全问题即时告警。适用于仓库安全巡检、定时安全监控场景。"
version: 1.0.0
displayName: "Clawhong Anomaly Detector"anomaly-detector
CNB仓库异常行为检测Skill:监控CNB仓库的异常提交模式,发现安全问题即时群聊告警。
触发条件
- cron定时触发(推荐每30分钟)
- 手动执行安全检查时
- 关键词:仓库安全监控、异常检测、变更告警
检测规则
1. 敏感文件变更(CRITICAL)
- 检测
.env、credentials、*.pem、*.key、id_rsa*、secret*等敏感文件的新增或修改 - 命中即告警
2. 大批量删除(CRITICAL)
- 单次commit删除文件数 > 10 视为异常
- 删除 > 50 文件视为严重事件
3. 异常时段提交(WARN)
- 凌晨 03:00-05:00(UTC+8)的批量提交(>3个文件变更)
- 非工作时间的仓库权限变更
4. 仓库活跃度突变(INFO)
- 之前stale(>14天无提交)的仓库突然有大量提交
- 单仓库1小时内commit数 > 10
API依赖
- CNB API: 获取仓库提交记录
- Dashboard API: 群聊告警发送
- 认证: CNB_TOKEN / DASHBOARD_TOKEN
使用方法
# 检测所有仓库
python3 scripts/anomaly_detector.py
# 仅检测指定仓库
python3 scripts/anomaly_detector.py --repo cnbll/clawhong-skill/skills
# 检测并告警
python3 scripts/anomaly_detector.py --alert
# JSON输出(供其他skill消费)
python3 scripts/anomaly_detector.py --json
告警格式
[CRITICAL] 仓库安全告警 | repo: xxx | 敏感文件变更: .env, credentials.json
[WARN] 异常时段提交 | repo: xxx | 03:22提交了5个文件
[INFO] 活跃度突变 | repo: xxx | stale 21天后突然有12次commit
配置
- CNB_TOKEN: CNB API认证(环境变量)
- DASHBOARD_TOKEN: Dashboard API认证(环境变量)
- ALERT_SENDER: 告警发送者ID(默认openclaw-c)
- SENSITIVE_PATTERNS: 敏感文件匹配规则(默认见上方规则1)
- QUIET_HOURS_START: 异常时段开始(默认3,即03:00 UTC+8)
- QUIET_HOURS_END: 异常时段结束(默认5,即05:00 UTC+8)
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Areas to improve
-
缺少独立When to Use章节 Reported severity: Minor
文档中未设置独立的When to Use章节,使用场景描述分散在触发条件中
Recommendation: 建议增加独立的When to Use章节,更清晰地说明适用场景和使用时机
Highlights
- 提供完整的仓库安全监控解决方案,覆盖敏感文件、批量删除、异常时段、活跃度突变四大核心检测维度
- 适用于企业代码仓库安全巡检和定时监控场景,具备明确实用价值
Highlights
- 触发条件覆盖完整:支持cron定时、手动执行、关键词触发三种方式
- 边界清晰:明确区分不同触发场景,避免误触或漏触
Highlights
- 文档结构完整:包含检测规则、API依赖、使用方法、告警格式、配置说明等完整模块
- 提供丰富的使用示例和告警格式示例,便于用户理解和实施
Highlights
- API依赖明确:清晰列出CNB API和Dashboard API依赖及认证方式
- 配置完整:提供所有必要的环境变量配置说明,确保执行可靠性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 21, 58
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.