{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/keep-ci-agents-away-from-production-secrets-they-do-not-need",
  "id": "MHC-D-RESEARCH-0668",
  "version": "0.1.0",
  "title": "Keep CI agents away from production secrets they do not need",
  "summary": "A pull request can become an instruction channel to a privileged deputy.",
  "kind": "principle",
  "body": "Give AI-powered CI jobs the minimum token permissions and secrets required for their narrow function. Isolate them from deployment credentials where possible, especially on externally influenced PRs. Separate review/comment capability from push, workflow-edit and deploy capability.",
  "limits": [
    "CI products differ in isolation model; inspect the actual runner, token and secret rules."
  ],
  "topics": [
    "union-ai-assisted-coding-safeguards"
  ],
  "intents": [],
  "source_ids": [
    "RS-1C68AE8325C384C0"
  ],
  "evidence": [
    {
      "claim": "OWASP's current secure-coding-with-AI guidance treats repository content, issues, PRs, comments, fetched pages, logs and tool responses as potential indirect prompt-injection inputs for coding agents.",
      "source_id": "RS-1C68AE8325C384C0",
      "role": "supports",
      "note": "Threat likelihood depends on who can influence the content and what permissions the agent has.",
      "locator": "Indirect Prompt Injection in the Development Loop"
    },
    {
      "claim": "OWASP treats rules files, build scripts, CI workflows and package lifecycle scripts as security-sensitive control surfaces that deserve heightened review when an agent changes them.",
      "source_id": "RS-1C68AE8325C384C0",
      "role": "supports",
      "note": "The exact sensitive-file set depends on the repository and build system.",
      "locator": "Rules Files; Prompt-to-Code Supply Chain Risk"
    }
  ],
  "use_when": [
    "An AI review or fix bot runs on pull-request content with broad CI credentials."
  ],
  "avoid_when": [
    "CI products differ in isolation model; inspect the actual runner, token and secret rules."
  ],
  "example": "A PR review bot can read the diff and comment but cannot access production cloud credentials or modify deployment workflows.",
  "check": "A malicious PR cannot obtain high-impact capability merely because an AI bot reads it.",
  "sources": [
    {
      "id": "RS-1C68AE8325C384C0",
      "title": "Secure Coding with AI Cheat Sheet",
      "url": "https://cheatsheetseries.owasp.org/cheatsheets/Secure_Coding_with_AI_Cheat_Sheet.html"
    }
  ],
  "relations": [
    {
      "from": "MHC-D-RESEARCH-0668",
      "to": "MHC-D-RESEARCH-0669",
      "type": "use_before",
      "url": "/knowledge/require-a-human-decision-before-privileged-workflow-execution"
    }
  ],
  "collections": [
    {
      "id": "RC-E25DB1788236EF13",
      "title": "Let coding agents move fast inside a reviewable security boundary",
      "url": "/collections/let-coding-agents-move-fast-inside-a-reviewable-security-boundary"
    }
  ]
}
