跳转到正文
报告库
用途分类 / 其他用途

Airunway Aks Setup Skill 安全审计

作者说它能做什么(原文)

Set up AI Runway on AKS — from bare cluster to running model. Covers cluster verification, controller install, GPU assessment, provider setup, and first deployment. WHEN: \"setup AI Runway\", \"onboard AKS cluster\", \"install AI Runway\", \"airunway setup\", \"deploy model to AKS\", \"GPU inference on AKS\", \"KAITO setup on AKS\", \"run LLM on AKS\", \"vLLM on AKS\", \"set up model serving on AK

第三方安全检查结论

发现安全风险

已检查文件
17
发现的风险
5
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。发现 1 项风险
中风险

安装会执行仓库 Make 目标并部署未固定摘要的镜像

原文依据:8 处
发现了什么

Skill 直接运行仓库定义的 Make 目标;这些目标的实际命令未出现在所提供源码中。提供程序镜像仅通过读取 `IMG` 默认值选择,没有要求固定镜像摘要或验证签名,尽管随附的 Azure 指南建议只允许签名镜像。

为什么需要注意

若仓库、Makefile、镜像标签或镜像仓库被篡改,安装可能在用户机器上执行额外命令,或在集群内运行被替换的高权限控制器代码。

技能会在用户确认后执行仓库中的 Make 目标,但所给源码没有这些目标的定义,因此无法从证据判断它们实际执行什么。Provider 流程还允许采用 Makefile 的默认镜像或一个未要求摘要固定、签名验证的 `<image>`。若仓库或镜像来源被替换,命令可能把非预期代码部署到集群。用户可要求作者提供目标展开内容、可信镜像仓库、不可变 digest 和签名验证策略。

references/steps/step-2-controller.md:18来自说明文档打开原文件
```bashmake controller-install   # Install CRDsmake controller-deploy    # Deploy controller manager```
查看另外 7 个位置
references/steps/step-4-provider.md:29来自说明文档打开原文件
First, check the provider's Makefile or README for the default image:```bash# List available providers and their default imagesls providers/cat providers/<provider>/Makefile | grep -E 'IMG\s*\?='```
references/steps/step-4-provider.md:41来自说明文档打开原文件
```bashcd providers/<provider>make deploy IMG=<image>```
azure-kubernetes/SKILL.md:91来自说明文档打开原文件
- Enable **Encryption at rest** for etcd/API server; **in-transit** for node-to-node- Allow only signed, policy-approved images (Azure Policy + Ratify), prefer **Azure Container Registry**- **Isolation**: Use namespaces, network policies, scoped logging
references/steps/step-2-controller.md:15来自说明文档打开原文件
**If not installed:** Ask user to confirm, then from the **repository root** run:```bashmake controller-install   # Install CRDsmake controller-deploy    # Deploy controller manager```
references/steps/step-4-provider.md:27来自说明文档打开原文件
**Installation** — from the **repository root**:First, check the provider's Makefile or README for the default image:```bash# List available providers and their default imagesls providers/cat providers/<provider>/Makefile | grep -E 'IMG\s*\?='```
references/steps/step-4-provider.md:39来自说明文档打开原文件
Then deploy:```bashcd providers/<provider>make deploy IMG=<image>```> **Tip:** If the Makefile defines a default `IMG`, you can omit the `IMG=` argument and just run `make deploy`.
azure-kubernetes/SKILL.md:87来自说明文档打开原文件
### 3. Security- Use **Microsoft Entra ID** everywhere (control plane, Workload Identity for pods, node access). Avoid static credentials.- Azure Key Vault via **Secrets Store CSI Driver** for secrets- Enable **Azure Policy** + **Deployment Safeguards**- Enable **Encryption at rest** for etcd/API server; **in-transit** for node-to-node- Allow only signed, policy-approved images (Azure Policy + Ratify), prefer **Azure Container Registry**- **Isolation**: Use namespaces, network policies, scoped logging
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
中风险

