Skip to content

Commit f3d5356

Browse files
docs: document HTTPS URL imports, network.allowed-input, allowed-repos: current, ignore-if-missing, and workflow_run.workflows validation (#33283)
1 parent 3dad12d commit f3d5356

5 files changed

Lines changed: 60 additions & 1 deletion

File tree

docs/src/content/docs/reference/auth.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,21 @@ For both tool authentication and safe outputs, you can scope the GitHub App toke
269269
- `repositories: ["*"]` - Org-wide access (all repos in the installation)
270270
- `repositories: ["repo1", "repo2"]` - Specific repositories only
271271

272+
### Gracefully Skip Minting When Keys Are Missing (`ignore-if-missing:`)
273+
274+
By default, jobs fail when `client-id` or `private-key` resolve to empty strings at runtime — for example, on fork pull requests where App secrets are unavailable. Set `ignore-if-missing: true` to skip the token mint step instead and fall back to the standard non-App token chain (`secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN`):
275+
276+
```yaml wrap
277+
safe-outputs:
278+
github-app:
279+
client-id: ${{ vars.APP_ID }}
280+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
281+
ignore-if-missing: true
282+
create-issue:
283+
```
284+
285+
The same field is accepted under `tools.github.github-app:` and applies consistently to all token mint paths (safe outputs, activation, pre-activation, and checkout). Default behavior (fail when keys are empty) is unchanged when the field is omitted or `false`.
286+
272287
---
273288

274289
## Related Documentation

docs/src/content/docs/reference/github-tools.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,25 @@ The setting `tools.github.allowed-repos` specifies which repositories the agent
6565

6666
- `"all"` — All repositories accessible by the configured token
6767
- `"public"` — Public repositories only
68-
- `"${{ github.repository }}"` — The repository where the workflow is running
68+
- `"current"` — The repository where the workflow is running (normalized to `${{ github.repository }}` in the emitted guard policy)
69+
- `"${{ github.repository }}"` — Equivalent to `"current"`, kept for backward compatibility
6970
- Array of patterns — Specific repositories and wildcards:
7071
- `"owner/repo"` — Exact repository match
7172
- `"owner/*"` — All repositories under an owner
7273
- `"owner/prefix*"` — Repositories with a name prefix under an owner
7374

7475
This defaults to `"all"` when omitted. Patterns must be lowercase. Wildcards are only permitted at the end of the repository name component.
7576

77+
Use `current` in reusable or generated workflows that need to express "this repository only" without hard-coding `owner/repo`:
78+
79+
```yaml wrap
80+
tools:
81+
github:
82+
toolsets: [issues, pull_requests]
83+
allowed-repos: current
84+
min-integrity: approved
85+
```
86+
7687
For example:
7788

7889
```yaml wrap

docs/src/content/docs/reference/network.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,33 @@ network:
292292

293293
When the firewall is disabled, network permissions still apply for content sanitization but the agent can make unrestricted network requests. Only disable during development or when AWF is incompatible with your workflow; keep it enabled in production.
294294

295+
## Caller-Extensible Allowlist (`network.allowed-input`)
296+
297+
Reusable workflows compiled to `.lock.yml` bake their `network.allowed` list into the lock file. By default a consumer repository cannot extend the allowlist without forking and recompiling the source. Set `network.allowed-input: true` to opt into a `workflow_call` input named `network_allowed` that callers can use to add domains or ecosystems at runtime.
298+
299+
The source workflow's compiled `network.allowed` is preserved as the baseline, and the caller's value is unioned in before AWF starts. Ecosystem shorthands (for example `rust`) are expanded to their concrete domain sets before merging, and the result is deduplicated.
300+
301+
```yaml wrap
302+
# source workflow (compiled to a reusable .lock.yml)
303+
on:
304+
workflow_call:
305+
network:
306+
allowed:
307+
- defaults
308+
allowed-input: true
309+
```
310+
311+
```yaml wrap
312+
# consumer workflow
313+
jobs:
314+
run:
315+
uses: owner/repo/.github/workflows/worker.lock.yml@v1
316+
with:
317+
network_allowed: rust,github.com
318+
```
319+
320+
The `network_allowed` input is a string accepting comma-separated ecosystem identifiers and/or domains. The behavior of the source workflow is unchanged when `allowed-input` is omitted or `false`.
321+
295322
## Wildcard Domain Patterns
296323

297324
Use wildcard patterns (`*.example.com`) to match any subdomain of a domain. Wildcards provide explicit control when you need to allow a family of subdomains.

docs/src/content/docs/reference/triggers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ on:
274274

275275
Workflows with `workflow_run` triggers include automatic security protections:
276276

277+
- **`workflows` is required:** `workflow_run` must include at least one non-empty entry in `workflows`. Missing, empty (`workflows: []`), or whitespace-only entries are rejected at compile time, since GitHub Actions silently disables `on.workflow_run` triggers that do not reference any workflows.
277278
- **Repository/fork validation:** The compiler injects repository ID and fork checks, rejecting cross-repository or fork-triggered runs.
278279
- **Branch restrictions required:** Include `branches` to limit triggering branches; without them the compiler warns (or errors in strict mode).
279280

docs/src/content/docs/setup/cli.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ Add a workflow with interactive guided setup. Checks requirements, adds the mark
151151
```bash wrap
152152
gh aw add-wizard githubnext/agentics/ci-doctor # Interactive setup
153153
gh aw add-wizard https://github.com/org/repo/blob/main/workflows/my-workflow.md
154+
gh aw add-wizard https://example.com/workflows/my-workflow.json # Arbitrary URL (JSON workflow)
154155
gh aw add-wizard githubnext/agentics/ci-doctor --skip-secret # Skip secret prompt
155156
```
156157

@@ -165,12 +166,16 @@ gh aw add githubnext/agentics/ci-doctor # Add single workflow
165166
gh aw add githubnext/agentics/ci-doctor@v1.0.0 # Add specific version
166167
gh aw add githubnext/agentics/ci-doctor --dir shared # Organize in subdirectory
167168
gh aw add githubnext/agentics/ci-doctor --create-pull-request # Create PR instead of commit
169+
gh aw add https://example.com/workflows/my-workflow.md # Arbitrary HTTPS URL (markdown)
170+
gh aw add https://example.com/workflows/my-workflow.json # Arbitrary HTTPS URL (JSON workflow definition)
168171
```
169172

170173
**Options:** `--dir/-d`, `--create-pull-request`, `--no-gitattributes`, `--append`, `--disable-security-scanner`, `--engine/-e`, `--force/-f`, `--name/-n`, `--no-stop-after`, `--stop-after`
171174

172175
Repository-level packages can declare an [`aw.yml` manifest](/gh-aw/reference/aw-yml-package-manifest/) at the repository root or in a nested package folder to define installable files, package `README.md`, schema compatibility, and minimum supported CLI versions.
173176

177+
`add` and `add-wizard` also accept arbitrary `http(s)://` URLs. The fetched response is dispatched by `Content-Type`: `text/markdown` (and `text/x-markdown`) is installed as a raw gh-aw workflow, and `application/json` (or any `*+json` suffix) is converted to a workflow markdown file before installation. Unknown content types produce an actionable error listing the detected type. For non-GitHub hosts, no include/dispatch-workflow dependency resolution is performed, and no GitHub authentication token is sent to the remote server.
178+
174179
#### `new`
175180

176181
Create a workflow template in `.github/workflows/`. Opens for editing automatically.

0 commit comments

Comments
 (0)