githubnext / githubnext/gh-aw-cao
[aw-doctor:compiler-security] Compiler/actionlint strict-mode failures across 34 workflows (githubnext/gh-aw-cao)
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 1
- Avg merge
- 49m
- Merged PRs (30d)
- 837
Description
`gh aw compile` in strict mode failed (exit code 1) for target `githubnext/gh-aw-cao`. Of 44 compiled `.md` sources / lock files, **34 lock files contain 156 actionlint errors**: 121 `[expression]` errors (undefined properties referenced in `${{ }}` expressions: `github.aw.*` import-inputs role checks, `github.event.inputs.{max_repos,rollout_percent,central_repo,control_plane_run_url,correlation_id}`, and step outputs `github-mcp-app-token`/`safe-outputs-app-token`) and 35 `[shellcheck]` SC2129 style findings (repeated `>>` redirects instead of grouped `{ } >> file`). No zizmor/poutine/runner-guard/grype/syft/grant sections appear in the report; those scanners did not run in this pass. **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/file | Severity | Finding | Remediation |
|---|---|---|---|---|
| actionlint | 34 lock files (e.g. `aw-doctor.lock.yml`, `aw-maintenance-upgrade.lock.yml`, `uk-ai-advisory.lock.yml`, `eu-cra-compliance*.lock.yml`, `self-care*.lock.yml`, `optimization*.lock.yml`, `software-development-practices*.lock.yml`, `dependabot*.lock.yml`) | error (strict) | `if:` expressions reference `github.aw.import-inputs.role` which is not a defined GitHub Actions context property | Fix the shared control import (`.github/workflows/shared/control.md`) so role/mode checks use a properly defined output or env var instead of a non-existent `github.aw.*` context path; recompile |
| actionlint | orchestrator-envelope workflows (`uk-ai-advisory.lock.yml` and similar) | error (strict) | `github.event.inputs.{max_repos,rollout_percent,central_repo,control_plane_run_url,correlation_id}` not declared in `workflow_dispatch.inputs`, so actionlint can't verify the property exists | Add the missing `inputs:` declarations to the `workflow_dispatch` trigger in the relevant `.md` source frontmatter (or source them from `env`/step outputs already validated), then recompile |
| actionlint | `aw-doctor.lock.yml` and others using MCP/app-token steps | error (strict) | Steps reference outputs `github-mcp-app-token` / `safe-outputs-app-token` that don't exist on the referenced prior step's outputs object | Correct the step `id:` reference or the output key name used to obtain the token in the relevant workflow source, then recompile |
| actionlint (shellcheck) | 35 occurrences across multiple lock files | style (SC2129) | Scripts use consecutive `>>` redirects instead of grouping with `{ cmd1; cmd2; } >> file` | Update the corresponding inline `run:` shell scripts in the `.md` sources to group redirects; recompile to confirm shellcheck is silent |
Full per-line detail (833 lines) is in the raw evidence section below (redacted, no secrets present).
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.
Specifically:
- Fix the `github.aw.import-inputs.role` undefined-property errors in the shared control import used across ~34 workflows.
- Add missing `workflow_dispatch` `inputs:` declarations (`max_repos`, `rollout_percent`, `central_repo`, `control_plane_run_url`, `correlation_id`) wherever `github.event.inputs.*` references them but they're undeclared.
- Fix the `github-mcp-app-token` / `safe-outputs-app-token` step-output reference errors (likely wrong step `id:` or output key).
- Fix the 35 SC2129 shellcheck findings by grouping consecutive `>>` redirects.
Raw evidence
Compiler summary:
```
Target: githubnext/gh-aw-cao
Exit code: 1
Workflow sources: 44
Compiled locks: 44
```
Sample errors (see full 833-line report retained in workflow run artifacts for exhaustive detail):
```
.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-token: ${{ steps.github-mcp-app-token.outputs.token || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
.github/workflows/uk-ai-advisory.lock.yml:1083:9: error: [expression] property "aw" is not defined in object type {github context...}
if: ${{ always() && github.aw.import-inputs.role == 'orchestrator' }}
.github/workflows/uk-ai-advisory.lock.yml:1401:9: error: [shellcheck] SC2129:style: Consider using { cmd1; cmd2; } >> file instead of individual redirects
.github/workflows/uk-ai-advisory.lock.yml:1524:39: error: [expression] property "central_repo" is not defined in object type {...}
CAO_CENTRAL_REPOSITORY: ${{ github.event.inputs.central_repo || '' }}
✗ actionlint failed
strict mode: actionlint found 156 errors in workflows - workflows must have no actionlint errors in strict mode
```
Error breakdown: 121 `[expression]` errors, 35 `[shellcheck]` errors, across 34 distinct lock files. No secrets or token-like values observed in output.
Control plane context
- Correlation ID: `34129454302-512`
- Central repository: `githubnext/gh-aw-cao`
- Control plane run URL: `https://github.com/githubnext/gh-aw-cao/actions/runs/34129454302`
> Generated by [:shield: AW Doctor / Compiler Security](https://github.com/githubnext/gh-aw-cao/actions/runs/34129454302) · copilot · auto · 30.7 AIC · ⌖ 9.04 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:54 PM UTC
Contributor guide
Research direction
Start with .github/workflows/shared/control.md and the affected .github/workflows/*.md sources; do not edit generated .lock.yml files. Run gh aw compile in strict mode and inspect the reported actionlint and shellcheck findings, including workflow_dispatch inputs, token step references, and grouped redirects. Done means recompilation and the listed security scans pass cleanly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, markdown, 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
- 35/100