360 Secure SkillHub
360 安全技能中心

Security Sentinel Ultimate

该 Skill 通过 python3 运行 scanner.py,递归扫描指定技能目录下的 .py 文件,检测 os.system、eval/exec 等危险调用,硬编码密钥、网络调用、getattr/动态导入/chr 混淆和隐藏文件,按文件与类别给出三级严重度并输出 Markdown 报告,仅作检测不自动修复。

liverock
liverock
热度 38.92
最近更新 2026-05-11 17:40:52
分类:安全依赖:代码执行 / 读写文件应用场景:代码审查 / 报告撰写

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add security-sentinel-ultimate
Metadata
name
security-sentinel-ultimate
description
Scans a skill directory for security issues and best practices
tools
[{"name":"scan_skill","description":"Analyzes a skill directory for security vulnerabilities, misconfigurations, and compliance with best practices.","arguments":[{"name":"path","description":"The file path to the skill directory to scan.","type":"string","required":true}],"execution":{"command":"python3 {{SKILL_DIR}}/scanner.py \"{{path}}\"","output_format":"markdown"}}]

Security Sentinel

Scans a skill directory for security issues, misconfigurations, and best practices.

What It Detects

Category Examples Severity
Dangerous calls (critical) os.system, eval, exec 🔴 Critical
Dangerous calls (warning) subprocess.run, os.popen 🟡 Warning
Hardcoded secrets API keys, tokens, passwords, credentials in string literals 🔴 Critical
Network calls requests.get, urllib.request.urlopen, http.client 🟡 Warning
Obfuscation getattr indirection, __import__/importlib dynamic loading, chr()-encoded strings 🔴 Critical
Hidden files Files and directories starting with . (e.g. .env, .hidden_script.py) 🟡 Warning

Severity Model

The scanner uses a three-tier severity system:

Status Meaning
🔴 CRITICAL Immediate security risk — hardcoded secrets, eval/exec, os.system, obfuscation detected. Requires urgent review.
🟡 WARNING Potential risk — subprocess usage, network calls, hidden files. Review recommended.
🟢 OK No findings. File is clean.

Each file gets an individual severity rating. The overall status is the highest severity across all files — if even one file is red, the entire scan is marked CRITICAL.

Obfuscation Defenses (Defensive Depth)

The scanner catches three common bypass techniques:

  1. getattr indirection — getattr(os, 'system')('whoami') is flagged because the second argument resolves to a known dangerous attribute name.
  2. Dynamic imports — __import__('subprocess') and importlib.import_module('subprocess') are both detected and flagged as dangerous module loads.
  3. String construction — Secrets built via concatenation (key = "sk-" + "abcd...") or chr() sequences are resolved at scan time and matched against secret patterns.

Usage

The scan_skill tool accepts a path argument pointing to a skill directory. It runs scanner.py against all .py files in that directory tree and returns a Markdown report with tables of findings grouped by file and category.