gcp-spark-troubleshooting

Warn

Audited by Gen Agent Trust Hub on Oct 18, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The script scripts/spark_stage_diagnostics.py uses the Python eval() and compile() functions to evaluate diagnostic rules. These rules are authored by the agent as Python expressions and executed against Spark telemetry data. The execution environment is not sandboxed, meaning malicious rules could potentially perform unauthorized actions within the agent's context.
  • [INDIRECT_PROMPT_INJECTION]: The skill is designed to ingest and analyze Spark logs, event logs, and driver outputs from Google Cloud Storage (GCS). These logs can contain untrusted data (e.g., application names, failure reasons, or log messages) controlled by the workload's author. An attacker could potentially embed malicious instructions in these logs to influence the agent's diagnostics or rule-authoring logic.
  • Ingestion points: scripts/spark_gcs_log_reader.py (reads GCS logs), scripts/spark_applications.py (fetches data via Dataproc REST API).
  • Boundary markers: None identified; log content is processed as raw text or JSON.
  • Capability inventory: Subprocess execution of gcloud and javap across multiple scripts; eval() based expression evaluation in scripts/spark_stage_diagnostics.py.
  • Sanitization: The skill provides some logic to condense stack traces but does not implement comprehensive sanitization of log content before analysis.
  • [COMMAND_EXECUTION]: The scripts scripts/spark_applications.py, scripts/spark_gcs_log_reader.py, and scripts/spark_code_inspector.py frequently use subprocess.run, subprocess.check_output, and subprocess.Popen to invoke the gcloud CLI. These calls are used for legitimate tasks such as fetching OAuth tokens (gcloud auth print-access-token) and copying files from GCS (gcloud storage cp).
Audit Metadata
Risk Level
MEDIUM
Analyzed
Oct 18, 2026, 02:34 AM