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

Azure Resource Visualizer Skill 安全审计

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

Analyze Azure resource groups and generate detailed Mermaid architecture diagrams showing the relationships between individual resources. WHEN: create architecture diagram, visualize Azure resources, show resource relationships, generate Mermaid diagram, analyze resource group, diagram my resources, architecture visualization, resource topology, map Azure infrastructure.

第三方安全检查结论

发现安全风险

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

Resource Graph 路径可能安装并加载额外的 Azure CLI 扩展代码

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

参考说明把 `az extension add --name resource-graph` 列为先决条件。该操作不是只读云查询:它会获取并安装扩展,从而持久改变本地 Azure CLI 环境,并使扩展代码可在用户权限下执行。说明未要求事先征得同意、固定版本或验证来源。

为什么需要注意

执行环境将增加新的本地代码和依赖;若扩展来源、版本或分发链不符合用户的信任策略,可能影响本机文件、Azure 凭据可见范围或后续 CLI 行为。证据不表明该扩展本身恶意。

参考文件把安装 `resource-graph` 扩展列为使用查询的先决条件。若代理执行该命令,本地 Azure CLI 环境会被持久修改,并引入随后以用户权限加载的扩展代码;文本没有要求单独同意、固定版本或核验来源。这不证明安装已发生,但构成合理的供应链和环境变更风险。用户可禁止自动安装,要求使用已批准的固定版本,并在隔离环境中验证来源后安装。

references/azure-resource-graph.md:15来自说明文档打开原文件
Or construct directly:```bashaz graph query -q "<KQL>" --query "data[].{name:name, type:type}" -o table```> ⚠️ **Prerequisite:** `az extension add --name resource-graph`
查看另外 1 个位置
references/azure-resource-graph.md:3来自说明文档打开原文件
Azure Resource Graph (ARG) enables fast, cross-subscription resource querying using KQL via `az graph query`. Use it for bulk resource discovery and relationship mapping.
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 2 项风险
中风险

详细的云架构与访问元数据会被持久写入工作区

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

输出不仅包含图,还包含订阅、区域、全部资源名称和类型、网络结构、身份/RBAC、关键配置及依赖关系。即使机密值被替换,这些信息仍可揭示内部拓扑和安全边界。

为什么需要注意

若工作区会同步、提交到代码仓库、共享给第三方或被其他进程读取,未获授权的人可能据此识别关键服务、网络范围、身份关系和攻击路径。

该技能会读取资源名称、网络、身份/RBAC、配置和依赖,并把清单、关系和图表写入工作区 Markdown 文件。即使秘密值被占位符替代,文件仍可能暴露内部拓扑与访问边界;共享、提交或上传工作区时风险会扩大。用户可要求先预览、只收集必要字段、隐藏名称/地址,并指定受控输出位置和保留期限。

SKILL.md:42来自说明文档打开原文件
1. **Query all resources** in the resource group using Azure MCP tools or `az`.2. **Analyze each resource** type and capture:   - Resource name and type   - SKU/tier information   - Location/region   - Key configuration properties   - Network settings (VNets, subnets, private endpoints)   - Identity and access (Managed Identity, RBAC)   - Dependencies and connections
查看另外 3 个位置
SKILL.md:88来自说明文档打开原文件
Use [template-architecture.md](./assets/template-architecture.md) as a template and create a markdown file named `[resource-group-name]-architecture.md` with:1. **Header**: Resource group name, subscription, region2. **Summary**: Brief overview of the architecture (2-3 paragraphs)3. **Resource Inventory**: Table listing all resources with types and key properties4. **Architecture Diagram**: The complete Mermaid diagram5. **Relationship Details**: Explanation of key connections and data flows6. **Notes**: Any important observations, potential issues, or recommendations
SKILL.md:115来自说明文档打开原文件
2. **File Creation**:   - Always create in workspace root or a `docs/` folder if it exists   - Use clear, descriptive filenames: `[rg-name]-architecture.md`   - Ensure Mermaid syntax is valid (test syntax mentally before output)
SKILL.md:58来自说明文档打开原文件
> **Important**: You must only use placeholder names to represent secret values, such as keys, connection strings, Key Vault secrets, etc. Use meaningful placeholder names to represent each secret in the diagram. Never put secret values in the resource diagram.
中风险

批量发现可能查询超出用户所选资源组的其他订阅

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

主流程以一个已确认的资源组为目标,但批量发现说明引导使用跨订阅 Azure Resource Graph,参考查询会列出可访问订阅中的资源及订阅名称。查询示例本身没有资源组过滤。

为什么需要注意

拥有多订阅读取权限的 Azure 身份可能把用户未打算纳入本次分析的资源名称、类型、位置、资源组和订阅名称带入代理上下文或后续输出。

这段证据能说明什么

材料确实提供跨订阅查询,并且示例可列出所有可访问资源及订阅名称;若代理在已选择单一资源组后仍运行该示例,会扩大云元数据读取范围。但主流程明确要求查询所选资源组,跨订阅内容被描述为“批量发现”模式,因此无法仅凭文本确定它会在普通单组任务中执行。用户可要求将订阅和资源组作为强制过滤条件,并在任何跨订阅查询前确认范围。

这项判断针对展示的代码和适用条件,不表示风险已经实际发生。
SKILL.md:33来自说明文档打开原文件
If a resource group is specified, validate it exists and proceed.### Step 2: Resource Discovery & AnalysisFor bulk resource discovery across subscriptions, use Azure Resource Graph queries. See [Azure Resource Graph Queries](references/azure-resource-graph.md) for cross-subscription inventory and relationship discovery patterns.Once you have the resource group:1. **Query all resources** in the resource group using Azure MCP tools or `az`.2. **Analyze each resource** type and capture:
查看另外 2 个位置
references/azure-resource-graph.md:52来自说明文档打开原文件
**Cross-subscription resource inventory with subscription names:**```kqlResources| join kind=leftouter (    ResourceContainers    | where type == 'microsoft.resources/subscriptions'    | project subscriptionId, subscriptionName=name) on subscriptionId| project name, type, location, resourceGroup, subscriptionName```
references/azure-resource-graph.md:85来自说明文档打开原文件
- Navigate properties with `properties.fieldName`- Use `--first N` to limit result count- Use `--subscriptions` to scope to specific subscriptions- Use `mv-expand` to flatten arrays (e.g., subnets, IP configurations)
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

5 个说明模块

此 Skill 会先让用户选择并确认资源组,然后通过 Azure MCP 或 Azure CLI 查询资源;它声明分析应保持只读,不修改或删除 Azure 资源。

查看原文
SKILL.md:28来自说明文档打开原文件
1. Use your tools to query available resource groups. If you do not have a tool for this, use `az`.2. Present a numbered list of resource groups with their locations3. Ask the user to select one by number or name4. Wait for user response before proceeding
SKILL.md:41来自说明文档打开原文件
1. **Query all resources** in the resource group using Azure MCP tools or `az`.2. **Analyze each resource** type and capture:
SKILL.md:144来自说明文档打开原文件
- ❌ Generate invalid Mermaid syntax- ❌ Modify or delete Azure resources (read-only analysis)

它收集资源名称、SKU、位置、网络设置、身份/RBAC、依赖关系等架构元数据,并将资源清单、关系说明和 Mermaid 图写入 Markdown 文件。

查看原文
SKILL.md:42来自说明文档打开原文件
1. **Query all resources** in the resource group using Azure MCP tools or `az`.2. **Analyze each resource** type and capture:   - Resource name and type   - SKU/tier information   - Location/region   - Key configuration properties   - Network settings (VNets, subnets, private endpoints)   - Identity and access (Managed Identity, RBAC)   - Dependencies and connections
SKILL.md:88来自说明文档打开原文件
Use [template-architecture.md](./assets/template-architecture.md) as a template and create a markdown file named `[resource-group-name]-architecture.md` with:1. **Header**: Resource group name, subscription, region2. **Summary**: Brief overview of the architecture (2-3 paragraphs)3. **Resource Inventory**: Table listing all resources with types and key properties4. **Architecture Diagram**: The complete Mermaid diagram5. **Relationship Details**: Explanation of key connections and data flows6. **Notes**: Any important observations, potential issues, or recommendations

Skill 明确禁止把密钥、连接字符串或 Key Vault 机密的实际值放入图中,并要求改用有意义的占位符。

查看原文
SKILL.md:58来自说明文档打开原文件
> **Important**: You must only use placeholder names to represent secret values, such as keys, connection strings, Key Vault secrets, etc. Use meaningful placeholder names to represent each secret in the diagram. Never put secret values in the resource diagram.

批量发现路径使用 Azure Resource Graph;参考文件还提供跨订阅查询,并将安装 Azure CLI 扩展列为先决条件。

查看原文
SKILL.md:37来自说明文档打开原文件
For bulk resource discovery across subscriptions, use Azure Resource Graph queries. See [Azure Resource Graph Queries](references/azure-resource-graph.md) for cross-subscription inventory and relationship discovery patterns.
references/azure-resource-graph.md:21来自说明文档打开原文件
> ⚠️ **Prerequisite:** `az extension add --name resource-graph`
references/azure-resource-graph.md:52来自说明文档打开原文件
**Cross-subscription resource inventory with subscription names:**```kqlResources| join kind=leftouter (    ResourceContainers    | where type == 'microsoft.resources/subscriptions'    | project subscriptionId, subscriptionName=name) on subscriptionId| project name, type, location, resourceGroup, subscriptionName```
从这里开始 · 工作说明SKILL.md
azure-resource-visualizer
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

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

检查范围与遗漏

逐文件查看涉及的内容

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

  • SKILL.md已纳入全文
  • assets/example-diagram.md已纳入全文
  • assets/template-architecture.md已纳入全文
  • references/azure-resource-graph.md已纳入全文

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

  • SKILL.md工作说明
  • assets/example-diagram.md配套文件
  • assets/template-architecture.md配套文件
  • references/azure-resource-graph.md配套文件

代码和说明中提到的操作

运行命令
references/azure-resource-graph.md:17来自说明文档打开原文件
```bashaz graph query -q "<KQL>" --query "data[].{name:name, type:type}" -o table
读取了多少行
370
文件校验值(用于核对版本)
1f0edcfb280fe9e35bc871ac666cc2331eb6cfc70195be7a16de7560f6e27a6f