# GH-700: Constrain Workflow Effects with Permissions and Safe Outputs

Trace GitHub Agentic Workflows read access, inference permission and separate write jobs, then check implicit outputs, staged coverage, threat modes and integration authority.

Author: LearningPathX Editorial Team
Content version: 1.0
Published: 2026-11-17T08:57:45.808372+00:00
HTML: https://learningpathx.com/guide/GH-700/gh-700-constrain-workflow-effects-with-permissions-and-safe-outputs.html

## GH-700: Constrain Workflow Effects with Permissions and Safe Outputs

GitHub Agentic Workflows constrain repository changes by separating the agent's read access from downstream write execution. Permissions govern GitHub access; tools expose capabilities; safe outputs carry requested actions into separate permission-controlled jobs. Review the effective configuration, including defaults and external credentials, to establish what a run can change. The word “safe” does not promise that every effect waits for human approval.

This architecture guide uses gh-aw documentation checked on November 14, 2026, within the GH-700 English beta learning scope. It assumes the source-and-lock lifecycle explained in GH-700: Author and Compile GitHub Agentic Workflows. The focus here is runtime authority and effect isolation, rather than installation or the correctness of the eventual business report.

## Trace authority through the workflow

GitHub Agentic Workflows run through GitHub Actions. Their Markdown source contains configuration and instructions, and compilation produces the executable `.lock.yml` workflow. Review both artifacts when assessing authority.

Use this editorial audit model to follow one proposed action from input to effect:

| Boundary | Question for the workflow owner | Useful review evidence |
| --- | --- | --- |
| Input access | Which records must the task read? | Necessary GitHub scopes and the selected tools |
| Inference | Which engine and account perform the reasoning? | Engine authentication and applicable billing policy |
| Proposed effect | Which resource may change, and how often? | Effective safe-output types, targets and operation limits |
| Execution | Which job or integration can perform that effect? | Its credentials, permissions and applicable policy gates |
| Observed outcome | What was actually changed? | The run's output records and the affected resource |

Treat these as distinct questions. Being able to read an issue does not answer whether a new issue should be published. A good business reason for publication does not demonstrate that the configured execution path has the intended authority.

## Separate read permissions, tools and inference

The gh-aw `permissions` field uses read-only GitHub permissions by default; repository write operations use safe outputs. Grant the read scopes needed for the approved inputs. The `tools` field separately determines available capabilities, including GitHub operations and Model Context Protocol (MCP) servers. Review the two together rather than assuming a tool name supplies access.

The `copilot-requests` permission with value `write` enables Copilot inference through the built-in GitHub Actions token. It is an authored opt-in for organization-billed inference, not repository mutation authority. The documented setup requires the Copilot engine, an organization-owned repository with a Copilot plan, and the applicable organization billing policy. Personal repositories and third-party engines have different authentication paths.

For a reporting task, an inference failure should therefore lead to examination of engine authentication and policy. Adding repository write access would not establish the missing inference entitlement.

## Inspect safe-output defaults and preview coverage

Safe outputs may automatically publish content, update metadata or merge pull requests, subject to configuration and policy. Without a `safe-outputs` section, or with only system output types, `create-issue` is automatically enabled: at most one issue, with labels and a title prefix based on the workflow ID. Omission therefore does not establish a no-write workflow.

Setting `create-issue` to `false` disables its tool and automatic reporting instruction while retaining system outputs. That is a specific control, not proof that every other effect path is disabled.

Staged mode previews safe-output writes in the Actions step summary instead of applying them. Set `staged` to `true` globally under `safe-outputs`, or scope it to an individual output type. A staged pull-request output can coexist with an unstaged comment output that executes normally. Staged handlers may still read target data for validation.

As a review recommendation, list each intended and implicit output before selecting preview coverage. Include custom handlers in that inspection; do not infer their behavior from a built-in handler's preview alone.

## Choose the threat-detection failure policy deliberately

The gh-aw threat-detection stage examines buffered outputs, patches and context after agent execution. Its default `safe-outputs.threat-detection.continue-on-error` value is `true`: detected threats or detector failures invoke warn-mode handling. Reviewable outputs are annotated, branch pushes become review pull requests, and non-reviewable operations are aborted. A warning can therefore accompany an externally visible result.

