#!/usr/bin/env bash
# 组合包安装脚本（Trove 自动生成，勿手改；组合包文档为准）
# combo: combo-security-preflight ｜ 安全前置（agentshield + skillspector） ｜ 状态: verified
# 生成: 2026-09-24 ｜ 详情: https://trove.xin/combos/combo-security-preflight.html ｜ 依赖警告见文档
# 按官方下载源 + 国内镜像适配；每条命令后可验证（预期输出见组合包文档）。
set -euo pipefail

# ==== [1/2] skillspector：技能/仓库内容安检 ====
# 版本要求: [2.10.0, 2.10.0]（manifest 锁定；Python 3 任意版本 wheel）
curl -sL -o skillspector-2.10.0-py3-none-any.whl https://gh-proxy.com/https://github.com/NVIDIA/SkillSpector/releases/download/v2.10.0/skillspector-2.10.0-py3-none-any.whl
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple skillspector-2.10.0-py3-none-any.whl
skillspector --version   # 预期输出: 2.10.0

# ==== [2/2] agentshield：agent 配置攻击面审计 ====
# 版本要求: [1.5.0, 1.5.0]（manifest 锁定；Node >= 18；CLI 二进制名 agentshield，包名 ecc-agentshield）
npm_config_registry=https://registry.npmmirror.com npm install -g ecc-agentshield
agentshield scan   # 预期输出: AgentShield Security Report

