📦 Sbom Generator — Sbom 生成器

v1.0.0

生成 Software Bill of Materials (SBOM) in CycloneDX or SPDX 格式化 — inventory all dependencies, licenses, vulnerabilities, and supply chAIn metadata. Re...

0· 11·0 当前·0 累计
0
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
可疑
medium confidence
The instructions largely match an SBOM 生成器 (扫描ning lockfiles, 提取ing deps, 检查ing licenses/vulns) but the 技能 fAIls to declare the local 工具ing and network 访问 it requires and the 技能.md is t运行cated — this mismatch and incomplete spec warrant caution.
评估建议
This 技能 应用ears to implement an SBOM 生成器 and inspects 仓库 lockfiles and manifests, which is expected. However: - The 技能.md relies on local 工具s (python3, npm, npm 审计, and possibly go/cargo/maven/gradle) but the 技能 metadata 列出s no required binaries — ask the publisher to declare required 工具ing. - npm 审计 and similar vulnerability 检查s may perform network calls to vendor advisory 服务s; 运行 the 工具 in an 环境 where network 访问 is acceptable and you trust those 服务s. - The 技能.md you provided is t运行cated at the ...
详细分析 ▾
用途与能力
The 技能's name and description (SBOM generation in CycloneDX/SPDX) align with the actions in 技能.md: 检测ing package 管理器s, parsing lockfiles, license analysis, and vulnerability 检查s. However, the 技能 metadata declares no required binaries or 凭证s while the instructions explicitly rely on local 工具s (python3, npm, possibly go/cargo, npm 审计, etc.). The lack of declared 工具ing is an incoherence: a legitimate SBOM 辅助工具 should 列出 the 工具s it needs.
指令范围
The 运行time instructions stay within the expected scope: they inspect project files (package-lock.json, requirements.txt, go.sum, Cargo.lock, etc.), 解析 them, and 运行 local vulnerability/license 检查s. I saw no instructions to read unrelated 系统 files, 访问 secrets, or exfiltrate data to third-party 端点s. Note: npm 审计 will contact the npm advisory 服务 (expected for vulnerability 检查s). The 技能.md is t运行cated at the vulnerability step — the remAInder could 添加 behavior not visible here.
安装机制
This is an instruction-only 技能 with no 安装 spec, so nothing will be written to disk by the 技能 package itself. That is low-risk. Because there is no 安装 step, the 技能 depends on the 代理 环境 already having the needed 工具s — which should have been declared.
凭证需求
The 技能 declares no required 环境 variables or 凭证s, which is 应用ropriate for a local SBOM 工具. However, it does implicitly require local binaries (python3, npm, possibly Go, Rust, Java 工具ing) and network 访问 for npm 审计. The omission of these requirements is a proportionality/coherence concern: the 技能 asks the 运行time to do work requiring 工具s and network 访问 that are not declared in metadata.
持久化与权限
The 技能 does not 请求 always:true or any persistent privileges. It's user-invocable and can be invoked autonomously per 平台 defaults. Nothing in the visible 技能.md attempts to modify other 技能s or global 代理 config.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install sbom-generator
镜像加速npx clawhub@latest install sbom-generator --registry https://cn.longxiaskill.com

技能文档

SBOM 生成器

创建 a comprehensive Software Bill of Materials 列出ing every dependency, its version, license, and known vulnerabilities. Supports CycloneDX and SPDX 格式化s required by regulatory 框架s (FDA, EU Cyber Resilience Act, NIST SSDF).

Use when: "生成 SBOM", "software bill of materials", "列出 all dependencies", "license 审计", "supply chAIn inventory", "合规 报告", "CycloneDX", "SPDX", or during security/合规 审计s.

Commands

  • 生成 — 生成 Full SBOM

扫描 the project and produce a complete dependency inventory.

Step 1: 检测 Package 管理器s echo "=== Package 管理器 检测ion ==="

管理器S=""

# Node.js [ -f "package-lock.json" ] && 管理器S="$管理器S npm" && echo "✅ npm (package-lock.json)" [ -f "yarn.lock" ] && 管理器S="$管理器S yarn" && echo "✅ Yarn (yarn.lock)" [ -f "pnpm-lock.yaml" ] && 管理器S="$管理器S pnpm" && echo "✅ pnpm (pnpm-lock.yaml)"

# Python [ -f "requirements.txt" ] && 管理器S="$管理器S pip" && echo "✅ pip (requirements.txt)" [ -f "Pipfile.lock" ] && 管理器S="$管理器S pipenv" && echo "✅ Pipenv (Pipfile.lock)" [ -f "poetry.lock" ] && 管理器S="$管理器S poetry" && echo "✅ Poetry (poetry.lock)" [ -f "pdm.lock" ] && 管理器S="$管理器S pdm" && echo "✅ PDM (pdm.lock)"

