GOOD: Locked-Down CI Baseline
GitHub Docs - security hardening and least privilege
name: ci
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
pull-requests: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- run: npm ci
- run: npm test Use explicit top-level permissions instead of inheriting broad defaults. Start with read-only and grant additional scopes only to the single workflow that needs them.