jenkinsfile-generator

Pass

Audited by Gen Agent Trust Hub on Sep 15, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill processes external inputs such as shell commands and file paths to generate executable Jenkinsfiles. This creates a surface where malicious input could potentially influence the resulting script or expose local file contents.
  • Ingestion points: The --k8s-yaml and various --*-cmd arguments in scripts/generate_declarative.py and scripts/generate_scripted.py accept arbitrary strings or paths from the user/agent context.
  • Boundary markers: The generator wraps user input in Groovy single-quotes or triple-quotes and employs identifier sanitization to prevent breaking out of Groovy string literals.
  • Capability inventory: The skill is capable of reading local files (via the --k8s-yaml path resolution using Path.read_text()) and writing generated files to the filesystem. It generates shell scripts that are intended for downstream execution.
  • Sanitization: GroovySyntax.single_quoted_literal and escape_groovy_string in scripts/lib/syntax_helpers.py handle escaping for Groovy syntax. The skill also uses regex-based validation for stage names and Kubernetes resource identifiers.
  • [DYNAMIC_EXECUTION]: The skill's primary function is generating Groovy scripts at runtime by interpolating user-provided data into pre-defined templates.
  • Evidence: The Python scripts in the scripts/ directory assemble Jenkinsfiles using string concatenation and templates based on CLI arguments provided to the generator.
  • Mitigation: The skill implements syntax helpers to ensure proper escaping of Groovy literals and validates critical identifiers against regular expressions to prevent the generation of syntactically invalid or malicious code structures.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 15, 2026, 02:25 PM