PowerShell 流程失败时可能留下明文 HuggingFace 令牌文件

原文依据:2 处
发现了什么

PowerShell 变体将 SecureString 转回明文并写入固定的临时文件。删除命令位于 kubectl 操作之后,且不在保证执行的 `finally` 块内。

为什么需要注意

若 kubectl 失败、终端关闭或流程被中断,`hf-token.txt` 可能留在临时目录,能读取该文件的本地进程或用户可能取得账户令牌。

PowerShell 变体把令牌从 SecureString 转成明文并写到固定的 `$env:TEMP\hf-token.txt`。清理只在 kubectl 命令之后普通执行;若写文件后命令中断、kubectl 失败或进程终止,文件可能残留,并且没有展示对文件 ACL 的收紧。能读取该临时目录的其他进程或用户可能取得令牌。用户可要求随机文件名、限制 ACL,并用外层 `try/finally` 保证删除。

references/powershell-notes.md:51来自说明文档打开原文件
```powershell$token = Read-Host -Prompt "HuggingFace token" -AsSecureString$bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($token)try {  [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($bstr) |    Set-Content -NoNewline -Encoding UTF8 -Path "$env:TEMP\hf-token.txt"} finally {  [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($bstr)}
查看另外 1 个位置
references/powershell-notes.md:60来自说明文档打开原文件
kubectl create secret generic hf-token `  --from-file=token="$env:TEMP\hf-token.txt" `  -n <namespace> `  --dry-run=client -o yaml | kubectl apply -f -Remove-Item -Force "$env:TEMP\hf-token.txt"```
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 1 项风险
中风险

固定的 `hf-token` 名称可能覆盖现有 Kubernetes Secret

原文依据:2 处
发现了什么

令牌被写入固定名称 `hf-token`,并通过 `kubectl apply` 更新;流程没有先检查该命名空间是否已经存在同名 Secret。

为什么需要注意

现有应用若依赖同名 Secret,其令牌内容可能被替换,导致认证失败;新令牌还可能被原有 Secret 的既有读取者访问。

流程总是生成名为 `hf-token` 的 Secret,并把生成的 YAML 交给 `kubectl apply`。它没有先读取或确认同名对象;在目标命名空间已存在该 Secret 时,apply 可能更新其 `token` 数据,影响依赖旧凭据的工作负载。用户可要求使用部署专属名称,或在创建前检查冲突并明确确认覆盖。

references/steps/step-5-deploy.md:38来自说明文档打开原文件
kubectl create secret generic hf-token \  --from-file=token="$hf_token_file" \  -n <namespace> \  --dry-run=client -o yaml | kubectl apply -f -```
查看另外 1 个位置
references/steps/step-5-deploy.md:60来自说明文档打开原文件
spec:  model:    id: <model-id>    huggingFaceTokenSecretRef:      name: hf-token      key: token  provider:
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。发现 2 项风险
中风险

跳过验证步骤时可能修改错误的 Kubernetes 集群

原文依据:6 处
发现了什么

所有写操作都作用于当前 kubectl 上下文,而 `skip-to-step N` 明确允许假定先前步骤已完成。这样可跳过显示和核对当前集群的步骤,之后直接安装 CRD、控制器或模型。

为什么需要注意

如果终端当前连接到错误的集群或生产集群,用户确认的操作可能在非预期环境中创建集群级 CRD、控制器和工作负载。

该技能允许从后续步骤开始并假定此前检查已完成;而集群身份只在第 1 步通过当前 kubectl context 核对。若用户使用 `skip-to-step 2` 或更后步骤,后续获确认的安装或部署会作用于当时的默认 context,存在改错集群的风险。用户可要求任何写操作前强制重新显示并确认 context、命名空间和集群标识,不受 skip 参数影响。

SKILL.md:50来自说明文档打开原文件
4. If a step is already complete, report status and skip to the next step5. If the user provides `skip-to-step N`, start at step N; assume prior steps are complete
查看另外 5 个位置
references/steps/step-1-verify.md:23来自说明文档打开原文件
```bash# Confirm active contextkubectl config current-context# Inventory all nodeskubectl get nodes -o wide```
references/steps/step-2-controller.md:18来自说明文档打开原文件
```bashmake controller-install   # Install CRDsmake controller-deploy    # Deploy controller manager```
SKILL.md:48来自说明文档打开原文件
2. Report cluster state at each step: ✓ healthy, ✗ missing/failed3. Ask for user confirmation before any install or deployment action4. If a step is already complete, report status and skip to the next step5. If the user provides `skip-to-step N`, start at step N; assume prior steps are complete
references/steps/step-1-verify.md:22来自说明文档打开原文件
```bash# Confirm active contextkubectl config current-context# Inventory all nodeskubectl get nodes -o wide```
references/steps/step-2-controller.md:15来自说明文档打开原文件
**If not installed:** Ask user to confirm, then from the **repository root** run:```bashmake controller-install   # Install CRDsmake controller-deploy    # Deploy controller manager```
中风险

自动扩缩配置允许驱逐系统 Pod

原文依据:5 处
发现了什么

随附的 AKS 指南给出的命令将 `skip-nodes-with-system-pods` 设为 `false`,明确允许 Cluster Autoscaler 缩容包含系统 Pod 的节点。文档提出警告和 PDB 检查,但命令本身不会验证所有系统 Pod 都受有效 PDB 保护。

为什么需要注意

在 PDB 缺失、选择器错误或副本不足时,缩容可能中断 DNS、网络、监控或其他集群系统服务,进而影响整个集群中的应用。

这是按特定场景加载的调优参考,并明确警告和要求确认,因此不是无条件行为;但给出的实际命令确实设置 `skip-nodes-with-system-pods=false`。如果用户确认执行而系统 Pod 缺少有效 PDB,缩容时可能驱逐它们并影响集群服务。文档只提供查看 PDB 的命令,没有自动验证覆盖是否完整。用户可要求保持默认值,或在变更前验证每个关键系统工作负载的副本数和 PDB。

azure-kubernetes/references/azure-aks-autoscaler.md:51来自说明文档打开原文件
Apply when CAS is already on but idle nodes persist:> ⚠️ **Warning:** Setting `skip-nodes-with-system-pods=false` allows CAS to evict system pods. Ensure all system pods in `kube-system` have PodDisruptionBudgets before enabling this.```bashaz aks update \  --name "<CLUSTER_NAME>" --resource-group "<RESOURCE_GROUP>" \  --cluster-autoscaler-profile \    scale-down-delay-after-add=10m \    scale-down-unneeded-time=10m \    scale-down-utilization-threshold=0.5 \    max-graceful-termination-sec=600 \    skip-nodes-with-system-pods=false```
查看另外 4 个位置
azure-kubernetes/references/azure-aks-autoscaler.md:85来自说明文档打开原文件
>> Check existing PDBs before tuning:> ```bash> kubectl get pdb --all-namespaces> ```
azure-kubernetes/references/azure-aks-autoscaler.md:49来自说明文档打开原文件
## Tune CAS ProfileApply when CAS is already on but idle nodes persist:> ⚠️ **Warning:** Setting `skip-nodes-with-system-pods=false` allows CAS to evict system pods. Ensure all system pods in `kube-system` have PodDisruptionBudgets before enabling this.
azure-kubernetes/references/azure-aks-autoscaler.md:55来自说明文档打开原文件
```bashaz aks update \  --name "<CLUSTER_NAME>" --resource-group "<RESOURCE_GROUP>" \  --cluster-autoscaler-profile \    scale-down-delay-after-add=10m \    scale-down-unneeded-time=10m \    scale-down-utilization-threshold=0.5 \    max-graceful-termination-sec=600 \    skip-nodes-with-system-pods=false```
azure-kubernetes/references/azure-aks-autoscaler.md:83来自说明文档打开原文件
> Risk: High for aggressive tuning. Ensure PodDisruptionBudgets (PDBs) are set on critical workloads before tuning. Always confirm with user before applying.>> Check existing PDBs before tuning:> ```bash> kubectl get pdb --all-namespaces> ```
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

7 个说明模块

该 Skill 会先读取当前 kubectl 上下文并盘点节点/GPU,再经用户确认安装控制器、推理提供程序和模型资源。正常顺序包含状态检查,但 `skip-to-step N` 会直接假定之前的检查已经完成。

查看原文
SKILL.md:46来自说明文档打开原文件
1. Execute steps in sequence — load the reference for each step as you reach it2. Report cluster state at each step: ✓ healthy, ✗ missing/failed3. Ask for user confirmation before any install or deployment action4. If a step is already complete, report status and skip to the next step5. If the user provides `skip-to-step N`, start at step N; assume prior steps are complete
references/steps/step-1-verify.md:22来自说明文档打开原文件
```bash# Confirm active contextkubectl config current-context# Inventory all nodeskubectl get nodes -o wide```

安装操作通过仓库中的 Make 目标执行,并将控制器及所选提供程序部署到当前 Kubernetes 集群。提供程序镜像来自对应 Makefile 的默认值或调用者提供的 `IMG`。

查看原文
references/steps/step-2-controller.md:15来自说明文档打开原文件
**If not installed:** Ask user to confirm, then from the **repository root** run:```bashmake controller-install   # Install CRDsmake controller-deploy    # Deploy controller manager```
references/steps/step-4-provider.md:39来自说明文档打开原文件
Then deploy:```bashcd providers/<provider>make deploy IMG=<image>```

对于受限 HuggingFace 模型,该 Skill 会收集访问令牌、创建名为 `hf-token` 的 Kubernetes Secret,并让 ModelDeployment 引用该 Secret。集群中拥有相应 Secret 读取权限的主体可读取此凭据。

