Govern / Security and permissions

G03 / Govern

Security and permissions

What Guild Stack may touch, what always requires approval, and how repo content, secrets, network access, and MCP tools stay inside explicit boundaries.
First move
Inspect permissions and always-ask actions
Expected receipt
permission and audit record
Last verified
Jun 10, 2026

Page evidence and guidance

Read as StartDefault boundaries, approvals, secrets handling, and visible side effects. SteerPolicy scopes, trust boundaries, approval records, redaction, and audit trails. ExtendEnforcement points, fail-closed behavior, schema validation, and host parity.

After reading this page, you can tell what Guild Stack may touch, what always requires approval, and where to inspect the security record for a run.

Operational mapProject work is scoped. Risky actions always ask.
Within project scope
  1. Read filestask-relevant paths
  2. Write approved workbounded changes
  3. Record evidence.guild/ run state
Always ask
  1. Destructivedelete or overwrite
  2. Network + spendexternal side effects
  3. Productiondeployment or incident

Repository content is data, not authority. Export paths apply scrub and share policy.

Guild may touch project scope; destructive, network, spend, and production-sensitive actions always ask. Untrusted content is data, not instructions.
repo / wiki / prompt text
  -> agent proposes a tool call
  -> PreToolUse checks scope, autonomy, and hard approval classes
  -> allow, ask, file-bus approval request, or deny
  -> durable writes pass through scrubbedWrite where the surface requires it
  -> .guild/runs/<run-id>/logs/security-events.jsonl records the decision

The important beginner rule is simple: Guild Stack can read and edit the project only inside the task you approved. It cannot treat prompt text, recalled wiki text, or MCP tool descriptions as a security boundary. The boundary is the tool path: permission checks, scrubbed writes, explicit approval requests, and local audit records.

Try it: /guild:audit runs the installed-script and boundary audit. It is read-only. It reports what the installed Guild Stack package can touch and where shared .guild/ artifacts need scrub coverage.

Approval Table

Destructive actions, network access, spend actions, release-sensitive work, and permission bypasses are always-ask classes. They still pause under --auto-approve=all, inside pre-authorized lanes, and inside approved runbooks.

Approval request should nameWhy it matters
ActionYou can see the exact command, tool call, or write being requested.
ReasonThe lane must explain why the action is needed for the approved task.
ScopeThe request should identify the files, network target, or runtime surface involved.
ReversibilityHigh-risk actions should explain whether they can be undone.
Expected outputThe operator can compare the request with the produced artifact or receipt.
Safer alternativesGuild Stack should surface a narrower path when one exists.

Auto-approve is not a security bypass

--auto-approve can pre-clear soft Guild Stack gates. It does not approve destructive commands, network calls, spend actions, release-sensitive work, or permission bypasses that Guild Stack’s runtime classifies as high risk.

If the host has a native ask primitive, Guild Stack uses it. If the host cannot ask inline, the adapter degrades to a file-bus approval request and records that degraded permission mode on disk.

What Guild Stack May Touch

SurfaceDefault postureGate or proof
Repo files needed for the approved taskReadable, and editable only when the lane requires itplan/lane scope and receipts
.guild/runs/<run-id>/Writable as the run recordtrace, receipts, reviews, verification, and security events
.guild/wiki/**Readable as project memory; not directly mutated by task agentsguild:decisions or guild:wiki-ingest promotion
Skills, agents, or the harnessNot directly edited by ordinary task lanesevolve pipeline, eval/shadow evidence, and approval
Network accessDenied unless grantedalways-ask approval and allow-listing
Secrets or credential pathsDenied unless explicitly grantedhigh-risk approval and redaction
Deploy, release, rollback, force pushDenied by defaultexplicit release/runbook gate; destructive steps always ask

The effective grant is:

(capability_scope union project baseline) AND lane autonomy_contract AND always-ask hard set

If capability_scope: is absent, Guild Stack leaves the host’s grant in place for that lane. Scoped lanes can fail closed when an agent calls a tool outside the allowed set.

Scrub And Share Policy

Guild Stack separates local run state from shareable artifacts. Durable shared surfaces such as handoffs, provenance, wiki pages, reviews, config, and the agent bus route through scrub coverage before they can become shared .guild/ artifacts.

SurfaceOn scrub failure
Durable shared artifactsfail closed, block the write, emit a security event, and write an approval request
Local gitignored telemetryfail open with a loud warning and security event

Secret redaction covers token-like strings, sensitive paths, key/value secrets, high-entropy blobs, long values, and custom secrets_policy: patterns. A security specialist may report where a likely secret was seen. It should not print the raw value into a review, handoff, wiki page, or trace.

Untrusted Content Stays Data

Recalled knowledge is the highest-risk content path because a poisoned .guild/wiki/** page can outlive one run and enter future specialist context. Guild Stack treats recalled content as data, not instructions.

  • Recalled wiki and knowledge chunks are wrapped in <guild:recall> blocks with a trust tier.
  • Deterministic injection checks quarantine flagged recalled chunks out of the bundle and log recall_quarantine events.
  • Learning writes proposals and candidates. It does not promote wiki pages, decisions, skills, agents, or policy by itself.
  • External raw sources under .guild/raw/sources/** must be promoted into canonical .guild/wiki/** before they enter context.

MCP Trust Surface

The packaged guild-memory and guild-telemetry MCP servers declare read-only/no-network capabilities. /guild:audit reports egress or writes that do not match the declared surface. That audit finding is not the same as a runtime denial gate.

For tool-description drift, mcp.tool_description_hashes starts empty in .guild/settings.json. After you pin descriptions with /guild:config update-mcp-hashes, PreToolUse compares the live tool description hash to the pinned one. A mismatch warns and gates the call on approval. If the live description cannot be obtained, the current implementation records unverifiable and lets the call proceed; that weaker fail-open case is a known implementation boundary.

Harness Contracts

Harness Developers should read the module contracts when extending or auditing security behavior:

Contract or moduleWhat to inspect
docs/v2/architecture/modules/security.mdPreToolUse capability-scope gate, scrubbed writes, security-event schema, MCP pinning, and share-set ownership
docs/v2/security.mdconcept model for approvals, untrusted content, MCP trust, and learning boundaries
docs/v2/architecture/modules/config.mdclosed security keys, secrets_policy, MCP hashes, and settings resolution
docs/v2/architecture/modules/telemetry.mdtrace and security-decision event surfaces consumed by observability

The security log is append-only and local:

.guild/runs/<run-id>/logs/security-events.jsonl

It records tool-scope violations, degraded permission decisions, bypass attempts, scrub failures, recall quarantines, MCP description drift, and related policy events with a host field for cross-host forensics. /guild:audit is the primary reader. The read-only telemetry server may read it for local reporting.

Source Anchors

This page is anchored to docs/v2/security.md, docs/v2/config-surfaces.md, and docs/v2/architecture/modules/security.md.

See Also