githubnext / githubnext/gh-aw-cao
[aw-doctor:compiler-security] Compiler Security Scan: 156 actionlint errors block strict-mode compilation across 34 workflows
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 1
- Avg merge
- 49m
- Merged PRs (30d)
- 837
Description
Compiling all 44 GitHub Agentic Workflow sources in `githubnext/gh-aw-cao` (target SHA `5637d59`) with the gh-aw compiler's strict-mode validation suite failed: actionlint reported 156 errors across 34 generated lock files, causing the compile step to exit with code 1. No container-image vulnerability, license, or dedicated security-scanner (zizmor/poutine/runner-guard/grype/syft/grant) findings were present in the evidence — all findings are actionlint expression-type and shellcheck-style errors. Highest-severity category: strict-mode blocking compiler errors (no severity ranking assigned by actionlint itself). Recommended next action: assign remediation to Copilot using the agent prompt below.
**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**: `44`
- **Generated lock files checked**: `44`
- **Result**: `findings`
| Tool | Workflow(s) | Severity | Finding | Remediation |
|---|---|---|---|---|
| actionlint (expression) | 34 lock files (e.g. `uk-ai-advisory*.lock.yml`, `software-development-practices*.lock.yml`, `self-care*.lock.yml`) | unknown | `github.aw.import-inputs.role` accessed via `github.aw` which is not a defined property on the `github` context in generated `if:` conditions | Fix the shared control/import-inputs source (`.github/workflows/shared/control.md` and dependents) so the generated expression references a defined context (e.g. an `env` or `steps` output) instead of an undefined `github.aw` property, then recompile |
| actionlint (expression) | Same 34 lock files | unknown | `github.event.inputs.max_repos`, `rollout_percent`, `central_repo`, `control_plane_run_url`, `correlation_id` referenced but not declared in the `workflow_dispatch.inputs` object type inferred for the generated workflow | Add the missing `workflow_dispatch` input declarations (or use the correct existing input name) in the `.md` workflow-dispatch frontmatter so all referenced `github.event.inputs.*` keys exist |
| actionlint (expression) | 9 lock files | unknown | `steps.github-mcp-app-token.outputs.token` referenced but step id `github-mcp-app-token` not defined in the object type built from prior steps (`set-runtime-paths`, `setup`) | Confirm the step that generates the GitHub MCP app token exists with matching `id:` earlier in the same job, or update the reference to the correct step id |
| shellcheck (via actionlint) | 35 lock files | style (SC2129) | Individual `>>` redirects in a `run:` script; shellcheck recommends grouping with `{ cmd1; cmd2; } >> file` | Update the corresponding shell script block in the `.md` source to group sequential appends into a single `{ ...; } >> file` redirect |
Deduplicated by underlying cause: 4 distinct root causes account for all 156 reported lines (50 + 21 + 25 + 9 + 34 + 1 = spread across the 4 categories above, with a few files hitting both the `max_repos` batch of inputs and the `central_repo` batch of inputs separately).
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: 44
Compiled locks: 44
```
Sample actionlint errors (representative, truncated; no secret-like values observed):
```
.github/workflows/uk-ai-advisory-operational-resilience.lock.yml:529:29: error: [expression] property "github-mcp-app-token" is not defined in object type {set-runtime-paths: ...; setup: ...}
.github/workflows/uk-ai-advisory-operational-resilience.lock.yml:1101:29: error: [expression] property "aw" is not defined in object type {action: string; ...}
1101 | if: ${{ always() && github.aw.import-inputs.role == 'orchestrator' }}
.github/workflows/uk-ai-advisory-operational-resilience.lock.yml:1715:9: error: [shellcheck] shellcheck reported issue in this script: SC2129:style:7:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects
.github/workflows/uk-ai-advisory-operational-resilience.lock.yml:1739:47: error: [expression] property "max_repos" is not defined in object type {aw_context: string; batch_label: string; central_repo: string; control_plane_run_url: string; correlation_id: string; safe_output_mode: string; safe_output_repo: string; target_repo: string}
.github/workflows/uk-ai-advisory-operational-resilience.lock.yml:1741:46: error: [expression] property "rollout_percent" is not defined in object type {...same...}
```
Final compiler verdict:
```
✗ actionlint failed
strict mode: actionlint found 156 errors in workflows - workflows must have no actionlint errors in strict mode
```
`git-status.txt` and `diff-stat.txt` were both empty (no working-tree changes from the compile/scan itself). No zizmor, poutine, runner-guard, grant, grype, or syft findings appeared anywhere in `report.txt`.
Control plane context
- Correlation ID: `34080874291-58`
- Central repository: `githubnext/gh-aw-cao`
- Control plane run URL: `https://github.com/githubnext/gh-aw-cao/actions/runs/34080874291`
> Generated by [:shield: AW Doctor / Compiler Security](https://github.com/githubnext/gh-aw-cao/actions/runs/34081070132) · copilot · auto · 36.2 AIC · ⌖ 10.4 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 21, 2026, 3:58 AM UTC
Contributor guide
Research direction
Start with .github/workflows/shared/control.md and the related .github/workflows/*.md sources rather than generated .lock.yml files. Run the gh-aw compiler in strict mode and inspect the actionlint errors for undefined github.aw inputs, missing workflow_dispatch inputs, the absent github-mcp-app-token step, and SC2129 redirects. Done means all 44 workflows compile and the full listed scan passes cleanly.
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
- 45/100