Skip to content

fix: restrict default tool filesystem/network access - #171

Merged
edenreich merged 4 commits into
mainfrom
fix/168-restrict-tool-defaults
Aug 25, 2026
Merged

edenreich merged 4 commits into
mainfrom
fix/168-restrict-tool-defaults

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

Mitigation for #168 (insecure defaults). The allowlist enforcement already existed in the generated built-in tools — this change populates it with restrictive defaults and closes the browser-SSRF gap:

  • agent.yaml (regenerated with ADL CLI 0.61.3): read/write/edit are now restricted to /tmp/playwright/artifacts (read additionally covers .agents/skills so skill playbooks stay loadable); fetch gets explicit max_bytes: 10 MiB / timeout_seconds: 30 defaults. All overridable per deployment via the existing TOOLS_* env vars.
  • tools/navigate_to_url.go (hand-editable, .adl-ignore-protected): blocks navigation to loopback, private (RFC1918/ULA), link-local (incl. cloud metadata 169.254.169.254), and unspecified addresses by default. Opt-out with BROWSER_ALLOW_INTERNAL_URLS=true for legitimately testing internal webapps. Table-driven test added.
  • SECURITY.md: private disclosure via GitHub security advisories.
  • README: security section documenting the unexposed-by-default posture, A2A_AUTH_ENABLED requirement when publishing port 8080, and the sandbox-widening env vars.

fetch.allowed_domains deliberately stays empty — this is a research/browsing agent; the deny-internal-ranges fix for the generated fetch tool belongs in the adl-cli template (tracked upstream).

Cross-repo impact

  • inference-gateway/adl-cli — root cause: len(allowlist)==0 → allow all template semantics + fetch SSRF guard (upstream issue filed).
  • inference-gateway/adk — auth middleware fails open when Enable=true with missing OIDC fields; Enable→Enabled field rename (upstream issue filed).
  • inference-gateway/docs — docs ticket filed for the new defaults and env vars.

Closes #168

Mitigation for #168: bake restrictive defaults into the built-in tools
via agent.yaml (read/write/edit allowed_roots, fetch max_bytes/timeout),
block navigate_to_url from loopback/private/link-local targets by
default (opt-out: BROWSER_ALLOW_INTERNAL_URLS=true), and document the
security posture in SECURITY.md and the README.
Comment thread tools/navigate_to_url_test.go Resolved
@edenreich
edenreich merged commit e8805ad into main Aug 25, 2026
1 check passed
@edenreich
edenreich deleted the fix/168-restrict-tool-defaults branch August 25, 2026 22:46
inference-gateway-releaser Bot added a commit that referenced this pull request Aug 26, 2026
## [0.8.4](v0.8.3...v0.8.4) (2026-08-26)

### 🐛 Bug Fixes

* restrict default tool filesystem/network access ([#171](#171)) ([e8805ad](e8805ad)), closes [#168](#168), references [#168](#168)

### 👷 CI

* **deps:** bump docker/setup-buildx-action from 4.2.0 to 4.3.0 in the github-actions group ([#165](#165)) ([fb86d8a](fb86d8a))
* **deps:** bump the gomod group with 2 updates ([#164](#164)) ([78552e9](78552e9)), closes [#v](https://github.com/inference-gateway/browser-agent/issues/v)

### 🔧 Miscellaneous

* **deps:** bump ADL CLI to v0.60.2 ([#158](#158)) ([cae26a4](cae26a4))
* **deps:** bump ADL CLI to v0.60.3 ([#159](#159)) ([ac587eb](ac587eb))
* **deps:** bump ADL CLI to v0.60.4 ([#161](#161)) ([6d3af3e](6d3af3e))
* **deps:** bump ADL CLI to v0.60.5 ([#162](#162)) ([cd15889](cd15889))
* **deps:** bump ADL CLI to v0.61.1 ([#163](#163)) ([423ea68](423ea68))
* **deps:** bump ADL CLI to v0.61.3 ([#169](#169)) ([869eaa7](869eaa7))
* **deps:** bump ADL CLI to v0.61.4 ([#172](#172)) ([12f79b2](12f79b2))
* **deps:** bump ADL CLI to v0.62.1 ([#173](#173)) ([6848874](6848874))
* sync generated project with ADL manifest ([#166](#166)) ([74a1516](74a1516))
* sync generated project with ADL manifest ([#167](#167)) ([eb33883](eb33883))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.8.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant