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.pyuses the Pythoneval()andcompile()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
gcloudandjavapacross multiple scripts;eval()based expression evaluation inscripts/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, andscripts/spark_code_inspector.pyfrequently usesubprocess.run,subprocess.check_output, andsubprocess.Popento invoke thegcloudCLI. 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