githubnext / githubnext/gh-aw-cao

[aw-doctor:compiler-security] Compiler security scan — actionlint strict-mode failures block scanner suite

Closed
#3,112 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 workflows in `githubnext/gh-aw-cao` failed at the actionlint stage in strict mode with 152 errors, so the compiler exited before zizmor, poutine, runner-guard, grant, grype, or syft could run. Findings fall into two categories: (1) expression-type errors where generated lock files reference context properties (`github.aw.*`, `github.event.inputs.*` custom fields such as `central_repo`/`correlation_id`/`control_plane_run_url`/`target_repo`, and job-output fields like `set-runtime-paths`/`setup`) that actionlint's schema doesn't recognize, and (2) 34 shellcheck SC2129 style warnings about using `{ cmd1; cmd2; } >> file` instead of individual redirects. No CVEs, container, or license findings were reached since the pipeline stopped early.

**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` (compilation blocked before scanners ran)

| Tool | Workflow/File | Severity | Finding | Remediation |
|---|---|---|---|---|
| actionlint | many `.lock.yml` files (e.g. `uk-ai-advisory.lock.yml`, `aw-doctor.lock.yml`, `aw-maintenance-upgrade.lock.yml`, `optimization-ai-credit-auditor.lock.yml`) | error (strict mode) | `property "X" is not defined in object type {...}` for `github.aw.import-inputs.*` references (~33 occurrences) | Generated lock steps reference a custom `github.aw` context extension unknown to actionlint's static schema; regenerate/fix via `gh aw fix`+`compile` in the `.md` sources rather than editing lock files directly |
| actionlint | many `.lock.yml` files | error (strict mode) | `property "central_repo"/"correlation_id"/"control_plane_run_url"/"target_repo"/"batch_label"/"max_repos"/"rollout_percent"/"pages"/"base_branch"/"bundle_id"/"bundle_spec"/"lane"` not defined on `github.event.inputs` object (~74 occurrences) | Workflow-dispatch input schema in the `.md` frontmatter doesn't declare these inputs for every importing workflow; add matching `on.workflow_dispatch.inputs` entries in source, then recompile |
| actionlint | `aw-doctor.lock.yml` and others | error (strict mode) | `property "github-mcp-app-token"`/other step outputs not defined on prior job's `outputs` object (~12 occurrences) | Referenced step ID/output name mismatch between `setup`/`set-runtime-paths` job outputs and consumers; fix via source workflow, not the lock file |
| actionlint (shellcheck) | many `.lock.yml` files | style (unknown/low) | SC2129: prefer `{ cmd1; cmd2; } >> file` over repeated individual redirects (34 occurrences) | Consolidate redirect blocks in the shared shell script sources that generate these steps |

Because actionlint failed strict-mode validation, the compiler halted before running zizmor, poutine, runner-guard, grant, grype, or syft — those tools produced no output this run.

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

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

Sample actionlint errors (redacted where needed; full report is 810 lines in the run's compiler-security artifact):

```
.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/workflows/uk-ai-advisory.lock.yml:1083:29: error: [expression] property "aw" is not defined in object type {action: string; ...}
.github/workflows/uk-ai-advisory.lock.yml:1401:9: error: [shellcheck] SC2129:style:7:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects
.github/workflows/uk-ai-advisory.lock.yml:1544: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}
✗ actionlint failed
strict mode: actionlint found 152 errors in workflows - workflows must have no actionlint errors in strict mode
```

No `git-status.txt` or `diff-stat.txt` changes were recorded (compiler ran in dry-run/validation mode).

Control plane context

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

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

Contributor guide

Open the contributing guide

Research direction

Start with the `.github/workflows/*.md` sources that generate the listed `.lock.yml` files, especially the sources for `aw-doctor`, `uk-ai-advisory`, and related importing workflows. Use the gh-aw MCP server's `fix` and `compile` tools, then verify strict actionlint and the complete compiler/security scan pass without directly editing generated lock files.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
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.