Skip to content

feat: harden served-agent safety controls - #4000

Merged
aheritier merged 12 commits into
mainfrom
serve-hardening
Aug 18, 2026
Merged

aheritier merged 12 commits into
mainfrom
serve-hardening

Conversation

@aheritier

Copy link
Copy Markdown
Collaborator

Summary

Harden served-agent safety controls across A2A, MCP HTTP, and chat surfaces. The change applies restricted safety defaults, isolates session origins, gates unsafe bindings, and keeps startup behavior explicit for autonomous configurations.

Commit-by-commit review guide

  • da7844c0 — establish served-agent safety policy foundations.
  • f6b85569 — add session-origin isolation and persistence safeguards.
  • dd5abea7 — add per-surface bind and transport controls.
  • 6d5d317e — cover safety behavior with focused tests.
  • 9df38cd0 — document configuration and operational behavior.
  • 64d543c8 — add endpoint collision coverage.
  • 008fb5ac — refine policy handling and compatibility paths.
  • 6af32590 — add autonomous startup validation.
  • 11d5f983 — align migration and rollback guidance.
  • db377acb — clarify troubleshooting and feature documentation.
  • 1c58df4a — correct flag and behavior documentation.
  • 0413770f — complete final review-driven hardening and test coverage.

Validation

  • task build — green
  • task test — green
  • task lint — green

Review verdicts

  • Local implementation review: approved.
  • Focused delta review: approved.

Migration and compatibility

  • New served-agent safety defaults are restricted by design; deployments that rely on broader access should explicitly configure the required allowances.
  • Existing sessions retain their established behavior while new origin mismatches are rejected and session origin state is not silently replaced.
  • Startup validation makes autonomous configurations fail clearly when required safety settings are missing or incompatible.

@aheritier aheritier added area/core Core agent runtime, session management area/docs Documentation changes area/mcp MCP protocol, MCP tool servers, integration area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/sessions For features/issues/fixes related to session lifecycle (resume, persistence, export) kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Aug 18, 2026
@aheritier
aheritier requested a review from docker-agent August 18, 2026 15:08
@aheritier
aheritier marked this pull request as ready for review August 18, 2026 15:08
@aheritier
aheritier requested a review from a team as a code owner August 18, 2026 15:08
@aheritier
aheritier merged commit 1719b31 into main Aug 18, 2026
25 checks passed
@aheritier
aheritier deleted the serve-hardening branch August 18, 2026 20:17
pull Bot pushed a commit to TheTechOddBug/cagent that referenced this pull request Aug 19, 2026
Add missing safety-related flags (--auth-token, --cors-origin,
--insecure-no-auth, --safety) to the serve a2a section in the CLI
reference. These flags were added in PR docker#4000 and are already
documented in the detailed A2A feature page, but were omitted from
the CLI index when the MCP and chat serve commands were updated.

Reflects changes from docker#4000.
Source PR: docker#4000
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
docker-agent 1.126.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>This release adds evaluation regression gating, session comparison for replay, and significant hardening of served-agent safety controls across A2A, MCP HTTP, and chat surfaces.

## What's New

- Adds `--baseline` and `--regression-tolerance` flags to `docker agent eval`, enabling CI-style regression detection by comparing a run against a previously saved baseline and failing on quality regression
- Adds `docker agent sessions diff` command to compare the behavior of two recorded sessions, reporting the first point of divergence between runs
- Adds unattended tool execution restrictions for A2A, requiring explicit security configuration for network listeners
- Adds centralized unattended safety resolution for served agents, with ordered concrete safety policies and hardened HTTP serving for MCP and chat surfaces
- Adds session-origin isolation for A2A session resumes

## Bug Fixes

- Fixes the baseline gate to be grounded on the file that eval writes, and fails closed on error
- Fixes replay comparison to handle sub-agent turns, compare arguments semantically, and sanitize output
- Fixes A2A session resumes to be isolated by origin

## Technical Changes

- Refactors `sessions diff` CLI command to resolve session references
- Refactors safety flag validation to be shared across CLI surfaces
- Refactors HTTP auth and origin matchers into a shared `httpsec` package
- Refactors A2A server assembly, extracting it from `Run`
- Replaces `CAGENT_MODELS_GATEWAY` with `DOCKER_AGENT_MODELS_GATEWAY` in docs and samples
- Documents the evaluation regression gate and its two flags, the `docker agent sessions diff` command, and served-agent safety controls
---

## What's Changed
* docs: update CHANGELOG.md for v1.125.0 by @docker-read-write[bot] in docker/docker-agent#3995
* feat(replay): compare the behaviour of two recorded sessions by @dwin-gharibi in docker/docker-agent#3948
* feat(eval): compare a run against a saved baseline and fail on regression by @dwin-gharibi in docker/docker-agent#3946
* docs: replace CAGENT_MODELS_GATEWAY with DOCKER_AGENT_MODELS_GATEWAY in docs and samples by @aheritier in docker/docker-agent#3997
* feat: harden served-agent safety controls by @aheritier in docker/docker-agent#4000


**Full Changelog**: docker/docker-agent@v1.125.0...v1.126.0
</pre>
  <p>View the full release notes at <a href="https://github.com/docker/docker-agent/releases/tag/v1.126.0">https://github.com/docker/docker-agent/releases/tag/v1.126.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!17034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Core agent runtime, session management area/docs Documentation changes area/mcp MCP protocol, MCP tool servers, integration area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/sessions For features/issues/fixes related to session lifecycle (resume, persistence, export) kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants