GitHub Actions Workflows Skill
Purpose
Create and maintain secure, efficient CI/CD pipelines using GitHub Actions for this TypeScript 6.0.2 / Node.js 25 MCP server project with 12 automated workflows.
When to Use
- ✅ Setting up or modifying CI/CD pipelines for TypeScript MCP projects
- ✅ Automating security scans (CodeQL, dependency review, SLSA, SBOM)
- ✅ Implementing npm package publishing with attestation
- ✅ Configuring test/coverage reporting and quality gates
- ✅ Understanding the 8-stage pipeline architecture
Current Pipeline Architecture (12 Workflows)
| Stage |
Workflow |
Trigger |
Purpose |
| 1. Code Validation |
dependency-review.yml, labeler.yml |
PR |
Dependency audit, auto-labeling |
| 2. Build & Test |
test-and-report.yml |
Push, PR |
Lint, build, test, coverage (80%+) |
| 3. Security Analysis |
codeql.yml |
Push, PR, Weekly |
CodeQL SAST scanning |
| 4. Integration Testing |
integration-tests.yml |
Push, PR, Daily |
E2E tests against EP API |
| 5. Release & Publish |
release.yml |
Tag v*, Manual |
npm publish with attestation |
| 6. Supply Chain |
sbom-generation.yml, slsa-provenance.yml |
Push (main), Tag v*, Release publish, Manual |
CycloneDX/SPDX SBOM, SLSA Level 3 |
| 7. Continuous Monitoring |
scorecard.yml |
Push, Weekly |
OpenSSF Scorecard |
| 8. Repository Management |
setup-labels.yml, copilot-setup-steps.yml, refresh-stats.yml |
Manual, Push, Schedule |
Labels, Copilot environment, Stats refresh |
CI/CD Pattern (Node.js 25 + TypeScript 6.0.2)
name: Test and Report
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
checks: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: '25'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test:coverage
Security Best Practices (Enforced)
- ✅ Pin action versions with SHA hashes — not tags (supply chain integrity)
- ✅ Prefer
npm ci in CI workflows — reproducible installs from lockfile; some jobs may use npm install where needed
- ✅ Minimize GITHUB_TOKEN permissions — per-job
permissions blocks
- ✅ step-security/harden-runner — egress auditing on most workflows
- ✅ Dependency review — block PRs introducing known vulnerabilities
- ✅ CodeQL weekly + on-push — continuous SAST scanning
- ✅ SLSA Level 3 provenance — verifiable build attestation
- ✅ CycloneDX + SPDX SBOM — software bill of materials on release
- ✅ OpenSSF Scorecard — continuous security posture monitoring
- ✅ Dependabot — automated dependency updates
Test Reporting
- name: Run tests with coverage
run: npm run test:coverage
- name: Upload coverage
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: ./coverage/lcov.info
Release Pipeline with Attestation
release:
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
id-token: write
attestations: write
steps:
- run: npm ci && npm run build
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
Quality Gates
- Lint: Zero ESLint errors (TypeScript strict mode)
- Type check:
tsc --noEmit passes
- Tests: 80%+ coverage, 1130+ unit tests, 71 E2E test cases across 4 spec files
- Security: No critical/high CodeQL alerts
- Dependencies: No known high/critical vulnerabilities
- Unused code:
npx knip check passes
ISMS Policy References
Core policies:
Supporting policies:
1---2name: github-actions-workflows3description: Secure CI/CD workflows with GitHub Actions for TypeScript 6.0.2 / Node.js 25 MCP server — 12 pipelines, SLSA Level 3, SBOM, OpenSSF Scorecard4license: Apache-2.05---67# GitHub Actions Workflows Skill89## Purpose1011Create and maintain secure, efficient CI/CD pipelines using GitHub Actions for this TypeScript 6.0.2 / Node.js 25 MCP server project with 12 automated workflows.1213## When to Use1415- ✅ Setting up or modifying CI/CD pipelines for TypeScript MCP projects16- ✅ Automating security scans (CodeQL, dependency review, SLSA, SBOM)17- ✅ Implementing npm package publishing with attestation18- ✅ Configuring test/coverage reporting and quality gates19- ✅ Understanding the 8-stage pipeline architecture2021## Current Pipeline Architecture (12 Workflows)2223| Stage | Workflow | Trigger | Purpose |24|-------|----------|---------|---------|25| 1. Code Validation | `dependency-review.yml`, `labeler.yml` | PR | Dependency audit, auto-labeling |26| 2. Build & Test | `test-and-report.yml` | Push, PR | Lint, build, test, coverage (80%+) |27| 3. Security Analysis | `codeql.yml` | Push, PR, Weekly | CodeQL SAST scanning |28| 4. Integration Testing | `integration-tests.yml` | Push, PR, Daily | E2E tests against EP API |29| 5. Release & Publish | `release.yml` | Tag `v*`, Manual | npm publish with attestation |30| 6. Supply Chain | `sbom-generation.yml`, `slsa-provenance.yml` | Push (main), Tag `v*`, Release publish, Manual | CycloneDX/SPDX SBOM, SLSA Level 3 |31| 7. Continuous Monitoring | `scorecard.yml` | Push, Weekly | OpenSSF Scorecard |32| 8. Repository Management | `setup-labels.yml`, `copilot-setup-steps.yml`, `refresh-stats.yml` | Manual, Push, Schedule | Labels, Copilot environment, Stats refresh |3334## CI/CD Pattern (Node.js 25 + TypeScript 6.0.2)3536```yaml37name: Test and Report38on:39 push:40 branches: [main]41 pull_request:42 branches: [main]4344permissions:45 contents: read46 checks: write4748jobs:49 test:50 runs-on: ubuntu-latest51 steps:52 - uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.153 with:54 egress-policy: audit55 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.256 - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.057 with:58 node-version: '25'59 cache: 'npm'60 - run: npm ci61 - run: npm run lint62 - run: npm run build63 - run: npm run test:coverage64```6566## Security Best Practices (Enforced)6768- ✅ **Pin action versions with SHA hashes** — not tags (supply chain integrity)69- ✅ **Prefer `npm ci` in CI workflows** — reproducible installs from lockfile; some jobs may use `npm install` where needed70- ✅ **Minimize GITHUB_TOKEN permissions** — per-job `permissions` blocks71- ✅ **step-security/harden-runner** — egress auditing on most workflows72- ✅ **Dependency review** — block PRs introducing known vulnerabilities73- ✅ **CodeQL weekly + on-push** — continuous SAST scanning74- ✅ **SLSA Level 3 provenance** — verifiable build attestation75- ✅ **CycloneDX + SPDX SBOM** — software bill of materials on release76- ✅ **OpenSSF Scorecard** — continuous security posture monitoring77- ✅ **Dependabot** — automated dependency updates7879## Test Reporting8081```yaml82- name: Run tests with coverage83 run: npm run test:coverage84- name: Upload coverage85 uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.086 with:87 files: ./coverage/lcov.info88```8990## Release Pipeline with Attestation9192```yaml93release:94 if: startsWith(github.ref, 'refs/tags/v')95 permissions:96 contents: write97 id-token: write98 attestations: write99 steps:100 - run: npm ci && npm run build101 - run: npm publish --provenance --access public102 env:103 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}104 - uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0105```106107## Quality Gates108109- **Lint:** Zero ESLint errors (TypeScript strict mode)110- **Type check:** `tsc --noEmit` passes111- **Tests:** 80%+ coverage, 1130+ unit tests, 71 E2E test cases across 4 spec files112- **Security:** No critical/high CodeQL alerts113- **Dependencies:** No known high/critical vulnerabilities114- **Unused code:** `npx knip` check passes115116## ISMS Policy References117118**Core policies:**119120- [Secure Development Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Secure_Development_Policy.md) — CI/CD security requirements, CodeQL, SAST/DAST, SBOM, SLSA Level 3, signed releases121- [Open Source Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md) — Supply-chain security, dependency pinning, OSSF Scorecard, SLSA provenance122- [Information Security Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Information_Security_Policy.md) — Pipeline as critical security control123124**Supporting policies:**125126- [Access Control Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Access_Control_Policy.md) — Least-privilege `GITHUB_TOKEN`, fine-grained `permissions:` blocks127- [Cryptography Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Cryptography_Policy.md) — Signed commits / keyless Sigstore / cosign128- [Change Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Change_Management.md) — Protected branches, required reviews, status checks129- [Vulnerability Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Vulnerability_Management.md) — Dependabot, CodeQL scheduling130- [Incident Response Plan](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Incident_Response_Plan.md) — Workflow-failure / compromise response