githubnext / githubnext/gh-aw-cao

[aw-doctor:compiler-security] gh-aw compiler: 156 actionlint errors across all 44 workflows (strict mode failure)

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

Description

Target `githubnext/gh-aw-cao` failed `gh aw compile` strict validation (exit code 1): actionlint reported 156 errors across all 44 compiled `.lock.yml` files — 121 `[expression]` errors and 35 `[shellcheck]` style warnings promoted to errors under strict mode. Because actionlint failed, the compiler never reached shellcheck/yamllint/zizmor/poutine/runner-guard/grant/grype/syft stages, so container and license/vulnerability scanning did not run. No `[expression]` finding rose above "error" severity as reported by actionlint (no scanner-assigned severities available). Highest-impact issue: a recurring `github.aw.import-inputs` / dispatch-envelope schema mismatch (`aw`, `max_repos`, `rollout_percent`, `correlation_id`, `central_repo`, `control_plane_run_url` properties not defined) affecting orchestrator/dispatch workflows and shared control includes, plus an `always()`-guarded `github-mcp-app-token` step-output reference that actionlint can't resolve in several workflows.

**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` (scanners after actionlint did not run because actionlint failed; container/vulnerability/license scan stages: `incomplete`)

| Tool | Workflow(s) | Severity | Finding | Remediation |
|------|-------------|----------|---------|-------------|
| actionlint | 34 workflows using `github.aw.import-inputs...` (orchestrator role checks) | error | `property "aw" is not defined` on `github` context — the compiler emits an `if:` expression referencing an undocumented `github.aw` namespace not present in the actionlint context schema | Regenerate the `if:` condition using a supported context (e.g. a step output or `env` var populated earlier in the job) instead of `github.aw.import-inputs.role`; fix in shared control source, then recompile |
| actionlint | ~25 orchestrator/dispatch workflows (e.g. `uk-ai-advisory*.lock.yml`, `eu-cra-compliance*.lock.yml`, `optimization*.lock.yml`, `self-care*.lock.yml`) | error | `property "max_repos"` / `"rollout_percent"` not defined on `github.event.inputs` — dispatch envelope object type omits these optional inputs in some workflow variants | Ensure `workflow_dispatch.inputs` schema in the shared control/dispatch template consistently declares `max_repos` and `rollout_percent` (or removes references where the input isn't declared) so the generated type matches usage |
| actionlint | ~7 workflows | error | `property "correlation_id"` / `"control_plane_run_url"` / `"central_repo"` not defined on `github.event.inputs` — same envelope-schema drift as above, narrower input set | Align dispatch input declarations with control-envelope fields referenced in generated steps |
| actionlint | `aw-doctor.lock.yml` and ~9 other workflows | error | `property "github-mcp-app-token"` not defined on prior-step outputs object — step id referenced for `github-mcp-app-token.outputs.token` does not exist/match in the generated job | Verify the `github-mcp-app-token` step id and its enclosing job in the shared control template so `steps.github-mcp-app-token.outputs.token` resolves; recompile to confirm |
| actionlint (shellcheck SC2129) | 35 workflows, e.g. `uk-ai-advisory-operational-resilience.lock.yml:1715`, `aw-doctor.lock.yml:1505` | error (style) | `Consider using { cmd1; cmd2; } >> file instead of individual redirects` | Consolidate repeated `>>` redirects into a single grouped `{ ...; } >> file` block in the shared shell-script snippet that generates these steps |

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

Summary:
```
Target: githubnext/gh-aw-cao
Exit code: 1
Workflow sources: 44
Compiled locks: 44
```

actionlint result:
```
✗ actionlint failed
strict mode: actionlint found 156 errors in workflows - workflows must have no actionlint errors in strict mode
```

Error breakdown by actionlint category:
```
121 [expression]
35 [shellcheck]
```

Top recurring `[expression]` messages (count, message):
```
34 property "aw" is not defined in object type {action: string; ...; workspace: string} (github context)
25 property "rollout_percent" is not defined in object type {aw_context, batch_label, central_repo, control_plane_run_url, correlation_id, safe_output_mode, safe_output_repo, target_repo}
25 property "max_repos" is not defined in object type {aw_context, batch_label, central_repo, control_plane_run_url, correlation_id, safe_output_mode, safe_output_repo, target_repo}
9 property "github-mcp-app-token" is not defined in prior-step outputs object
7 property "correlation_id" is not defined ...
7 property "control_plane_run_url" is not defined ...
7 property "central_repo" is not defined ...
```

`[shellcheck]` message:
```
35 SC2129:style: Consider using { cmd1; cmd2; } >> file instead of individual redirects
```

Scanner stages after actionlint (shellcheck-as-separate-tool, yamllint, zizmor, poutine, runner-guard, grant, grype, syft): not reached in this run's report output — compilation halted at the actionlint gate before those stages executed.

Control plane context

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

> Generated by [:shield: AW Doctor / Compiler Security](https://github.com/githubnext/gh-aw-cao/actions/runs/34072605273) · copilot · auto · 34.8 AIC · ⌖ 6.85 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, 1:24 AM UTC

Contributor guide

Open the contributing guide

Research direction

Start with the .github/workflows/*.md sources and run gh aw compile in strict mode for the 44 workflows; do not edit generated .lock.yml files. Use the gh-aw MCP server's fix and compile tools to address the shared control and dispatch sources, then confirm the full compiler and security scan passes with no actionlint findings.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
build-system, ci-cd, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.