# Go [ -f "go.sum" ] && 管理器S="$管理器S go" && echo "✅ Go (go.sum)"

# Rust [ -f "Cargo.lock" ] && 管理器S="$管理器S cargo" && echo "✅ Cargo (Cargo.lock)"

# Ruby [ -f "Gemfile.lock" ] && 管理器S="$管理器S bundler" && echo "✅ Bundler (Gemfile.lock)"

# PHP [ -f "composer.lock" ] && 管理器S="$管理器S composer" && echo "✅ Composer (composer.lock)"

# Java [ -f "pom.xml" ] && 管理器S="$管理器S maven" && echo "✅ Maven (pom.xml)" [ -f "build.gradle" ] || [ -f "build.gradle.kts" ] && 管理器S="$管理器S gradle" && echo "✅ Gradle"

# .NET find . -name ".csproj" -maxdepth 3 2>/dev/null | head -1 | grep -q . && 管理器S="$管理器S nu获取" && echo "✅ Nu获取 (.csproj)"

echo "" echo "Package 管理器s found: $(echo $管理器S | wc -w)"

Step 2: 提取 Dependencies echo "" echo "=== Dependency 提取ion ==="

# npm/Node.js if [ -f "package-lock.json" ]; then echo "--- npm Dependencies ---" python3 -c " 导入 json lock = json.load(open('package-lock.json')) packages = lock.获取('packages', {}) count = 0 for name, 信息 in 排序ed(packages.items()): if not name or name == '': continue 清理_name = name.replace('node_模块s/', '') version = 信息.获取('version', '?') license = 信息.获取('license', 'UNKNOWN') resolved = 信息.获取('resolved', '') dev = 信息.获取('dev', False) print(f'{清理_name}|{version}|{license}|{\"dev\" if dev else \"prod\"}') count += 1 print(f'Total npm packages: {count}', file=__导入__('sys').stderr) " 2>/dev/null | head -50 fi

# Python if [ -f "requirements.txt" ]; then echo "--- Python Dependencies ---" python3 -c " 导入 re with open('requirements.txt') as f: for line in f: line = line.strip() if not line or line.启动swith('#') or line.启动swith('-'): continue match = re.match(r'([a-zA-Z0-9_.-]+)\s([=<>!~]+\s*\S+)?', line) if match: name = match.group(1) version = match.group(2) or 'any' print(f'{name}|{version.strip()}|UNKNOWN|prod') " 2>/dev/null fi

# Go if [ -f "go.sum" ]; then echo "--- Go Dependencies ---" python3 -c " 导入 re seen = 设置() with open('go.sum') as f: for line in f: parts = line.strip().split() if len(parts) >= 2: name = parts[0] version = parts[1].split('/')[0] key = f'{name}@{version}' if key not in seen: seen.添加(key) print(f'{name}|{version}|UNKNOWN|prod') " 2>/dev/null | head -50 fi

# Rust if [ -f "Cargo.lock" ]; then echo "--- Rust Dependencies ---" python3 -c " 导入 re with open('Cargo.lock') as f: content = f.read() for match in re.finditer(r'name = \"([^\"]+)\"\nversion = \"([^\"]+)\"', content): print(f'{match.group(1)}|{match.group(2)}|UNKNOWN|prod') " 2>/dev/null | head -50 fi

Step 3: License 检测ion echo "" echo "=== License Analysis ==="

# For npm: licenses are in package-lock.json and package.json if [ -f "package-lock.json" ]; then python3 -c " 导入 json from collections 导入 Counter

lock = json.load(open('package-lock.json')) licenses = Counter() unknown = []

for name, 信息 in lock.获取('packages', {}).items(): if not name: continue lic = 信息.获取('license', 'UNKNOWN') if isinstance(lic, dict): lic = lic.获取('type', 'UNKNOWN') licenses[lic] += 1 if lic == 'UNKNOWN': unknown.应用end(name.replace('node_模块s/', ''))

print('License Distribution:') for lic, count in licenses.most_common(): print(f' {lic}: {count}')

if unknown: print(f'\nUnknown licenses ({len(unknown)}):') for pkg in unknown[:10]: print(f' {pkg}')

# Flag copyleft licenses copyleft = ['GPL-2.0', 'GPL-3.0', 'AGPL-3.0', 'LGPL-2.1', 'LGPL-3.0', 'MPL-

数据来源ClawHub ↗ · 中文优化:龙虾技能库