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.05metadata:6 source: https://skillmd.com/skills/hack23/github-actions-workflows7---89# GitHub Actions Workflows Skill1011## Purpose1213Create 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.1415## When to Use1617- ✅ Setting up or modifying CI/CD pipelines for TypeScript MCP projects18- ✅ Automating security scans (CodeQL, dependency review, SLSA, SBOM)19- ✅ Implementing npm package publishing with attestation20- ✅ Configuring test/coverage reporting and quality gates21- ✅ Understanding the 8-stage pipeline architecture2223## Current Pipeline Architecture (12 Workflows)2425| Stage | Workflow | Trigger | Purpose |26|-------|----------|---------|---------|27| 1. Code Validation | `dependency-review.yml`, `labeler.yml` | PR | Dependency audit, auto-labeling |28| 2. Build & Test | `test-and-report.yml` | Push, PR | Lint, build, test, coverage (80%+) |29| 3. Security Analysis | `codeql.yml` | Push, PR, Weekly | CodeQL SAST scanning |30| 4. Integration Testing | `integration-tests.yml` | Push, PR, Daily | E2E tests against EP API |31| 5. Release & Publish | `release.yml` | Tag `v*`, Manual | npm publish with attestation |32| 6. Supply Chain | `sbom-generation.yml`, `slsa-provenance.yml` | Push (main), Tag `v*`, Release publish, Manual | CycloneDX/SPDX SBOM, SLSA Level 3 |33| 7. Continuous Monitoring | `scorecard.yml` | Push, Weekly | OpenSSF Scorecard |34| 8. Repository Management | `setup-labels.yml`, `copilot-setup-steps.yml`, `refresh-stats.yml` | Manual, Push, Schedule | Labels, Copilot environment, Stats refresh |3536## CI/CD Pattern (Node.js 25 + TypeScript 6.0.2)3738```yaml39name: Test and Report40on:41 push:42 branches: [main]43 pull_request:44 branches: [main]4546permissions:47 contents: read48 checks: write4950jobs:51 test:52 runs-on: ubuntu-latest53 steps:54 - uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.155 with:56 egress-policy: audit57 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.258 - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.059 with:60 node-version: '25'61 cache: 'npm'62 - run: npm ci63 - run: npm run lint64 - run: npm run build65 - run: npm run test:coverage66```6768## Security Best Practices (Enforced)6970- ✅ **Pin action versions with SHA hashes** — not tags (supply chain integrity)71- ✅ **Prefer `npm ci` in CI workflows** — reproducible installs from lockfile; some jobs may use `npm install` where needed72- ✅ **Minimize GITHUB_TOKEN permissions** — per-job `permissions` blocks73- ✅ **step-security/harden-runner** — egress auditing on most workflows74- ✅ **Dependency review** — block PRs introducing known vulnerabilities75- ✅ **CodeQL weekly + on-push** — continuous SAST scanning76- ✅ **SLSA Level 3 provenance** — verifiable build attestation77- ✅ **CycloneDX + SPDX SBOM** — software bill of materials on release78- ✅ **OpenSSF Scorecard** — continuous security posture monitoring79- ✅ **Dependabot** — automated dependency updates8081## Test Reporting8283```yaml84- name: Run tests with coverage85 run: npm run test:coverage86- name: Upload coverage87 uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.088 with:89 files: ./coverage/lcov.info90```9192## Release Pipeline with Attestation9394```yaml95release:96 if: startsWith(github.ref, 'refs/tags/v')97 permissions:98 contents: write99 id-token: write100 attestations: write101 steps:102 - run: npm ci && npm run build103 - run: npm publish --provenance --access public104 env:105 NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}106 - uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0107```108109## Quality Gates110111- **Lint:** Zero ESLint errors (TypeScript strict mode)112- **Type check:** `tsc --noEmit` passes113- **Tests:** 80%+ coverage, 1130+ unit tests, 71 E2E test cases across 4 spec files114- **Security:** No critical/high CodeQL alerts115- **Dependencies:** No known high/critical vulnerabilities116- **Unused code:** `npx knip` check passes117118## ISMS Policy References119120**Core policies:**121122- [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 releases123- [Open Source Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Open_Source_Policy.md) — Supply-chain security, dependency pinning, OSSF Scorecard, SLSA provenance124- [Information Security Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Information_Security_Policy.md) — Pipeline as critical security control125126**Supporting policies:**127128- [Access Control Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Access_Control_Policy.md) — Least-privilege `GITHUB_TOKEN`, fine-grained `permissions:` blocks129- [Cryptography Policy](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Cryptography_Policy.md) — Signed commits / keyless Sigstore / cosign130- [Change Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Change_Management.md) — Protected branches, required reviews, status checks131- [Vulnerability Management](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Vulnerability_Management.md) — Dependabot, CodeQL scheduling132- [Incident Response Plan](https://github.com/Hack23/ISMS-PUBLIC/blob/main/Incident_Response_Plan.md) — Workflow-failure / compromise response