Quiz - The CI gate on GitHub Actions
You’re authoring a deploy job that reads ${{ secrets.VERCEL_TOKEN }} to ship production. For the two actions it pulls in — actions/checkout and a third-party deploy-cli action — which pinning is the senior default?
@v6, @v3) — major tags are stable references that GitHub won’t repoint.checkout by SHA but the deploy-cli by @main, so it always ships the newest deploy logic.tj-actions (CVE-2025-30066) attack rewrote every version tag, so a major-tag pin was hit just as hard as @main. Any action in a job that holds a secret or elevated permissions gets a 40-character SHA, the only reference an attacker can’t move. Tag-pinning is fine only for trusted utility actions in jobs with nothing to steal.You copy a working ci.yml from a 2024 project. It pins actions/setup-node@v6 with cache: pnpm, but a colleague’s near-identical file omits the cache: line. On the v6 runner, what’s the practical difference?
setup-node auto-caches pnpm whether or not cache: is set; the line is documentation.cache: pnpm silently gets zero caching and pays the cold-install cost on every run, with no error to warn you.cache: fails at the install step because setup-node can’t locate the pnpm store.setup-node@v6, automatic dependency caching auto-enables for npm only; pnpm and yarn must opt in with cache:. Omitting it doesn’t error — it quietly regresses to no caching, the kind of silent behavior change a workflow copied from an older (v5, which auto-cached) example introduces the moment it runs on v6.The pnpm build job passes on every developer’s laptop but fails in CI with a missing-environment-variable error. What’s the senior’s first response, before adding anything to the workflow?
SKIP_ENV_VALIDATION=true to the build step so the env validator stops failing.env: block so the build always has what it might need.next build never needs DATABASE_URL at all. Only when a build legitimately needs a value do you expose it via env:, scoped to the minimum — and SKIP_ENV_VALIDATION is a narrow build-only escape hatch, never the default reach.A test in the merge gate is flaky — it passes and fails on identical code. Which response is the senior reflex?
A moderate CVE lands in a transitive, build-only dependency with no exploitable path to production. Your CI runs pnpm audit. Where does this check belong, and why?
high and critical; --audit-level=high makes audit a blocking check by definition.--audit-level=high only tunes which findings turn the job red; it doesn’t put the job in the required-checks list.Your team wants to raise pnpm’s supply-chain floor — refuse to install package versions published in the last 72 hours. Which change actually takes effect on pnpm 11?
minimumReleaseAge=4320 to .npmrc.minimumReleaseAge: 4320 in pnpm-workspace.yaml..npmrc is auth and registry config only; supply-chain settings moved to pnpm-workspace.yaml, and putting them in .npmrc fails silently with no warning. pnpm 11 does default minimumReleaseAge on — but to 1440 (24 hours), not 72; raising it to 4320 is a deliberate edit in the right file.You configure Dependabot to auto-merge its PRs once the four-job gate passes. The senior boundary is to scope auto-merge to patch updates only. What makes that safe even though a patch could hide a behavior change?
Quiz complete
Score by topic