到期审计的回退命令可能把秘密值暴露给代理和日志
原文依据:6 处审计只需要 expiresOn、enabled 等元数据,但回退流程要求对每个秘密运行 `az keyvault secret show`。该命令可能返回秘密值,而文档没有限制输出字段或要求屏蔽值。MCP 的 `keyvault_secret_get` 也被用于逐项获取详情,存在同类风险。
秘密值可能进入模型上下文、终端输出、审计记录或会话日志,扩大凭据可见范围;一旦这些记录被其他人员或系统访问,相关服务和账户可能受影响。
到期审计只要求分析过期时间、启用状态等元数据,但回退表要求执行未带 `--query` 的 `az keyvault secret show`。如果代理执行该命令并捕获完整输出,秘密值可能进入对话、终端记录或日志,超出了到期审计所需范围。现有证据不能确认 MCP 的 `secret_get` 是否返回值。用户可要求仅查询 `attributes` 等必要字段,并禁止代理读取或展示秘密正文。
1. **List Resources**: Enumerate keys, secrets, and certificates in target vault(s)2. **Get Details**: Retrieve expiration metadata for each resource3. **Analyze Status**: Compare expiration dates against current date and threshold4. **Generate Report**: Organize findings by priority with actionable recommendations查看另外 5 个位置
## Key Data FieldsWhen retrieving resource details, analyze these fields:- **expiresOn**: Expiration timestamp (null = no expiration set - security risk!)- **enabled**: Resource is active (false = disabled/inactive)- **notBefore**: When resource becomes valid- **createdOn/updatedOn**: For tracking resource age and last rotation- **subject/issuer**: Certificate-specific metadataIf Azure MCP Key Vault tools fail, timeout, or are unavailable, use Azure CLI commands as fallback.### CLI Command Reference| Operation | Azure CLI Command ||-----------|-------------------|| List secrets | `az keyvault secret list --vault-name <vault-name>` || Get secret details | `az keyvault secret show --vault-name <vault-name> --name <secret-name>` || List keys | `az keyvault key list --vault-name <vault-name>` || Get key details | `az keyvault key show --vault-name <vault-name> --name <key-name>` || List certificates | `az keyvault certificate list --vault-name <vault-name>` || Get certificate details | `az keyvault certificate show --vault-name <vault-name> --name <cert-name>` |Switch to Azure CLI when:- MCP tool returns timeout error- MCP tool returns "service unavailable" or connection errors- MCP tool takes longer than 30 seconds to respond- Empty response when vault is known to have resourcesWhen retrieving resource details, analyze these fields:- **expiresOn**: Expiration timestamp (null = no expiration set - security risk!)- **enabled**: Resource is active (false = disabled/inactive)- **notBefore**: When resource becomes valid- **createdOn/updatedOn**: For tracking resource age and last rotation- **subject/issuer**: Certificate-specific metadata## Fallback Strategy: Azure CLI CommandsIf Azure MCP Key Vault tools fail, timeout, or are unavailable, use Azure CLI commands as fallback.### CLI Command Reference| Operation | Azure CLI Command ||-----------|-------------------|| List secrets | `az keyvault secret list --vault-name <vault-name>` || Get secret details | `az keyvault secret show --vault-name <vault-name> --name <secret-name>` || List keys | `az keyvault key list --vault-name <vault-name>` |