gcp-run-jobs-run-with-overrides

derived gcp emits CanModifyConfiguration

match (effective permission)

{ "action": "run.jobs.runWithOverrides", "resource_type": "google.cloud.run.Job" }

emit

source typeIdentity
target type*
source<principal>
target<Cloud Run job in scope>
permissionsrun.jobs.runWithOverrides

Narrative

{principal.name} can run Cloud Run job {resource.name} with attacker-controlled command/args/env overrides (run.jobs.runWithOverrides), executing arbitrary code as the job's runtime SA.

Raw rule rules/derived/gcp/cloudrun.yaml

id: gcp-run-jobs-run-with-overrides
emits: CanModifyConfiguration
match_effective_permission:
  action: run.jobs.runWithOverrides
  resource_type: google.cloud.run.Job
emit:
  source_type: Identity
  target_type: '*'
  source: <principal>
  target: <Cloud Run job in scope>
  permissions:
  - run.jobs.runWithOverrides
  code_injection: true
  escalation: run.jobs.runWithOverrides lets the caller inject container command/args/env at run time
    -> standalone code execution as the job's SA WITHOUT a prior image swap.
  false_positive_note: 'Unlike plain run.jobs.run, runWithOverrides is a self-contained execute-as primitive:
    it both injects code and runs it in one call, so no separate CanModifyCode/image-swap edge is required.'
  narrative: '{principal.name} can run Cloud Run job {resource.name} with attacker-controlled command/args/env
    overrides (run.jobs.runWithOverrides), executing arbitrary code as the job''s runtime SA.'
move · open · esc close