Setting that value to `false` selects strict failure handling: these outcomes fail detection and prevent safe outputs. Detection failure is an absent security verdict, not a clean result. Neither mode proves business correctness.

This detection policy differs from the top-level `strict` field, which controls enhanced compilation security validation and defaults to `true`. Review the actual field and its scope instead of relying on the word “strict” in a status message.

As an editorial recommendation, choose whether uncertain detection should permit reviewable publication before enabling a workflow. A sensitive report and an ordinary maintenance note may require different decisions; document the owner and escalation path rather than accepting a default without examining its consequences.

## Include custom integrations in the authority review

A read-only GitHub token does not neutralize other credentials. Authored steps, custom jobs and integrations have their own effective permissions, secrets, host access and network reach. Network allowlisting limits destinations; it does not prove that every request to an allowed service is safe. Successful compilation validates configuration constraints, not all runtime behavior.

The gh-aw frontmatter configures tools and network access separately. Custom safe-output jobs run after the agent and can invoke third-party integrations. Review the implementation and credential distribution for those jobs. Keep secret values out of workflow prose and plaintext configuration; use the documented secret configuration, limited to components that need it. In particular, workflow-level `env` values enter the agent container, so that field is not a safe place for credential expressions.

For an integration review, ask a concrete question: could this credential update the external system even if all repository-changing safe outputs were disabled? If the answer is yes, the owner needs a separate decision about that external capability. The repository permission summary alone is incomplete evidence.

## Example: review a weekly operations brief

Consider a hypothetical workflow that reads issue activity and prepares an operations brief. The owner authorizes a draft for inspection, with no public posting or customer-system updates. This is a design exercise; no workflow has been compiled or executed here.

A useful review starts by translating “draft” into observable constraints. Identify the permitted inputs, name the proposed destination, and decide what evidence the owner must inspect before any publication. Then compare that intention with every effect path in the source and compiled workflow.

Three questions expose different mistakes:

1. Has the team mistaken an omitted output section for a prohibition on publishing? Inspect effective defaults before accepting the design.
2. Does preview cover every enabled output, or only the most visible one? A preview of the brief is insufficient if another path can post a notification containing its conclusions.
3. Does an external integration hold update credentials that the reporting task does not need? Remove unnecessary authority or return that capability for a separate owner decision.

If the brief later needs automatic publication, treat that as a changed business permission. Revisit the destination, allowed operations, preview choice, detection-failure policy and actual approval requirements together. Do not implement the change solely by rewriting “prepare” as “publish” in the instructions.

The resulting review record should explain who can read what, where inference is authorized, which effects are possible, and which evidence will demonstrate the outcome. Continue with GH-700: Verify Business Outputs and Bound Agent Critique Loops to judge whether the resulting brief satisfies its business requirements.

## Authoritative Sources

* [GH-700 official study guide](https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/gh-700) — workflow configuration learning scope.
* [Creating GitHub Agentic Workflows](https://docs.github.com/en/copilot/how-tos/github-agentic-workflows/creating-github-agentic-workflows) — source/lock lifecycle and engine authentication prerequisites.
* [GitHub Agentic Workflows concepts](https://docs.github.com/en/copilot/concepts/agent-capabilities/agent-powered-workflows-and-operations/about-github-agentic-workflows) — Actions execution and layered guardrails.
* [GitHub Tools Read Permissions](https://github.github.com/gh-aw/reference/permissions/) — read scopes and inference permission.
* [Safe Outputs](https://github.github.com/gh-aw/reference/safe-outputs/) — defaults, explicit issue disabling, automatic effects and staged coverage.
* [Security Architecture](https://github.github.com/gh-aw/introduction/architecture/) — isolation, detection modes, credential trust and runtime limits.
* [Frontmatter](https://github.github.com/gh-aw/reference/frontmatter/) — tools, network, custom jobs, secret distribution and compiler strictness.

## Related Reading

* prerequisite: [GH-700: Author and Compile GitHub Agentic Workflows](https://learningpathx.com/guide/gh-700/gh-700-author-and-compile-github-agentic-workflows.html)
* next: [GH-700: Verify Business Outputs and Bound Agent Critique Loops](https://learningpathx.com/guide/gh-700/gh-700-verify-business-outputs-and-bound-agent-critique-loops.html)
