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

Azure Resource Lookup Skill 安全审计

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

List, find, and show Azure resources across subscriptions or resource groups. Handles prompts like \"list the websites in my subscription\", \"list my web apps\", \"show my app services\", \"list virtual machines\", \"list my VMs\", \"show storage accounts\", \"find container apps\", and \"what resources do I have\". USE FOR: list websites, list web apps, list app services, show websites in subscr

第三方安全检查结论

发现安全风险

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

代理被要求直接运行由另一工具根据用户文本生成的 CLI 命令

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

该流程把用户请求写入 `extension_cli_generate` 的 intent,随后笼统要求“运行生成的命令”,但没有要求验证输出只能是单条只读的 `az graph query`,也没有禁止 shell 元字符或附加命令。

为什么需要注意

如果生成器误解或被恶意请求诱导产生额外 shell 内容,代理可能以本机 Azure CLI 会话的权限执行超出资源查询范围的操作。现有文本不能证明这种情况已经发生。

该流程将用户请求放入命令生成工具的 intent,随后要求运行其生成的命令。可见说明没有要求执行前确认输出仅包含预期的只读 `az graph query`,因此如果生成结果含有额外 shell 内容,用户本机及其当前 Azure 身份可能受到影响。用户可要求作者加入命令结构校验、参数转义和执行前确认。

SKILL.md:73来自说明文档打开原文件
Use `extension_cli_generate` to build the `az graph query` command:```yamlmcp_azure_mcp_extension_cli_generate  intent: "query Azure Resource Graph to <user's request>"  cli-type: "az"```
查看另外 1 个位置
SKILL.md:83来自说明文档打开原文件
### Step 3: Execute and Format ResultsRun the generated command. Use `--query` (JMESPath) to shape output:```bashaz graph query -q "<KQL>" --query "data[].{name:name, type:type, rg:resourceGroup}" -o table```
低风险

缺少扩展时,故障处理会安装 Azure CLI 扩展

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

虽然云资源查询被描述为只读,错误处理仍建议执行 `az extension add --name resource-graph`。安装扩展会下载可执行代码并持久修改本机 Azure CLI 环境。

为什么需要注意

安装过程扩大了本地软件供应链和后续 CLI 执行面;若环境要求固定版本或禁止动态安装,也可能违反本机管理策略。

故障处理明确给出安装 `resource-graph` Azure CLI 扩展的命令。若代理按此修复执行,就会下载并持久修改本机 CLI 环境;这不同于只读的云资源查询。可见说明没有要求先取得安装确认或固定并验证扩展版本。用户可要求安装前确认并使用受控版本或隔离环境。

SKILL.md:35来自说明文档打开原文件
|----------|-------|| **Query Language** | KQL (Kusto Query Language subset) || **CLI Command** | `az graph query -q "<KQL>" -o table` || **Extension** | `az extension add --name resource-graph` || **MCP Tool** | `extension_cli_generate` with intent for `az graph query` || **Best For** | Cross-subscription queries, orphaned resources, tag audits |
查看另外 2 个位置
SKILL.md:95来自说明文档打开原文件
| Error | Cause | Fix ||-------|-------|-----|| `resource-graph extension not found` | Extension not installed | `az extension add --name resource-graph` || `AuthorizationFailed` | No read access to subscription | Check RBAC — need Reader role || `BadRequest` on query | Invalid KQL syntax | Verify table/column names; use `=~` for case-insensitive type matching |
SKILL.md:97来自说明文档打开原文件
|-------|-------|-----|| `resource-graph extension not found` | Extension not installed | `az extension add --name resource-graph` || `AuthorizationFailed` | No read access to subscription | Check RBAC — need Reader role |
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 1 项风险
低风险

宽泛请求可能把多个订阅的基础设施元数据带入代理结果

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

该 Skill 支持跨订阅清单、标签审计、网络暴露和授权资源查询。这些数据可能揭示内部命名、部署位置、拓扑、标签及权限结构。

为什么需要注意

在共享会话、过宽查询或输出被转交他人时,结果可能披露超出当前任务所需的云环境信息;源码中未发现自动向第三方发送结果的行为。

这段代码的正常用途

这些查询确实可读取跨订阅资源、标签、健康状态等基础设施元数据,但这是该 Skill 明示的清单和发现功能,而非隐蔽收集。执行仍取决于用户提出查询且当前 Azure 身份拥有读取权限;材料也要求大型租户限定订阅或结果数。敏感环境中,用户可限制订阅、结果字段和输出位置。

这项判断针对展示的代码和适用条件,不表示风险已经实际发生。
SKILL.md:17来自说明文档打开原文件
Use this skill when the user wants to:- **List resources** of any type (VMs, web apps, storage accounts, container apps, databases, etc.)- **Show resources** in a specific subscription or resource group- Query resources **across multiple subscriptions** or resource types- Find **orphaned resources** (unattached disks, unused NICs, idle IPs)- Discover resources **missing required tags** or configurations- Get a **resource inventory** spanning multiple types- Find resources in a **specific state** (unhealthy, failed provisioning, stopped)- Answer "**what resources do I have?**" or "**show me my Azure resources**"- **List web apps, websites, or App Services**
查看另外 6 个位置
references/azure-resource-graph.md:23来自说明文档打开原文件
|-------|----------|| `Resources` | All ARM resources — name, type, location, properties, tags, sku || `ResourceContainers` | Subscriptions, resource groups, management groups || `HealthResources` | Resource health availability status || `ServiceHealthResources` | Azure service health events/incidents || `AuthorizationResources` | Role assignments and definitions || `AdvisorResources` | Azure Advisor recommendations |
references/azure-resource-graph.md:107来自说明文档打开原文件
**Resources missing a required tag:**```kqlResources| where isnull(tags['Environment']) or isnull(tags['CostCenter'])| project name, type, resourceGroup, tags```
references/azure-resource-graph.md:123来自说明文档打开原文件
**Resources with public network access:**```kqlResources| where properties.publicNetworkAccess =~ 'Enabled'| project name, type, resourceGroup, location```
SKILL.md:98来自说明文档打开原文件
| `resource-graph extension not found` | Extension not installed | `az extension add --name resource-graph` || `AuthorizationFailed` | No read access to subscription | Check RBAC — need Reader role || `BadRequest` on query | Invalid KQL syntax | Verify table/column names; use `=~` for case-insensitive type matching |
SKILL.md:105来自说明文档打开原文件
- ✅ **Always** use `=~` for case-insensitive type matching (types are lowercase)- ✅ **Always** scope queries with `--subscriptions` or `--first` for large tenants- ✅ **Prefer** dedicated MCP tools for single-resource-type queries
SKILL.md:108来自说明文档打开原文件
- ❌ **Never** use ARG for real-time monitoring (data has slight delay)- ❌ **Never** attempt mutations through ARG (read-only)
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。发现 1 项风险
低风险

参考资料包含成本建议查询,与声明的非成本用途不一致

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

Skill 的描述明确表示不用于成本优化,但随附参考资料提供了查询 Azure Advisor 成本建议的可执行模式。代理可能因该示例将资源查询扩展到成本决策。

为什么需要注意

如果该模式被用于回答成本问题,用户可能依据未经专门成本分析流程核验的建议做出商业决定;该查询本身仍是只读的。

主说明明确排除成本优化,但被直接引用的查询模式包含 Azure Advisor 成本建议。该片段只是示例,不会自行执行;然而代理查阅参考资料时可能把成本建议当成获准用途,造成超出用户原本资源清单授权的成本信息读取或决策依据混淆。用户可要求作者删除该模式或明确只有用户单独授权时才能使用。

SKILL.md:2来自说明文档打开原文件
---name: azure-resource-lookupdescription: "List, find, and show Azure resources across subscriptions or resource groups. Handles prompts like \"list the websites in my subscription\", \"list my web apps\", \"show my app services\", \"list virtual machines\", \"list my VMs\", \"show storage accounts\", \"find container apps\", and \"what resources do I have\". USE FOR: list websites, list web apps, list app services, show websites in subscription, resource inventory, find resources by tag, tag analysis, orphaned resource discovery (not for cost analysis), unattached disks, count resources by type, cross-subscription lookup, and Azure Resource Graph queries. DO NOT USE FOR: deploying/changing resources (use azure-deploy), cost optimization (use azure-cost), or non-Azure clouds."license: MIT
查看另外 2 个位置
references/azure-resource-graph.md:179来自说明文档打开原文件
**Advisor cost recommendations:**```kqlAdvisorResources| where properties.category == 'Cost'| project name, impact=properties.impact, solution=properties.shortDescription.solution```
SKILL.md:81来自说明文档打开原文件
See [Azure Resource Graph Query Patterns](references/azure-resource-graph.md) for common KQL patterns.

Skill 逻辑拆解

6 个说明模块

该 Skill 主要读取 Azure 资源元数据:优先使用专用 MCP 工具,覆盖不足时生成并执行 Azure Resource Graph 查询。它明确禁止通过 ARG 修改云资源。

查看原文
SKILL.md:69来自说明文档打开原文件
If a dedicated tool is available with full coverage, use it. Otherwise proceed to Step 2.### Step 2: Generate the ARG QueryUse `extension_cli_generate` to build the `az graph query` command:
SKILL.md:83来自说明文档打开原文件
### Step 3: Execute and Format ResultsRun the generated command. Use `--query` (JMESPath) to shape output:```bashaz graph query -q "<KQL>" --query "data[].{name:name, type:type, rg:resourceGroup}" -o table```
SKILL.md:107来自说明文档打开原文件
- ✅ **Prefer** dedicated MCP tools for single-resource-type queries- ❌ **Never** use ARG for real-time monitoring (data has slight delay)- ❌ **Never** attempt mutations through ARG (read-only)

查询范围可能横跨多个订阅,并可读取资源名称、类型、位置、标签、健康状态以及授权结构等元数据。提供的示例均为查询和投影,没有向外部接收方发送结果的指令。

查看原文
SKILL.md:17来自说明文档打开原文件
Use this skill when the user wants to:- **List resources** of any type (VMs, web apps, storage accounts, container apps, databases, etc.)- **Show resources** in a specific subscription or resource group- Query resources **across multiple subscriptions** or resource types- Find **orphaned resources** (unattached disks, unused NICs, idle IPs)- Discover resources **missing required tags** or configurations- Get a **resource inventory** spanning multiple types- Find resources in a **specific state** (unhealthy, failed provisioning, stopped)- Answer "**what resources do I have?**" or "**show me my Azure resources**"
references/azure-resource-graph.md:23来自说明文档打开原文件
|-------|----------|| `Resources` | All ARM resources — name, type, location, properties, tags, sku || `ResourceContainers` | Subscriptions, resource groups, management groups || `HealthResources` | Resource health availability status || `ServiceHealthResources` | Azure service health events/incidents || `AuthorizationResources` | Role assignments and definitions || `AdvisorResources` | Azure Advisor recommendations |
从这里开始 · 工作说明SKILL.md
azure-resource-lookup
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

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

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文
  • references/azure-resource-graph.md已纳入全文

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

  • SKILL.md工作说明
  • references/azure-resource-graph.md配套文件

代码和说明中提到的操作

运行命令
SKILL.md:87来自说明文档打开原文件
```bashaz graph query -q "<KQL>" --query "data[].{name:name, type:type, rg:resourceGroup}" -o table
references/azure-resource-graph.md:7来自说明文档打开原文件
```bashaz graph query -q "<KQL>" --query "data[].{col1:field1, col2:field2}" -o table
读取了多少行
294
文件校验值(用于核对版本)
022f85d368160da5db5b1de43a3e4e5417734e2c5ed8167327778bf877e5aae2