huawei-cloud-skill-audit
БесплатноЗапускает вложенные скриптыНе проверенAudit Huawei Cloud skills for quality, security, and compliance using a three-check pipeline: skillspector (AI security), gitleaks (credential leak), and…
от huaweicloudskill705 установок в других каталогахОб этом скилле
Huawei Cloud Skill Audit
Three-check security pipeline for auditing Huawei Cloud skills — security gate.
Step 0: Install skill-quality-cli (idempotent, skip if already installed)
先设置
AUDIT_DIR为本 skill 安装目录的绝对路径(export AUDIT_DIR=/path/to/huawei-cloud-skill-audit, 示例:$HOME/.local/share/huawei-cloud-skill-audit), 后续所有命令统一用它, 禁止在被审计目录内使用相对路径执行本 skill 的脚本(防目录内恶意同名脚本劫持, 见 Core Commands 安全要求)。
⚠️ Mandatory: every
hcloudcommand in this skill MUST be wrapped withskill-quality-cli run --skill-name huawei-cloud-skill-audit --— barehcloudcalls are strictly forbidden.
export AUDIT_DIR=/path/to/huawei-cloud-skill-audit # 替换为实际安装目录
bash "$AUDIT_DIR/scripts/ensure_cli.sh"
安装行为说明:
- 已装且可用 → 静默跳过; 未装 → 从华为云 OBS(HTTPS) 下载官方包(wrapper + ELF + Python fallback, low-GLIBC 兼容)安装到
~/.local/bin/。- 离线/安装失败 → stderr 打印
警告:后跳过, 不阻塞业务流(但 wrapped 命令将command not found, 正式场景必须保证安装成功)。- 调试/离线场景可用裸命令
python3 "$AUDIT_DIR/scripts/skill_audit.py" ...(见 Core Commands 安全要求与统一说明)。
Overview
Scan a single Huawei Cloud skill directory or a folder of skills, run three security gates, and generate a structured report with issue details and fix strategies.
Three checks:
| # | Tool | Check Content | Implementation |
|---|---|---|---|
| 1 | skillspector | AI skill security scanner: 52 rules / 620 patterns across 18 categories (prompt injection, data exfiltration, privilege escalation, supply chain, behavioral AST, taint tracking, MCP analysis, YARA) | Built-in (pure Python, 52 rules + AST analysis) |
| 2 | gitleaks | Credential leak scan: 43 rules detecting hardcoded API keys, passwords, private keys, tokens | Built-in (pure Python, 43 rules + Shannon entropy) |
| 3 | runtime_security | CWE high-risk runtime patterns: 36 rules (command injection, deserialization, credential theft, sandbox escape, persistence, destructive ops, mining) + 3 skill-quality rules (Q001-Q003) | Built-in (pure Python, level-independent, all rules always run) |
规则数(52/620、43、36+3)以
scripts/checks/*rules.json为准, 增删规则后请同步更新本表。
⚠️ gitleaks 扫描范围限制(使用前必读):
- gitleaks 以
--no-git模式运行,仅扫描当前工作区文件内容,不扫描 git 历史。- gitleaks 不检测中文关键词凭据,此类凭据需配合
gitcode-security-scanner检测(见 Security Scanning 互补工具表)。
Dependency: Quality telemetry is collected automatically via skill-quality-cli (installed by scripts/ensure_cli.sh if absent; 安装/升级/禁用遥测的具体命令见 references/cli-installation-guide.md).
Prerequisites
- Python 3.10+ — for the built-in skillspector and gitleaks checks
- Node.js + npx — Optional; only needed for manual
markdownlint-cli2 --fixduring remediation - hcloud CLI — For Huawei Cloud service verification (optional, used in verification only)
- Huawei Cloud AK/SK — Not required for audit itself, but needed if verifying skill functionality after audit
skill-quality-cli— ensured bybash "$AUDIT_DIR/scripts/ensure_cli.sh"(idempotent, skips if present)
- Upgrade: run
skill-quality-cli upgrade(stays up to date on each run; manual control available) - Disable telemetry report: set
SKILL_QUALITY_REPORT=0
内置 / 外部二进制说明:
- 默认内置: skillspector 与 gitleaks 均为纯 Python 实现, 无需外部二进制或 pip 安装。
- 外部路径显式指定才生效: 传
--skillspector/--gitleaks<path>时才使用外部二进制。 - PATH 自动发现已禁用(2026-09-23, fail-closed): 不再从 PATH 探测, 避免 PATH 被注入同名恶意二进制静默接管审计。
- 外部二进制不校验签名/哈希: 请确保其来源可信(PATH 无同名二进制, 下载来源受控)。
- 默认行为: 不传
--skillspector/--gitleaks时, 恒使用内置纯 Python 实现, 与 scan level 无关。
To skip fallback auto-install of external binaries, use --no-install flag.
Workflow
Input (skill path or folder)
│
├── Discover Skills ──── Find SKILL.md in target or subdirectories
│
├── Run Three Checks ────
│ 1. skillspector → AI security scan (52 rules, 620 patterns)
│ 2. gitleaks → Credential leak detection
│ 3. runtime_security → CWE high-risk runtime patterns (36 + 3 rules)
│
├── Build Report ────
│ Section 1: Scanned Skills
│ Section 2: Check Summary (per-check files/rules/findings + pass rate)
│ Section 3: Issue Summary (by severity)
│ Section 4: Issue Details (per-issue)
│ Section 5: Fix Strategies (per rule/category)
│
└── Gate Verdict ──── PASS or FAIL
Scan Levels
| Level | Analyzers | Speed | Use Case |
|---|---|---|---|
critical |
"critical" severity rules only (P5 harmful content) | Fast | Strictest gate |
high |
"critical" + "error" severity rules + AST (exec/eval/os.system/反序列化) | Fast | Block high-risk issues |
quick |
Pattern matching only (all static regex rules) | Fast | Quick pre-commit check |
standard |
All static analyzers (high 基础上放开 WARNING/INFO 级 AST + taint tracking) | Medium | CI/CD gate |
deep |
Standard + MCP analysis (least privilege, tool poisoning, rug pull) | Slower | Pre-release full audit |
Установить huawei-cloud-skill-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-skill-audit?
Audit Huawei Cloud skills for quality, security, and compliance using a three-check pipeline: skillspector (AI security), gitleaks (credential leak), and runtime_security (CWE 高危运行模式). Generates structured reports with issue details and fix strategies. Triggers include: "审计技能","技能审计","检查技能质量","扫描技能问题","技能安全审计", "audit skill","check skill quality","scan skills for issues","skill audit", "华为云技能审计","技能合规检查","skill gate","质量门禁","技能检查", "audit huawei cloud skill","verify skill compliance","技能质量检查","跑审计","安全扫描".
Как установить скилл huawei-cloud-skill-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-skill-audit запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub