Install
openclaw skills install github-actions-linterLint and validate GitHub Actions workflow YAML files for common mistakes, security issues, deprecated actions, and best practices. Use when asked to lint, va...
openclaw skills install github-actions-linterLint GitHub Actions workflow files for syntax errors, security issues, deprecated actions, and best practices violations.
All commands use the bundled Python script at scripts/gha_linter.py.
python3 scripts/gha_linter.py lint <file-or-directory> [--strict] [--format text|json|markdown]
Runs all lint rules against one or more workflow files. If given a directory, scans for *.yml and *.yaml files recursively.
Flags:
--strict — exit code 1 on any warning (not just errors)--format — output format: text (default), json, markdownpython3 scripts/gha_linter.py security <file> [--format text|json|markdown]
Focused security audit: shell injection via ${{ }} in run:, hardcoded secrets, overly permissive permissions, untrusted event contexts in expressions.
python3 scripts/gha_linter.py deprecated <file> [--format text|json|markdown]
Detect outdated action versions (e.g., actions/checkout@v2, actions/setup-node@v3 when v4 exists) and suggest upgrades.
python3 scripts/gha_linter.py validate <file> [--format text|json|markdown]
Structural validation only: required keys (on, jobs), valid trigger events, valid runs-on labels, job dependency graph (circular deps, missing refs).
on triggerjobs sectionruns-onstepsneeds${{ }} expression in run: (potential injection)permissions: write-all or no permissions blockgithub.event.issue.title, github.event.pull_request.body, etc.)pull_request_target with checkout of PR head (known attack vector)run: instead of via env:::set-output:: command::save-state:: commandtimeout-minutes (default 6h is dangerous)name (harder to debug)@main or @master (unstable)concurrency (can waste resources)-latestrun: block exceeds 50 lines (should be a script)id in steps within same jobcontinue-on-error: true without explanation commentworkflow.yml:12:3 error [shell-injection] Expression ${{ github.event.issue.title }} in run: is vulnerable to injection
workflow.yml:25:5 warning [missing-timeout] Job 'build' has no timeout-minutes (default: 360 min)
workflow.yml:31:7 warning [missing-name] Step at index 2 has no name
3 issues (1 error, 2 warnings)
{
"file": "workflow.yml",
"issues": [...],
"summary": {"errors": 1, "warnings": 2, "info": 0}
}
Summary table with severity, rule, location, and message.
# .github/workflows/lint-actions.yml
name: Lint Workflows
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: python3 scripts/gha_linter.py lint .github/workflows/ --strict
Exit codes: 0 = clean, 1 = errors found (or warnings in --strict mode).