githubnext / githubnext/gh-aw-cao

[aw-doctor:compiler-security] Compiler security scan: 156 strict-mode actionlint errors across 34 workflow lock files

Closed
#4,121 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 44 gh-aw workflow sources in `githubnext/gh-aw-cao` under strict mode failed (exit code 1). Actionlint reported **156 errors** across **34 generated lock files**, all `[expression]`/`[shellcheck]` category findings — no compiler crash, no scanner (zizmor/poutine/runner-guard/grype/syft) output was present in the evidence, and no container-image or license findings were found. Highest-severity supported finding: strict-mode actionlint `error` level (compiler-blocking), root-caused to four recurring patterns — unresolved `github.aw.import-inputs` typed-expression access (34 occurrences), missing `rollout_percent`/`max_repos` orchestrator-dispatch inputs (27 each), unresolved `github-mcp-app-token`/`safe-outputs-app-token` step outputs (12), and missing `correlation_id`/`control_plane_run_url`/`central_repo` worker-dispatch inputs (7 each), plus 34 SC2129 shellcheck style 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/Image | Severity (tool-reported) | Finding | Remediation |
|---|---|---|---|---|
| actionlint | 34 workflows (e.g. `aw-doctor`, `self-care*`, `eu-cra-compliance*`, `software-development-practices*`, `uk-ai-advisory*`, `optimization*`) | error | `property "aw" is not defined` on `github.aw.import-inputs.role` typed-expression access in `if:` conditions (34 occurrences) | Use a supported typed accessor for import-role checks (e.g. an env/output var set earlier in the job) instead of `github.aw.import-inputs`, or update the gh-aw compiler's actionlint type stub to declare `aw` on the `github` context |
| actionlint | Same 27 workflows, orchestrator-dispatch jobs | error | `property "max_repos"` / `property "rollout_percent"` not defined in `github.event.inputs` type when referenced via `${{ github.event.inputs.max_repos \|\| '' }}` (27 each = 54 total) | Declare `max_repos` and `rollout_percent` in the `workflow_dispatch.inputs` schema of the generated lock file, or reference values only through already-declared context vars |
| actionlint | Same 7 workflows, worker-dispatch jobs | error | `property "correlation_id"` / `"control_plane_run_url"` / `"central_repo"` not defined in `github.event.inputs` type (7 each = 21 total) | Add these three fields to the `workflow_dispatch.inputs` schema of affected worker-dispatch lock files so actionlint's typed-expression check recognizes them |
| actionlint | `aw-doctor`, `uk-ai-advisory-operational-resilience`, others | error | `property "github-mcp-app-token"` / `"safe-outputs-app-token"` not defined on prior-step outputs object (12 occurrences) | Ensure the referenced step id (e.g. `github-mcp-app-token`) exists earlier in the same job before its `.outputs.token` is referenced, or correct a typo in the step id |
| shellcheck (via actionlint) | 34 workflows | style (SC2129) | "Consider using `{ cmd1; cmd2; } >> file` instead of individual redirects" in generated `run:` blocks | Group repeated `>>` redirects into a single `{ ...; } >> file` block in the workflow Markdown source's embedded shell scripts |

No zizmor, poutine, runner-guard, grant, grype, or syft findings were present in the evidence (`report.txt`, 833 lines); `git-status.txt` and `diff-stat.txt` were empty (dry-run compile, no lock-file changes committed).

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.

The specific errors to resolve are the 156 actionlint strict-mode errors reported across 34 lock files: (1) 34 occurrences of `property "aw" is not defined` from `github.aw.import-inputs.role` expressions, (2) 54 occurrences of undeclared `max_repos`/`rollout_percent` workflow_dispatch inputs, (3) 21 occurrences of undeclared `correlation_id`/`control_plane_run_url`/`central_repo` workflow_dispatch inputs, (4) 12 occurrences of unresolved `github-mcp-app-token`/`safe-outputs-app-token` step-output references, and (5) 34 SC2129 shellcheck style findings for repeated `>>` redirects.

Raw evidence

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

Sample actionlint errors (full list spans 833 lines in `report.txt`, redacted of any token-like values — none were present):

```
.github/workflows/aw-doctor.lock.yml:478:29: error: [expression] property "github-mcp-app-token" is not defined in object type {...}
478 | github-token: ${{ steps.github-mcp-app-token.outputs.token || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}

.github/workflows/aw-doctor.lock.yml:1187:29: error: [expression] property "aw" is not defined in object type {...}
1187 | if: ${{ always() && github.aw.import-inputs.role == 'orchestrator' }}

.github/workflows/software-development-practices.lock.yml:1578:35: error: [expression] property "correlation_id" is not defined in object type {aw_context, max_repos, rollout_percent, safe_output_mode, safe_output_repo, target_repo}
1578 | CAO_CORRELATION_ID: ${{ github.event.inputs.correlation_id || '' }}
```

Final summary line: `✗ actionlint failed — strict mode: actionlint found 156 errors in workflows - workflows must have no actionlint errors in strict mode`

`git-status.txt`: empty. `diff-stat.txt`: empty (no lock-file mutations from this dry-run compile).

Control plane context

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

> Generated by [:shield: AW Doctor / Compiler Security](https://github.com/githubnext/gh-aw-cao/actions/runs/34074766041) · copilot · auto · 37.9 AIC · ⌖ 8.03 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, 2:05 AM UTC

Contributor guide

Open the contributing guide

Research direction

Start with the `.github/workflows/*.md` sources and the reported actionlint patterns; do not edit generated `.lock.yml` files. Use the `gh aw mcp-server` `fix` and `compile` entry points, then review generated lock-file diffs. Done means strict compilation and the listed model, actionlint, shellcheck, yamllint, security, and supply-chain scans pass cleanly.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.