360 Secure SkillHub
360 安全技能中心

OpenClaw Policy Check

该 Skill 通过运行 scripts/policy_check.py 对指定文件或目录做执行前安全策略扫描,识别高风险代码模式、密钥泄露与危险 shell 行为,可按严重级别设置非零退出阈值或输出 JSON,并汇总发现总数、级别分布和高危项修复建议。

spbavarva
spbavarva
热度 82.71
最近更新 2026-05-11 16:51:55
分类:安全依赖:代码执行 / 读写文件应用场景:代码审查

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add openclaw-policy-check
Metadata
name
openclaw-policy-check
description
Scan repositories for risky security patterns before execution. Use when users ask for a quick preflight security check, policy enforcement scan, suspicious code triage, or detection of unsafe commands, secret leakage, and dangerous shell behavior.

OpenClaw Policy Check

Run a lightweight policy scan to catch common high-risk patterns in code and scripts.

Inputs

  • target_path (required): file or directory to scan.
  • fail_on (optional): severity threshold for non-zero exit. One of critical, high, medium, low.
  • json_output (optional): print raw JSON output.

Workflow

  1. Run scripts/policy_check.py on the target path.
  2. Review severity counts and top findings.
  3. If findings exist, prioritize critical and high items first.
  4. Suggest concrete fixes for each flagged pattern.

Commands

python3 scripts/policy_check.py "<target_path>"
python3 scripts/policy_check.py "<target_path>" --json
python3 scripts/policy_check.py "<target_path>" --fail-on high

Response Contract

  • Always include total findings and severity breakdown.
  • Include top findings with file:line, rule id, and reason.
  • If no findings exist, explicitly state that no policy violations were detected.
  • Keep remediation guidance concrete and brief.