executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
analyzing-api-gateway-access-logs解析 API 网关访问日志(AWS API Gateway、Kong、Nginx),检测 BOLA/IDOR 攻击、速率限制绕过、凭据扫描和注入尝试。使用 pandas 进行请求模式的统计分析和异常检测。适用于调查 API 滥用或构建 API 专项威胁检测规则。
Independent GitHub snapshot · Automated classification · Original documentation governs
解析 API 网关访问日志,识别攻击模式,包括对象级别授权缺失(BOLA)、过度数据暴露和注入尝试。
import pandas as pd
df = pd.read_json("api_gateway_logs.json", lines=True)
# 检测 BOLA:同一用户访问大量不同资源 ID
bola = df.groupby(["user_id", "endpoint"]).agg(
unique_ids=("resource_id", "nunique")).reset_index()
suspicious = bola[bola["unique_ids"] > 50]
关键检测模式:
# 检测 401 激增,指示凭据扫描
auth_failures = df[df["status_code"] == 401]
scanner_ips = auth_failures.groupby("source_ip").size()
scanners = scanner_ips[scanner_ips > 100]