Skip to content

Commit 763ae56

Browse files
docs(references): daily intelligence update 2026-04-20
- Fix: push-to-pull-request-branch if-no-changes values corrected (warn/error/ignore) - Add: update-pull-request update-branch parameter (PR #27244) - Add: push-to-pull-request-branch fallback-as-pull-request parameter (PR #27220) - Add: push-to-pull-request-branch undocumented params (allowed-files, excluded-files, patch-format, etc.) - Add: SEC-005 workflow_dispatch target repo allowlist gotcha (PR #27242) - Update: knowledge base with 2026-04-20 entries Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 96b5b99 commit 763ae56

4 files changed

Lines changed: 134 additions & 2 deletions

File tree

.claude/skills/gh-aw-report/knowledge-base.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,33 @@
66
77
---
88

9+
## [2026-04-20] Intelligence Update
10+
11+
### 2026-04-20 — safe-outputs — update-pull-request `update-branch` parameter
12+
- **New parameter**: `update-branch: true` in `safe-outputs.update-pull-request` config block
13+
- **Behavior**: Calls `github.rest.pulls.updateBranch()` to sync PR branch with base before metadata updates
14+
- **Default**: `false` (opt-in)
15+
- **Source**: github/gh-aw PR #27244 (2026-04-20)
16+
17+
### 2026-04-20 — safe-outputs — push-to-pull-request-branch `fallback-as-pull-request`
18+
- **New parameter**: `fallback-as-pull-request` boolean (default `true`)
19+
- **Behavior**: When target PR branch has diverged, creates a fallback PR rather than failing — **enabled by default**
20+
- **To disable**: `fallback-as-pull-request: false`
21+
- **Side effect**: `pull-requests: write` permission now requested by default for push-to-pull-request-branch
22+
- **Source**: github/gh-aw PR #27220 (2026-04-20)
23+
24+
### 2026-04-20 — security — SEC-005 allowlist validation for workflow_dispatch
25+
- **Change**: `workflow_dispatch` target repo overrides now validated against SEC-005 allowlist
26+
- **Impact**: Cross-repo dispatch must be in `allowed-repos` or explicitly permitted
27+
- **Source**: github/gh-aw PR #27242 (2026-04-20)
28+
29+
### 2026-04-20 — correction — push-to-pull-request-branch if-no-changes valid values
30+
- **Correct values**: `"warn"` (default), `"error"`, `"ignore"`
31+
- **Previously documented incorrectly as**: `"comment"`, `"skip"` — these are INVALID values
32+
- **Source**: github/gh-aw `pkg/workflow/push_to_pull_request_branch.go` switch statement
33+
34+
---
35+
936
## [2026-04-18] Intelligence Update
1037

1138
### GitHub MCP Server
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# gh-aw Intelligence Report — 2026-04-20
2+
3+
**Date:** 2026-04-20
4+
**Sources:** GitHub API (github/gh-aw, github/github-mcp-server commits)
5+
**Last KB date:** 2026-04-18
6+
7+
---
8+
9+
## 1. gh-aw Core Updates
10+
11+
### New Safe-Output: `update-pull-request` `update-branch` parameter (PR #27244, 2026-04-20)
12+
- **Feature**: `update-branch: true` added to `update-pull-request` safe-output
13+
- **Behavior**: When enabled, calls `github.rest.pulls.updateBranch()` to sync the PR branch with its base branch **before** performing other PR metadata updates (title, body, etc.)
14+
- **Default**: `false` (opt-in)
15+
- **YAML frontmatter key**: `update-branch: true` in `safe-outputs.update-pull-request` config block
16+
- **Source**: https://github.com/github/gh-aw/commit/ca935b6cc076763418422ead6209f1ddb939c13c
17+
18+
### New Safe-Output: `push-to-pull-request-branch` `fallback-as-pull-request` parameter (PR #27220, 2026-04-20)
19+
- **Feature**: `fallback-as-pull-request` added to `push-to-pull-request-branch` safe-output
20+
- **Behavior**: When the target PR branch has diverged (non-fast-forward), creates a new fallback PR instead of failing
21+
- **Default**: `true` (opt-out behavior — it runs automatically unless disabled)
22+
- **To disable**: `fallback-as-pull-request: false`
23+
- **Side effect of default**: `pull-requests: write` permission is now requested by default even if you don't explicitly set it
24+
- **Source**: https://github.com/github/gh-aw/commit/4f668af8348d30b8c00a1dfc92e499f6cd4e2eb1
25+
26+
### SEC-005 Allowlist Validation for `workflow_dispatch` Target Repo Overrides (PR #27242, 2026-04-20)
27+
- **Security**: `workflow_dispatch` target repository overrides are now validated against the SEC-005 allowlist
28+
- **Impact**: Cross-repo dispatch operations must have the target repo in the allowlist or be explicitly permitted
29+
- **Source**: https://github.com/github/gh-aw/commit/b50d2586f3b0453447859697656760445e06e04c
30+
31+
### `push-to-pull-request-branch` `if-no-changes` incorrect values documented
32+
- **Bug in reference**: The reference file documents `"comment"` and `"skip"` as valid values for `if-no-changes`
33+
- **Actual valid values**: `"warn"` (default), `"error"`, `"ignore"` (from Go implementation)
34+
- **This is a priority-1 incorrect gap**
35+
36+
### MCP Server CLI SSE `tools/list` fix (PR #27207, 2026-04-19)
37+
- **Fix**: MCP servers mounted as CLI tools now correctly handle SSE-formatted `tools/list` responses
38+
- **Impact**: Resolves edge case where MCP server as CLI would fail to enumerate tools
39+
- **Source**: https://github.com/github/gh-aw/commit/c27524b9eec4a58700270582c92660f6ef1e2895
40+
41+
---
42+
43+
## 2. GitHub MCP Server Updates
44+
45+
No new releases or commits since v1.0.0 (2026-04-16). Latest commit: validation fix for `set_issue_fields` to enforce exactly one value key per field (2026-04-16).
46+
47+
---
48+
49+
## 3. Gap Analysis Summary
50+
51+
| Gap | Type | File | Priority |
52+
|-----|------|------|----------|
53+
| GAP-1: `if-no-changes` has wrong values ("comment","skip") — should be "warn","error","ignore" | incorrect | `safe-outputs.md` | 1 (highest) |
54+
| GAP-2: `update-pull-request` missing `update-branch` parameter | missing | `safe-outputs.md` | 3 |
55+
| GAP-3: `push-to-pull-request-branch` missing `fallback-as-pull-request` parameter | missing | `safe-outputs.md` | 3 |
56+
| GAP-4: `push-to-pull-request-branch` missing `allowed-files`, `excluded-files`, `patch-format`, `ignore-missing-branch-failure` | missing | `safe-outputs.md` | 3 |
57+
| GAP-5: SEC-005 `workflow_dispatch` target repo allowlist not documented | missing | `production-gotchas.md` | 3 |
58+
59+
---
60+
61+
## 4. Knowledge Base Updates
62+
63+
- `update-pull-request update-branch` parameter documented
64+
- `push-to-pull-request-branch fallback-as-pull-request` parameter documented
65+
- SEC-005 enforcement noted
66+
- `if-no-changes` correct values recorded
67+
68+
---
69+
70+
_Automated by Daily Intelligence Pipeline · 2026-04-20_

skills/aw-author/references/production-gotchas.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,3 +395,27 @@ If still seeing this warning:
395395
2. Verify MCP gateway is v0.2.24+ by checking workflow logs for the MCP gateway version line.
396396

397397
This was a cosmetic/log-noise issue only — workflow functionality was not impacted.
398+
399+
---
400+
401+
## Cross-Repository Dispatch Security
402+
403+
### SEC-005: `workflow_dispatch` Target Repo Overrides Must Pass Allowlist
404+
405+
When using `dispatch-workflow` or `call-workflow` safe-outputs that include a `target-repo` override, gh-aw enforces **SEC-005 allowlist validation** (as of 2026-04-20, PR #27242).
406+
407+
**What this means:**
408+
- The target repository must appear in `allowed-repos` on the dispatch/call-workflow safe-output config block, **or** the workflow must use `pull-request-repo` configuration to permit the target.
409+
- Workflows that hard-code a `target-repo` without a matching `allowed-repos` entry will now fail at runtime with a validation error.
410+
411+
**How to fix:**
412+
```yaml
413+
safe-outputs:
414+
dispatch-workflow:
415+
target-repo: owner/target-repo
416+
allowed-repos:
417+
- owner/target-repo # Must be listed here for SEC-005 to pass
418+
max: 1
419+
```
420+
421+
**Source:** gh-aw PR #27242 (2026-04-20) — `invocation_context_helpers.cjs`

skills/aw-author/references/safe-outputs.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ safe-outputs:
259259
| `body` | boolean | `true` | Enable body updates |
260260
| `footer` | boolean | `true` | Include AI footer |
261261
| `target` | string/int | `"triggering"` | Target PR |
262+
| `update-branch` | boolean | `false` | Sync PR branch with base branch before updating (calls `updateBranch` API) |
262263
| `max` | integer | `1` | Maximum updates per run |
263264
| `target-repo` | string | — | Cross-repo target |
264265
| `github-token` | string | — | Custom authentication token |
@@ -294,7 +295,7 @@ safe-outputs:
294295
title-prefix: "[fix]"
295296
labels: [automated]
296297
protected-files: fallback-to-issue
297-
if-no-changes: "comment"
298+
if-no-changes: "warn"
298299
max: 1
299300
```
300301

@@ -304,8 +305,18 @@ safe-outputs:
304305
| `title-prefix` | string | — | Require title prefix |
305306
| `labels` | list | — | Require all labels present |
306307
| `protected-files` | string | — | `"fallback-to-issue"` — protect certain files |
307-
| `if-no-changes` | string | — | Action when no changes: `"comment"`, `"skip"` |
308+
| `if-no-changes` | string | `"warn"` | Action when no changes: `"warn"` (default), `"error"`, `"ignore"` |
309+
| `ignore-missing-branch-failure` | boolean | `false` | Treat missing/deleted target branches as skipped instead of failures |
310+
| `commit-title-suffix` | string | — | Optional suffix to append to generated commit titles |
311+
| `allowed-files` | list | — | Glob patterns forming a strict allowlist of files eligible for push |
312+
| `excluded-files` | list | — | Glob patterns for files to exclude via git pathspecs (stripped before commit) |
313+
| `patch-format` | string | `"am"` | Transport format: `"am"` (git format-patch) or `"bundle"` (git bundle, preserves merge topology) |
314+
| `fallback-as-pull-request` | boolean | `true` | Create fallback PR when push fails due to diverged/non-fast-forward branch; set `false` to disable |
315+
| `allow-workflows` | boolean | `false` | Add `workflows: write` to the App token (requires `safe-outputs.github-app`) |
316+
| `github-token-for-extra-empty-commit` | string | — | Token for empty commit to trigger CI (PAT or `"app"`) |
308317
| `max` | integer | `1` | Maximum pushes per run |
318+
| `target-repo` | string | — | Cross-repo target (`"owner/repo"`) |
319+
| `allowed-repos` | list | — | Additional allowed repositories |
309320

310321
**Required permissions:** `pull-requests: write`, `contents: write`
311322

0 commit comments

Comments
 (0)