yyy 5a129a450f fix: Stop interpolating release analyzer workflow inputs into shell commands
Merge https://github.com/google/adk-python/pull/5272

### Link to Issue or Description of Change

**1. Link to an existing issue (if applicable):**

- Related: #5271

**2. Or, if no issue exists, describe the change:**

**Problem:**
The release analyzer workflow interpolated `workflow_dispatch` string inputs directly into the shell command used in `run:`. That let shell metacharacters in `start_tag` or `end_tag` be parsed by bash before Python started.

**Solution:**
Move the dispatch inputs into environment variables and build the Python argument list in bash using an array before invoking the analyzer. This keeps the input values as data instead of shell syntax.

### Testing Plan

**Unit Tests:**

- [ ] I have added or updated unit tests for my change.
- [ ] All unit tests pass locally.

There is no repo unit-test harness for this workflow YAML.

**Manual Validation:**

- Parsed the updated workflow YAML successfully.
- In Linux Docker, the pre-patch rendered command `python -m adk_release_analyzer.main --start-tag v1.0.0; touch /tmp/gh-before-proof #` created the proof file.
- In Linux Docker, the patched bash-array form received the same malicious value as a single argv element:
  - `["--start-tag", "v1.0.0; touch /tmp/gh-after-proof #"]`
- The patched form did not create the proof file.

### Checklist

- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] New and existing unit tests pass locally with my changes.
- [ ] I have manually tested my changes end-to-end.
- [x] Any dependent changes have been merged and published in downstream modules.

### Additional context

This is a small workflow hardening change intended to remove shell interpretation of `workflow_dispatch` string inputs while preserving the existing analyzer behavior.

Co-authored-by: George Weale <gweale@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/5272 from petrmarinec:fix-release-workflow-input-handling 5e24baee21ab023693d6bad7d92516db47ddafb4
PiperOrigin-RevId: 930894541
2026-06-11 20:50:54 -07:00
2026-06-04 15:29:20 -07:00
2025-11-03 13:33:53 -08:00

Agent Development Kit (ADK) 2.0

License PyPI version Python versions PyPI downloads Docs

An open-source, code-first Python framework for building, evaluating, and deploying sophisticated AI agents with flexibility and control.


⚠️ BREAKING CHANGES FROM 1.x

This release includes breaking changes to the agent API, event model, and session schema. Sessions generated by ADK 2.0 are readable by ADK 1.28+ (extra fields will be ignored), but are incompatible with older 1.x versions.


🔥 What's New in 2.0

  • Workflow Runtime: A graph-based execution engine for composing deterministic execution flows for agentic apps, with support for routing, fan-out/fan-in, loops, retry, state management, dynamic nodes, human-in-the-loop, and nested workflows.

  • Task API: Structured agent-to-agent delegation with multi-turn task mode, single-turn controlled output, mixed delegation patterns, human-in-the-loop, and task agents as workflow nodes.

🚀 Installation

pip install google-adk

Requirements: Python 3.11+.

To install optional integrations, you can use the following command:

pip install "google-adk[extensions]"

The release cadence is roughly bi-weekly.

Quick Start

Agent

from google.adk import Agent

root_agent = Agent(
    name="greeting_agent",
    model="gemini-2.5-flash",
    instruction="You are a helpful assistant. Greet the user warmly.",
)

Workflow

from google.adk import Agent, Workflow

generate_fruit_agent = Agent(
    name="generate_fruit_agent",
    instruction="Return the name of a random fruit. Return only the name.",
)

generate_benefit_agent = Agent(
    name="generate_benefit_agent",
    instruction="Tell me a health benefit about the specified fruit.",
)

root_agent = Workflow(
    name="root_agent",
    edges=[("START", generate_fruit_agent, generate_benefit_agent)],
)

Run Locally

# Interactive CLI
adk run path/to/my_agent

# Web UI (supports multi-agent directories or pointing directly to a single agent folder)
adk web path/to/agents_dir

📚 Documentation

🤝 Contributing

See CONTRIBUTING.md for details.

📄 License

This project is licensed under the Apache 2.0 License — see the LICENSE file for details.

S
Description
An open-source, code-first Python toolkit for building, evaluating, and deploying sophisticated AI agents with flexibility and control.|GitHub 镜像 21.3k · 🍴 3.9k
https://github.com/google/adk-python Readme Apache-2.0 79 MiB
Languages
Python 77.5%
JavaScript 20.7%
Jupyter Notebook 1.3%
HTML 0.3%