skills/gha-validator/SKILL.md
Analyze GitHub Actions workflow files for security vulnerabilities, semantic errors, best-practice violations, schema issues, and style problems using 46 rules across 6 categories (schema, security, semantic, best-practice, style, actionlint). Scores workflows on a 0-100 scale with letter grades (A+ through F). Generates detailed fix recommendations with before/after YAML examples. Use this skill PROACTIVELY whenever a user shares a GitHub Actions workflow for review, pastes CI/CD YAML, asks about GitHub Actions best practices or security hardening, wants to improve their workflow security posture, mentions .github/workflows, or discusses CI/CD pipeline configuration — even if they don't explicitly say "validate" or "analyze".
npx skillsauth add patrykquantumnomad/patrykquantumnomad gha-validatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a GitHub Actions workflow analysis engine. When a user shares a workflow file or asks you to review one, apply the complete rule set below to identify violations, compute a quality score, and present actionable fix recommendations.
***REDACTED*** in all output, including before/after examples, code blocks, and inline references. Never echo a detected secret verbatim.| Category | Weight | |---------------|--------| | Security | 35% | | Semantic | 20% | | Best Practice | 20% | | Schema | 15% | | Style | 10% |
Note: The 'actionlint' category (GA-L017, GA-L018) is excluded from scoring -- these rules only fire via CLI, not browser WASM.
| Severity | Base Deduction | |----------|---------------| | Error | 15 points | | Warning | 8 points | | Info | 3 points |
Diminishing returns: each additional violation in a category deducts less. Formula: deduction = base / (1 + 0.3 * prior_count).
| Score | Grade | |--------|-------| | 97-100 | A+ | | 93-96 | A | | 90-92 | A- | | 87-89 | B+ | | 83-86 | B | | 80-82 | B- | | 77-79 | C+ | | 73-76 | C | | 70-72 | C- | | 67-69 | D+ | | 63-66 | D | | 60-62 | D- | | 0-59 | F |
run-on instead of runs-on) or properties at the wrong nesting level cause silent failures.run-on: ubuntu-latestruns-on: ubuntu-lateston, jobs, runs-on, steps)jobs:
build:
steps:
- run: echo hello
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo hello
pushs instead of push)[a-zA-Z0-9_-])@v4, @v4.0.1) instead of a full 40-character commit SHAuses: actions/checkout@v4uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1uses: my-org/my-action@mainuses: my-org/my-action@a1b2c3d4e5f6 # v1.0.0permissions: write-allpermissions: write-allpermissions:
contents: read
pull-requests: write
permissions: blockrun: block directly interpolates user-controlled GitHub context (e.g., ${{ github.event.issue.title }}, ${{ github.event.pull_request.body }})- run: echo "${{ github.event.issue.title }}"
- run: echo "$ISSUE_TITLE"
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
pull_request_target trigger without branch or path restrictionspull_request_target runs in the base repo context with write token access. Without restrictions, any fork can trigger it with untrusted code.pull_request${{ secrets.* }} referencesactions/ or github/ organization) is not pinned to a commit SHAcontents:write + actions:write (self-modifying CI), packages:write + contents:write (supply chain), id-token:write + any other write (OIDC impersonation)runs-on: self-hosted or a custom runner labelThese rules are detected by the actionlint WASM engine for deep semantic analysis.
${{ }} references unknown context, function, or propertyneeds: references a nonexistent job IDneeds: arrayon: references unknown event type or uses invalid sub-keyuses: value doesn't match expected format (owner/repo@ref, docker://image, ./local-path)runs-on: specifies unrecognized runner labelshell: value not recognized (valid: bash, pwsh, python, sh, cmd, powershell)if: condition uses unnecessary ${{ }} wrapper (GitHub auto-evaluates if conditions)timeout-minutestimeout-minutes to every jobjobs:
build:
runs-on: ubuntu-latest
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
concurrency: blockcancel-in-progress: trueconcurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
run: step has no name: fielduses: are self-documenting and excluded from this check.name: to run stepsname:env: block at workflow, job, or step level is emptyif: conditionalrun: step uses curl/wget/gh api without continue-on-error: truecontinue-on-error: true for non-critical network operationsuses: values (plain, single-quoted, double-quoted)uses: referencesname: is longer than 80 charactersname: fieldname: fieldset-output or save-state commandsGITHUB_OUTPUT and GITHUB_STATE environment filesrun: block contains potential error per shellcheck analysisrun: with shell: python contains potential error per pyflakesIMPORTANT — Secret Redaction: All output (analysis results, before/after examples, fix prompts, corrected workflow files) MUST redact any detected hardcoded secrets. Replace the secret value with ***REDACTED*** and flag it as a GA-C007 violation. Never reproduce a real credential in any output.
When presenting analysis results, use this structure:
## GitHub Actions Workflow Analysis Results
**Score:** {score}/100 (Grade: {grade})
### Category Breakdown
| Category | Score | Weight |
|---------------|---------|--------|
| Security | {n}/100 | 35% |
| Semantic | {n}/100 | 20% |
| Best Practice | {n}/100 | 20% |
| Schema | {n}/100 | 15% |
| Style | {n}/100 | 10% |
### Issues Found ({total} issues: {errors} errors, {warnings} warnings, {info} info)
#### Errors
- **Line {n} [{rule_id}]: {title}** ({category})
{explanation}
**Fix:** {fix_description}
#### Warnings
...
#### Info
...
If the workflow has zero violations, congratulate the user and note the perfect score.
When the user asks you to fix the workflow (or you offer to after analysis), use this approach:
You are a senior DevOps engineer and GitHub Actions security specialist. Apply the identified issues precisely. Every flagged issue must be resolved while preserving the original workflow's intended functionality. Prioritize production-readiness, security hardening, and CI/CD best practices.
Apply fixes in priority order:
When multiple issues affect the same job or step, combine all fixes into a single corrected block.
Preserve original functionality:
Follow GitHub Actions best practices when restructuring:
Output:
yaml code block with no omissions or placeholdersConstraints:
${{ secrets.SECRET_NAME }} references and redact the original value from all output as ***REDACTED***development
Analyze Kubernetes manifests for security vulnerabilities, reliability issues, best-practice violations, schema errors, cross-resource reference problems, and RBAC misconfigurations using 67 rules across 5 categories (security, reliability, best-practice, schema, cross-resource/RBAC). Scores manifests on a 0-100 scale with letter grades (A+ through F) and PSS Baseline/Restricted compliance summary. Generates detailed fix recommendations with before/after YAML examples. Use this skill PROACTIVELY whenever a user shares a Kubernetes manifest for review, pastes K8s YAML with apiVersion/kind fields, asks about K8s best practices, pod security standards, CIS Benchmarks, RBAC security, or wants to improve their cluster security posture — even if they don't explicitly say "validate" or "analyze". Trigger on Deployments, StatefulSets, DaemonSets, Services, Ingress, RBAC resources, and any multi-document K8s YAML.
development
Analyze Dockerfiles for security vulnerabilities, efficiency issues, and best-practice violations using 46 rules across 5 categories (security, efficiency, maintainability, reliability, best-practice). Scores Dockerfiles on a 0-100 scale with letter grades (A+ through F). Generates detailed fix recommendations with before/after code examples. Use this skill PROACTIVELY whenever a user shares a Dockerfile for review, pastes Dockerfile content, asks about Dockerfile best practices or security hardening, wants to improve their container image security posture, mentions Dockerfile or Docker image builds, or asks about multi-stage builds or image optimization — even if they don't explicitly say "validate" or "analyze".
development
Analyze Docker Compose files for security vulnerabilities, semantic errors, best-practice violations, schema issues, and style problems using 52 rules across 5 categories (security, semantic, schema, best-practice, style). Scores Compose files on a 0-100 scale with letter grades (A+ through F). Generates detailed fix recommendations with before/after YAML examples. Use this skill PROACTIVELY whenever a user shares a docker-compose.yml or compose.yaml for review, pastes Docker Compose YAML, asks about Docker Compose best practices or security hardening, wants to improve their container orchestration security posture, mentions docker-compose or compose files, or asks about multi-container Docker setups — even if they don't explicitly say "validate" or "analyze".
testing
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, passive voice, negative parallelisms, and filler phrases.