A DevOps engineer is configuring a self-hosted runner for a high-security pipeline. The security requirement states that each job must run on a clean, freshly provisioned instance, and the runner registration token used to register each instance must expire after a single use. Which two features should the engineer combine to satisfy these requirements? (Select TWO)
- A. Register the runner with the
--ephemeralflag so it de-registers after completing one job✓ Correct - B. Assign the runner to an enterprise runner group with 'Allow public repositories' disabled
- C. Use the Actions REST API to generate a just-in-time (JIT) runner configuration token that is valid for a single registration✓ Correct
- D. Store the runner registration token as an encrypted organization secret and rotate it weekly
- E. Configure the runner as a persistent runner and use a cron job to restart the runner service after each job
- F. Enable runner autoscaling using a webhook-driven scale-set and set
minRunnersto 0
Explanation
Options A and C are correct together. The --ephemeral flag instructs the runner application to de-register itself after processing a single job, guaranteeing a clean instance per job. Just-in-time (JIT) tokens (generated via the REST API's JIT registration endpoint) are single-use registration credentials that expire immediately after use, satisfying the requirement that tokens cannot be reused to register additional runners. Option E is wrong because restarting a persistent runner does not wipe the environment; it reuses the same OS and any leftover artifacts from previous jobs. Option B is wrong because disabling public repo access is a security policy for repo visibility, not an isolation mechanism for compute. Option F is wrong because autoscaling with minRunners=0 is a capacity management technique and does not itself enforce single-use tokens. Option D is wrong because rotating a token weekly still allows the same token to register multiple runners during that window and does not satisfy the single-use requirement.