githubnext / githubnext/gh-aw-cao

[aw-doctor:compiler-security] Compiler security scan: strict-mode actionlint errors and shellcheck style findings in githubnext/gh-aw-cao

Closed
#3,030 0 comments 0 reactions 0 assignees View on GitHub
aw-doctor aw-doctor:compiler-security
Dominant language
JavaScript
Stars
3
Forks
1
Avg merge
49m
Merged PRs (30d)
837

Description

Compiling all 43 GitHub Agentic Workflow sources in `githubnext/gh-aw-cao` with gh-aw's full strict-mode validation suite exited non-zero (exit code 1). actionlint found **152 errors** across the generated `.lock.yml` files: workflow-dispatch input expressions referencing undefined properties (`github-mcp-app-token`, `aw`, `central_repo`, `control_plane_run_url`, `correlation_id`, `max_repos`, `rollout_percent`) on `github.event.inputs`/`steps`/`github` context objects, plus 34 shellcheck SC2129 style findings (repeated `>>` redirects instead of a grouped block). No zizmor, poutine, runner-guard, grant, grype, or syft findings were reported — those scanners either did not run or reported clean. Root cause appears to be workflow-dispatch input schemas in the generated locks not declaring the fields referenced downstream (likely a shared `control.md`/import template issue affecting many packages), not a one-off typo.

**Action:** Assign this issue to Copilot using **Agent prompt** below; review its pull request and merge only after the full compiler and security scan passes.

Failure details

- **Target repository**: `githubnext/gh-aw-cao`
- **Compiler exit code**: `1`
- **Workflow sources checked**: `43`
- **Generated lock files checked**: `43`
- **Result**: `findings`

| Tool | Workflow(s) | Severity | Finding | Remediation |
|---|---|---|---|---|
| actionlint (expression) | many `.lock.yml` (e.g. `aw-doctor`, `aw-failures-investigator`, `uk-ai-advisory*`, `software-development-practices`) | unknown (strict-mode error) | `steps.github-mcp-app-token.outputs.token` referenced but step id `github-mcp-app-token` not defined in that job's step-output type (9 occurrences) | Ensure the `github-mcp-app-token` step is present/named correctly in the shared workflow-generation template, or remove the reference where the step doesn't exist |
| actionlint (expression) | many `.lock.yml` | unknown (strict-mode error) | `github.aw.import-inputs.role` referenced but `aw` not defined on `github` context (33 occurrences) | Fix/guard the `github.aw.*` expression usage; likely needs a different context accessor or an `env`/`needs.outputs` bridge in the shared control template |
| actionlint (expression) | orchestrator-role locks (e.g. `aw-doctor`, `uk-ai-advisory`, `software-development-practices`) | unknown (strict-mode error) | `github.event.inputs.central_repo`, `.control_plane_run_url`, `.correlation_id` not declared in `workflow_dispatch.inputs` for these workflows (21 occurrences across 3 fields) | Add `central_repo`, `control_plane_run_url`, `correlation_id` to the `workflow_dispatch.inputs` schema wherever these env vars are populated from `github.event.inputs` |
| actionlint (expression) | worker-role locks (e.g. `aw-failures-investigator`, `uk-ai-advisory-operational-resilience`) | unknown (strict-mode error) | `github.event.inputs.max_repos`, `.rollout_percent` not declared in `workflow_dispatch.inputs` (48 occurrences across 2 fields, some workflows have extra fields like `pages`, `bundle_id`) | Add `max_repos`, `rollout_percent` (and other referenced fields) to `workflow_dispatch.inputs` for these workflows |
| shellcheck (SC2129, style) | 34 `.lock.yml` files | style | Repeated individual `>> file` redirects instead of `{ cmd1; cmd2; } >> file` | Refactor the generated shell script blocks (in `.md` sources) to group commands with `{ ...; } >> file` for efficiency and cleanliness |

No findings reported for: zizmor, poutine, runner-guard, grant, grype, syft (not surfaced in this run's evidence — see raw evidence for full compiler invocation).

Agent prompt

1. Assign this issue to Copilot.
2. Configure its MCP client to launch `gh aw mcp-server` over stdio from the target repository, then give it the prompt below. Require the server's `fix` and `compile` tools; never allow direct edits to generated `.lock.yml` files.
3. Review the resulting pull request and require the same full compiler and security scan to pass before merge. If a finding needs human action, require the agent to stop and explain it.

**Agent prompt**

Fix the reported gh-aw compiler and security findings in this repository. Change only `.github/workflows/*.md` sources and directly related files; never edit generated `.lock.yml` files. Use the gh-aw MCP server's `fix` and `compile` tools, rerunning compilation with strict validation, model checks, actionlint, shellcheck, yamllint, zizmor, poutine, runner-guard, grant, grype, and syft until clean. Review generated lock-file diffs, preserve existing behavior, and stop with a concise explanation if a finding cannot be fixed safely.

Raw evidence

Compiler summary:
```
Target: githubnext/gh-aw-cao
Exit code: 1
Workflow sources: 43
Compiled locks: 43
```

Sample actionlint errors (representative, full set spans 152 errors across the 43 lock files):
```
.github/workflows/aw-doctor.lock.yml:478:29: error: [expression] property "github-mcp-app-token" is not defined in object type {set-runtime-paths: {...}; setup: {...}}
.github/workflows/aw-doctor.lock.yml:1187:29: error: [expression] property "aw" is not defined in object type {action: string; ...; workspace: string}
.github/workflows/aw-doctor.lock.yml:1505:9: error: [shellcheck] shellcheck reported issue in this script: SC2129:style:7:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects
.github/workflows/aw-doctor.lock.yml:1648:39: error: [expression] property "central_repo" is not defined in object type {aw_context: string; max_repos: string; rollout_percent: string; safe_output_mode: string; safe_output_repo: string; target_repo: string}
.github/workflows/aw-doctor.lock.yml:1649:42: error: [expression] property "control_plane_run_url" is not defined in object type {...}
.github/workflows/aw-doctor.lock.yml:1650:35: error: [expression] property "correlation_id" is not defined in object type {...}
```

Final tool status line:
```
✗ actionlint failed
strict mode: actionlint found 152 errors in workflows - workflows must have no actionlint errors in strict mode
```

`diff-stat.txt` and `git-status.txt` were empty (no local file changes from the compile dry-run). No token-like or credential-like values were present in the reviewed output.

Control plane context

- Correlation ID: `34003364648-31`
- Central repository: `githubnext/gh-aw-cao`
- Control plane run URL: https://github.com/githubnext/gh-aw-cao/actions/runs/34003364648

> Generated by [:shield: AW Doctor / Compiler Security](https://github.com/githubnext/gh-aw-cao/actions/runs/34003516543) · copilot · auto · 28.6 AIC · ⌖ 9.56 AIC · ⊞ 14.2K · [◷](https://github.com/search?q=repo%3Agithubnext%2Fgh-aw-cao+is%3Aissue+%22gh-aw-workflow-call-id%3A+githubnext%2Fgh-aw-cao%2Faw-maintenance-compiler-security%22&type=issues)
> - [x] expires on Sep 20, 2026, 1:23 AM UTC

Contributor guide

Open the contributing guide

Research direction

Start with the affected .github/workflows/*.md sources and compare them with the reported generated .lock.yml findings; do not edit the lock files directly. Use the gh-aw MCP server's fix and compile tools, then rerun strict validation and the listed security scanners. Done means all 43 workflows compile with no actionlint or shellcheck findings and existing behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, shell
Domain
ci-cd, devops, security, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.