360 Secure SkillHub
360 安全技能中心

灰样本测试

该 Skill 以 scripts/detect.py 配合 references/security_rules.yml 规则,扫描代码库中的硬编码凭据、SQL 注入、命令注入、不安全 eval/exec、弱加密、路径遍历、XSS 等安全反模式,并可按严重级别检查依赖的已知 CVE,支持生成 SARIF 报告供 CI/CD 使用。它是模式匹配工具而非完整 SAST,会产生误报,发现项需人工复核。

360U2978313931
360U2978313931
热度 10.36
最近更新 2026-06-15 13:44:30
分类:安全依赖:代码执行 / 读写文件应用场景:代码审查 / DevOps

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add sectestgravy122311
Metadata
name
threat-detector
description
Scan code and configurations for security anti-patterns, hardcoded credentials, and vulnerable dependency patterns. Designed for dev environments.
version
1.8.0
license
MIT
compatibility
claude-code, cursor, codex
allowed-tools
Read, Bash, WebFetch

Threat Detector

Detect common security anti-patterns in your codebase before they reach production.

What it detects

  • Hardcoded credentials (passwords, API keys, tokens, secrets)
  • SQL injection patterns in string concatenation
  • Command injection via subprocess/shell usage
  • Unsafe eval/exec usage
  • Insecure dependency versions (checked against known CVEs)
  • Missing CSRF protection
  • Weak cryptography (MD5, SHA1, DES, RC4)
  • Open redirect vulnerabilities
  • Path traversal patterns
  • XSS patterns in templates

Usage

# Scan entire project
python scripts/detect.py --path ./src --rules security_rules.yml

# Check dependencies for known CVEs
python scripts/detect.py --check-deps --severity HIGH,CRITICAL

# Generate SARIF report for CI/CD
python scripts/detect.py --path ./src --format sarif --output scan.sarif

Detection Rules

Rules are defined in references/security_rules.yml. Each rule has:

  • Pattern (regex or AST pattern)
  • Severity (CRITICAL/HIGH/MEDIUM/LOW)
  • Category (OWASP Top 10 mapping)
  • False positive examples (patterns to exclude)

False Positive Handling

This is a pattern-matching tool, not a SAST. It will generate false positives. Always review findings before blocking CI/CD pipelines.