用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/DanielMR-dev/LogHunter-CLI --skill detection-engineering命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | detection-engineering |
| description | Implement and review deterministic per-source brute-force detection for LogHunter. |
| license | MIT |
| metadata | {"project":"loghunter-cli","domain":"detection"} |
def detect_brute_force(
events: Iterable[AuthEvent],
*,
threshold: int = 5,
window_seconds: int = 60,
) -> DetectionResult: ...
Reject threshold or window values below one before consuming events. Consume normalized events
once; do not read files, parse raw lines, call the analyzer, or retain raw input.
AuthEventType.LOGIN_FAILED participates. Invalid-user failures count and contribute their
username. Standalone invalid-user and successful events do not count, clear, split, or lower state.current - oldest <= window, and evict only while the difference is greater.Severity is Medium for T <= C < 2T, High for 2T <= C < 3T, and Critical for C >= 3T.
Sort finalized findings by explicit severity rank descending, attempts descending, last observation
descending using direct datetime comparison, canonical source text ascending, and first observation
ascending. Never order naive datetimes through timestamp().
Memory must remain O(s + w + f): per-source bounded active deques, source state, and finalized
findings only. Do not materialize the input or globally sort it.
Cover below/at/above threshold; inclusive and outside-window boundaries; all severity boundaries; IPv4, IPv6, and independent sources; invalid-user failure versus standalone invalid-user; successes; unique sorted users; duplicate suppression; separated bursts; strongest and equal-peak replacement; per-source chronology including equal timestamps and valid global interleaving; invalid configuration before consumption; empty, generator, and single-use iterables; and complete deterministic ordering.