githubnext / githubnext/gh-aw-cao

[aw-doctor:compiler-security] Compiler security scan: 152 actionlint errors across 33 lock files (shared control-plane templates)

Closed
#3,958 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 43 gh-aw workflow sources in `githubnext/gh-aw-cao` succeeded, but the actionlint strict-mode gate failed with **152 errors across 33 generated lock files**, all falling into 5 recurring root causes in the shared control/orchestrator templates (no vulnerable container images, license issues, or other scanner findings were reported). Highest-severity/most frequent: `github.aw.import-inputs` expression referencing an undefined `aw` context property (33 occurrences) and `steps.github-mcp-app-token` output referenced without the step existing in that job's needs (22 occurrences). Recommended next action: assign to Copilot to fix the shared workflow-input/context expressions in `.github/workflows/shared/control.md` and related sources, then recompile.

**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**: `43`
- **Generated lock files checked**: `43`
- **Result**: `findings`

| Tool | Workflow(s) affected | Severity | Finding | Remediation |
|------|----------------------|----------|---------|-------------|
| actionlint | 33 lock files (e.g. `aw-doctor`, `aw-failures-investigator`, `aw-maintenance-compiler-security`, `self-care*`, `uk-ai-advisory*`, `software-development-practices*`) | unknown (actionlint error) | `property "aw" is not defined` — `if: ${{ always() && github.aw.import-inputs.role == 'orchestrator' }}` references a non-existent `github.aw` context property | Replace with a defined context path (e.g. an `env`/`needs.*.outputs` value populated from the actual import inputs) instead of `github.aw.import-inputs.*` |
| actionlint | 11 lock files (e.g. `aw-doctor`, `aw-failures-investigator`, `uk-ai-advisory-operational-resilience`) | unknown (actionlint error) | `property "github-mcp-app-token" is not defined` — `steps.github-mcp-app-token.outputs.token` referenced in a job where that step id is not defined/reachable | Only reference `steps.github-mcp-app-token.outputs.token` in jobs where that step actually runs, or pass the token through job outputs/`needs` |
| actionlint | 7 lock files (e.g. `aw-doctor`, `self-care`, `software-development-practices`, `uk-ai-advisory`) | unknown (actionlint error) | `property "central_repo"`, `"control_plane_run_url"`, `"correlation_id"` not defined on `github.event.inputs` object type used by orchestrator jobs | Declare these as `workflow_dispatch` inputs on the job/workflow referencing them, or source them from the correct inputs object |
| actionlint | 26 lock files (e.g. `aw-failures-investigator`, `self-care*`, `uk-ai-advisory*`) | unknown (actionlint error) | `property "max_repos"`, `"rollout_percent"` not defined on the `github.event.inputs`-like object type used by worker dispatch jobs | Declare these inputs on the dispatching job/workflow, or reference the correct inputs object that already has them |
| actionlint (shellcheck) | 34 lock files | style (unknown/low) | `SC2129`: multiple individual `>>` redirects into the same file; suggests grouping into `{ cmd1; cmd2; } >> file` | Group the redirected commands into a single `{ ...; } >> file` block in the shared shell script template |

All findings originate from shared/generated template code (import-inputs handling, github-mcp-app-token step wiring, and orchestrator/worker dispatch env vars) reused across many packages, so a fix to the shared `.md` sources under `.github/workflows/shared/` and the affected package workflow sources should resolve most or all of the 152 errors at once.

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: 43
Compiled locks: 43
```

Representative actionlint errors (full report contains 152 errors across 33 files; identical patterns repeat per package):

```
.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: {...}}
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 {action: string; ...}
1187 | if: ${{ always() && github.aw.import-inputs.role == 'orchestrator' }}

.github/workflows/aw-doctor.lock.yml:1505:9: error: [shellcheck] SC2129:style:7:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects

.github/workflows/aw-doctor.lock.yml:1628:39: error: [expression] property "central_repo" is not defined in object type {aw_context: string; max_repos: string; rollout_percent: string; safe_output_mode: string; safe_output_repo: string; target_repo: string}
1628 | CAO_CENTRAL_REPOSITORY: ${{ github.event.inputs.central_repo || '' }}

.github/workflows/aw-failures-investigator.lock.yml:1929: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}
1929 | CAO_REQUESTED_MAX_REPOSITORIES: ${{ github.event.inputs.max_repos || '' }}
```

Final compiler verdict:

```
✗ actionlint failed
strict mode: actionlint found 152 errors in workflows — workflows must have no actionlint errors in strict mode
```

No git diff was produced by the compile step (dry-run only); no grype/syft/poutine/zizmor/runner-guard/grant findings were present in the report beyond the actionlint/shellcheck output above.

Control plane context

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

> Generated by [:shield: AW Doctor / Compiler Security](https://github.com/githubnext/gh-aw-cao/actions/runs/34065154304) · copilot · auto · 46.1 AIC · ⌖ 10.2 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 20, 2026, 10:56 PM UTC

Contributor guide

Open the contributing guide

Research direction

Start with .github/workflows/shared/control.md and the related workflow source files, using the representative actionlint errors to trace the shared import-input, token, dispatch-input, and shell templates. Recompile the sources in strict mode rather than editing generated .lock.yml files; done means all 43 workflows compile and the required compiler and security scans pass.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.