githubnext / githubnext/gh-aw-cao
[aw-doctor:compiler-security] Compiler strict-mode validation failing across 33 workflows (156 actionlint errors)
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 1
- Avg merge
- 49m
- Merged PRs (30d)
- 837
Description
Compiling all 44 gh-aw workflow sources in `githubnext/gh-aw-cao` with the full compiler validation, lint, and security-scanner suite (strict mode) exited with code 1. Actionlint reported **156 errors across 33 generated `.lock.yml` files** (121 `[expression]` type errors + 35 `[shellcheck]` style warnings). No container-image, license, or dedicated security-scanner (zizmor/poutine/runner-guard/grant/grype/syft) findings were produced in this run's evidence — the failure is confined to actionlint's static analysis. Root cause of nearly all `[expression]` errors traces to the shared import `.github/workflows/shared/control.md`, which references `github.aw.import-inputs.role`, `github-mcp-app-token` step outputs, and workflow_dispatch inputs (`max_repos`, `rollout_percent`, `central_repo`, `control_plane_run_url`, `correlation_id`) that actionlint's type checker can't resolve in the generated contexts of the 33 importing workflows. Highest-severity finding supported by tooling: actionlint strict-mode compile failure (blocks compilation), tool-reported severity `error` for `[expression]` findings and `style` for `[shellcheck]` SC2129 findings.
**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/Source | Severity | Finding | Remediation |
|---|---|---|---|---|
| actionlint | `shared/control.md` import (34 occurrences across `aw-doctor.lock.yml`, `aw-failures-investigator.lock.yml`, `aw-maintenance-compiler-security.lock.yml`, `aw-maintenance-upgrade.lock.yml`, `dependabot*.lock.yml`, `eu-cra-compliance*.lock.yml`, `optimization*.lock.yml`, `self-care*.lock.yml`, `software-development-practices*.lock.yml`, `uk-ai-advisory*.lock.yml`) | error | `property "aw" is not defined` on `github.aw.import-inputs.role` in an `if:` condition | Restructure the condition to use a context/output actionlint can type-check (e.g. an intermediate step output or `env.CAO_ROLE`) instead of `github.aw.import-inputs.*` |
| actionlint | Same import, various workflows (27 occurrences each) | error | `property "rollout_percent"` / `property "max_repos"` not defined on `github.event.inputs` | Declare these as explicit `workflow_dispatch.inputs` in the compiled workflow, or read them via a typed env/step output rather than `github.event.inputs.` when the trigger doesn't declare them |
| actionlint | Same import, various workflows (11 occurrences) | error | `property "github-mcp-app-token"` not defined on prior job/step outputs object | Ensure the step id `github-mcp-app-token` exists in the same job before it's referenced, or reference it via the correct job/step output path |
| actionlint | Same import, 7 workflows each | error | `property "correlation_id"` / `control_plane_run_url"` / `"central_repo"` not defined on `github.event.inputs` | Same as above — declare these inputs explicitly or source them from env set earlier in the job |
| actionlint | `aw-doctor.lock.yml` | error | `property "safe-outputs-app-token"` not defined (1 occurrence) | Same category — verify step id and output path match |
| actionlint (shellcheck) | All 33 affected `.lock.yml` files | style (SC2129) | Multiple individual `>>` redirects in a `run:` block instead of a single `{ ...; } >> file` group | Combine sequential `>> $GITHUB_ENV`/`>> $GITHUB_OUTPUT` appends into one grouped redirect in the underlying shared script/template |
Deduplicated: all findings originate from a single shared source (`shared/control.md`) reused via imports, so fixing it once should resolve the majority of the 156 errors across all 33 workflows after recompilation.
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
```
Error category counts:
```
121 error: [expression]
35 error: [shellcheck]
```
Distinct `[expression]` property patterns:
```
34 property "aw" is not defined
27 property "rollout_percent" is not defined
27 property "max_repos" is not defined
11 property "github-mcp-app-token" is not defined
7 property "correlation_id" is not defined
7 property "control_plane_run_url" is not defined
7 property "central_repo" is not defined
1 property "safe-outputs-app-token" is not defined
```
shellcheck rule: `35 SC2129:style` (redirect consolidation).
Final actionlint verdict:
```
✗ actionlint failed
strict mode: actionlint found 156 errors in workflows - workflows must have no actionlint errors in strict mode
```
No zizmor, poutine, runner-guard, grant, grype, or syft findings appeared in the captured evidence for this run.
Control plane context
- Correlation ID: `34084794640-455`
- Central repository: `githubnext/gh-aw-cao`
- Control plane run URL: `https://github.com/githubnext/gh-aw-cao/actions/runs/34084794640`
> Generated by [:shield: AW Doctor / Compiler Security](https://github.com/githubnext/gh-aw-cao/actions/runs/34084794640) · copilot · auto · 38.4 AIC · ⌖ 8.61 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, 5:00 AM UTC
Contributor guide
Research direction
Start with shared/control.md, the shared import identified as the source of the actionlint findings, and inspect how its contexts, inputs, step outputs, and shell redirects are compiled. Run the strict compiler and actionlint suite before and after changes, without editing generated .lock.yml files. Done means all 44 sources compile and the 156 reported findings are resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, markdown, shell
- Domain
- build-system, ci-cd, devops, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100