查看原文
references/steps/step-5-deploy.md:38来自说明文档打开原文件
kubectl create secret generic hf-token \  --from-file=token="$hf_token_file" \  -n <namespace> \  --dry-run=client -o yaml | kubectl apply -f -```
references/steps/step-5-deploy.md:60来自说明文档打开原文件
spec:  model:    id: <model-id>    huggingFaceTokenSecretRef:      name: hf-token      key: token  provider:

若用户没有现有集群,主 Skill 会转交给随附的 `azure-kubernetes` Skill;该 Skill 还包含更改自动扩缩、创建 Spot 节点池和调整工作负载资源等可改变成本或可用性的操作。

查看原文
SKILL.md:19来自说明文档打开原文件
This skill assumes an AKS cluster already exists. If the user does not have a cluster, hand off to the `azure-kubernetes` skill first to provision one (with a GPU node pool unless CPU-only inference is acceptable), then return here.
azure-kubernetes/SKILL.md:125来自说明文档打开原文件
### 9. Cost Controls- Use **Spot node pools** for batch/interruptible workloads (up to 90% savings)- **Stop/Start** dev/test clusters: `az aks stop/start`- Consider **Reserved Instances** or **Savings Plans** for steady-state workloads
从这里开始 · 工作说明SKILL.md
airunway-aks-setup
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

23 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录17 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文
  • references/steps/step-1-verify.md已纳入全文
  • references/steps/step-2-controller.md已纳入全文
  • references/steps/step-3-gpu.md已纳入全文
  • references/steps/step-4-provider.md已纳入全文
  • references/steps/step-5-deploy.md已纳入全文
  • references/steps/step-6-summary.md已纳入全文
  • references/troubleshooting.md已纳入全文
  • azure-kubernetes/references/azure-aks-autoscaler.md已纳入全文
  • azure-kubernetes/references/azure-aks-rightsizing.md已纳入全文
  • azure-kubernetes/references/azure-aks-spot.md已纳入全文
  • azure-kubernetes/references/azure-aks-vpa.md已纳入全文
  • azure-kubernetes/references/cli-reference.md已纳入全文
  • references/gpu-profiles.md已纳入全文
  • references/model-sizing.md已纳入全文
  • references/powershell-notes.md已纳入全文
  • azure-kubernetes/SKILL.md已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • SKILL.md工作说明
  • references/gpu-profiles.md配套文件
  • references/model-sizing.md配套文件
  • references/powershell-notes.md配套文件
  • references/steps/step-1-verify.md配套文件
  • references/steps/step-2-controller.md配套文件
  • references/steps/step-3-gpu.md配套文件
  • references/steps/step-4-provider.md配套文件
  • references/steps/step-5-deploy.md配套文件
  • references/steps/step-6-summary.md配套文件
  • references/troubleshooting.md配套文件
  • azure-kubernetes/SKILL.md配套文件
  • azure-kubernetes/references/cli-reference.md配套文件
  • azure-kubernetes/references/azure-aks-rightsizing.md配套文件
  • azure-kubernetes/references/azure-aks-vpa.md配套文件
  • azure-kubernetes/references/azure-aks-autoscaler.md配套文件
  • azure-kubernetes/references/azure-aks-spot.md配套文件

代码和说明中提到的操作

连接外部网站
SKILL.md:26来自说明文档打开原文件
| Best for | End-to-end AI Runway onboarding on AKS || CLI tools | `kubectl`, `make`, `curl` || MCP tools | None |
references/powershell-notes.md:8来自说明文档打开原文件
```powershell@('kubectl', 'make', 'curl') | ForEach-Object {  if (Get-Command $_ -ErrorAction SilentlyContinue) {
references/steps/step-1-verify.md:11来自说明文档打开原文件
# Check all required tools are installedfor tool in kubectl make curl; do  command -v "$tool" >/dev/null 2>&1 && echo "✓ $tool found" || echo "✗ $tool NOT FOUND — install before continuing"
读取密钥或账号配置
SKILL.md:67来自说明文档打开原文件
|-----------------|--------------|-------------|| No kubeconfig context | Not connected to a cluster | Run `az aks get-credentials` or equivalent || Controller in CrashLoopBackOff | Config or RBAC issue | `kubectl logs -n airunway-system -l control-plane=controller-manager --previous` |
references/steps/step-1-verify.md:52来自说明文档打开原文件
**Decision logic:**- No kubeconfig context → **STOP**. Tell user to configure `kubeconfig` (e.g., `az aks get-credentials`) and retry.- No GPU nodes detected → Note "CPU-only cluster" and proceed; CPU-only inference is available via KAITO + llama.cpp.
references/troubleshooting.md:7来自说明文档打开原文件
|-----------------|--------------|-------------|| No kubeconfig context | Not connected to a cluster | Run `az aks get-credentials` or equivalent || `make: *** No rule to make target` | Not in AI Runway repo root | `cd` to repo root and retry |
运行命令
references/powershell-notes.md:1来自说明文档打开原文件
# PowerShell Command Variants
references/powershell-notes.md:3来自说明文档打开原文件
This reference provides PowerShell equivalents for commands in steps 1, 4, 5, and 6 that use Bash-specific syntax.
references/powershell-notes.md:7来自说明文档打开原文件
```powershell@('kubectl', 'make', 'curl') | ForEach-Object {
读取文件
references/steps/step-4-provider.md:34来自说明文档打开原文件
ls providers/cat providers/<provider>/Makefile | grep -E 'IMG\s*\?='```
修改文件
references/steps/step-5-deploy.md:30来自说明文档打开原文件
hf_token_file="$(mktemp)"trap 'rm -f "$hf_token_file"' EXIT
读取了多少行
1,175
文件校验值(用于核对版本)
9cefbc995287f9ed1e76bc4b77b14d9438d93c140b2a19b895187dcbc931d4b8