Skip to content

feat!: scoped secret release — [secrets] grants, no secrets for run_command, sensitive-path reads #598

Closed

Description

@ajianaz

What problem does this solve?

GITHUB_TOKEN stays in every child's environment, so any command the model runs can read it; a .env inside the workspace is readable verbatim and its values enter the context (AI-assisted code leaks secrets at ~2× the baseline, GitGuardian 2026).

Proposed solution

Owner decision 2026-11-11 (docs/secrets-integrations-design.md §4, §8):

  • [secrets] config binds each secret to the tools that need it, e.g. GITHUB_TOKEN = { tools = ["gh", "git"] }, NGINJEN_API_KEY = { tools = ["web_search", "web_fetch"] }.
  • Breaking: run_command / job_start receive no secrets by default, GITHUB_TOKEN included. The gh/git tools are the supported path; an explicit project grant restores a token for commands. CHANGELOG + migration note.
  • Profiles name the secrets they may use; a delegated child gets the intersection.
  • read_file on .env*, *.pem, id_*, .npmrc, .netrc, *.key returns KEY=«redacted»; a raw read needs explicit approval.
  • tole doctor: which secrets are set, which tools may use each, any secret present in a child environment.

Alternatives considered

Keep the GITHUB_TOKEN trade-off (rejected); per-domain injection via a proxy (left to external sandboxes).

Are you willing to contribute the implementation?

Yes, I can do it

Before submitting

  • I searched existing issues and didn't find a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions