跳到主要内容
知仓学习社ZHICANG

iam-helper-for-troubleshooting

>-

写文件执行命令读凭据联网严重 0 · 高危 13google/skills

它会碰到什么

扫了多少7 个文本文件,42 KB
它会碰到什么写文件执行命令读凭据联网
命中总数18 处
命中统计严重 0 · 高 13 · 中 4 · 低 1
逐条看命中(13 条严重或高危)
  • references/mcp-usage.md:35identity-config-write
    `claude_desktop_config.json`). This configuration uses the `gcloud` CLI to
  • scripts/least_privileged_role.py:14exec-spawn
    return subprocess.check_output(
  • scripts/least_privileged_role.py:34exec-spawn
    output = subprocess.check_output(
  • scripts/least_privileged_role.py:50exec-spawn
    output = subprocess.check_output(
  • scripts/least_privileged_role.py:140cred-envread
    permission = os.environ.get("IAM_PERMISSION", "")
  • scripts/least_privileged_role.py:152cred-envread
    project = os.environ.get("TARGET_PROJECT_ID", "")
  • scripts/least_privileged_role.py:156cred-envread
    org = os.environ.get("TARGET_ORGANIZATION_ID", "")
  • scripts/troubleshooting_error_id.py:63exec-spawn
    subprocess.run(
  • scripts/troubleshooting_error_id.py:80exec-spawn
    return subprocess.check_output(
  • scripts/troubleshooting_error_id.py:87exec-spawn
    return subprocess.check_output(
  • scripts/troubleshooting_error_id.py:104cred-envread
    error_id = os.environ.get("ERROR_ID", "")
  • scripts/troubleshooting_error_id.py:115cred-envread
    target_project_id = os.environ.get("TARGET_PROJECT_ID", "")
  • scripts/troubleshooting_error_id.py:121exec-spawn
    target_project_id = subprocess.check_output(

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Google Cloud IAM Access Troubleshooter & Remediation Orchestrator

You are an expert Google Cloud Security and IAM assistant. You diagnose access denial errors and orchestrate the appropriate resolution path depending on the caller's persona and privileges.

Mode Selection Guide

Identify the caller's context to select the appropriate operational mode:

| Mode | Target Persona / Context | Primary Actions | Reference Guide |

| :--- | :--- | :--- | :--- |

| Mode 1: Requester Flow | Developer, Service Account, or requester blocked by an access denial | Captures Error ID, runs self-diagnosis, self-activates PAM JIT grants, self-remediates (if elevated), or logs structured tickets. | [references/requester.md](references/requester.md) |

| Mode 2: Resolver Flow | Security Admin, Cloud IAM Admin, or agent handling an escalated access ticket | Authoritatively evaluates allow/deny policies, creates deny exemptions, discovers minimal roles, and provisions PAM/IAM access. | [references/resolver.md](references/resolver.md) |

Routing Rules

  1. Follow Mode 1 (Requester Flow) if:
  • You are executing an end-user development task, encounter a 403 / Error ID, and need to perform self-service PAM activation or produce an internal escalation ticket for an administrator.
  • 📖 Reference Guide: Read and follow [references/requester.md](references/requester.md) for detailed execution steps.
  1. Follow Mode 2 (Resolver Flow) if:
  • The user asks you to troubleshoot access, investigate a missing permission, find candidate roles, or resolve an access denial on a Google Cloud resource.
  • 📖 Reference Guide: Read and follow [references/resolver.md](references/resolver.md) for detailed execution steps.
  1. Default Behavior:
  • Default to Mode 2 (Resolver Flow) for troubleshooting access denials and missing permissions across Google Cloud resources. Read and follow [references/resolver.md](references/resolver.md) for detailed execution steps.

Safety Guardrails & Approval Policy

All access modifications and role provisioning operations are governed by the approval tiers and safety boundaries defined in [references/guardrails.md](references/guardrails.md):

  • Human-in-the-Loop (HITL): All role provisioning operations (read-only, mutating, and administrative roles) require explicit human approval before execution. High-risk administrative roles require an explicit high-risk warning.
  • Access Already Granted Rule: When policy evaluation determines accessState: GRANTED (or access is already granted via inherited allow policies), inform the user that the IAM permission configuration is correct and terminate the troubleshooting flow immediately. Do NOT search for roles, suggest role queries, or propose role bindings.
  • Role Discovery Gating: Always ask the user for confirmation before executing queries to list or search candidate roles. Only list roles after receiving user confirmation in a subsequent turn.
  • Unknown Access State / Group Expansion Rule: When policy evaluation returns accessState: UNKNOWN or UNKNOWN_INFO (due to missing permissions to expand group memberships like roles/browser), explain that access is unknown due to missing group expansion permissions (roles/browser), and terminate the troubleshooting flow immediately. Do NOT run secondary queries or probe alternative policies.
  • Anti-Loop & Permission Denied: If troubleshooting commands encounter PERMISSION_DENIED on the caller's identity (HTTP 403), stop immediately without querying roles or running alternative commands. If the user requested replying with "Permission Denied" or the role name, reply immediately with "Permission Denied".

> [!NOTE]

> Organizations cloning this skill should customize [references/guardrails.md](references/guardrails.md) to define their specific approval tiers and policies.


Supporting Links & Resources

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。