INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 16–23 of 23 questions
Learn GitHub & GitHub Actions →16.Why be careful with pull_request_target?Senior
It runs with access to secrets in the base repository. If it also checks out and runs code from a fork, an attacker can steal secrets. Use pull_request for untrusted code.
17.What are the risks of self-hosted runners?Senior
Jobs run on your own network, so malicious code from a pull request could reach internal systems. Use them for private repos, make them ephemeral, and give them minimal access.
18.How would you debug a failing workflow?Senior
Check it started, then read the first error in the failing step with gh run view --log-failed, enable debug logging if needed, check permissions and secrets, change one thing at a time and re-run only the failed jobs.
19.How do you manage GitHub for a large company?Senior
Use enterprise and organization structure with teams, SSO and SCIM, org-wide rulesets, an allowed-actions policy, runner groups and spending limits, audit log streaming and artifact attestations.
20.What is an artifact attestation?Senior
A signed statement of where, when and how an artifact was built. Consumers can verify provenance, which supports supply chain security.
21.What is a merge conflict and how do you fix it?Mid
It happens when two branches changed the same lines, so Git cannot choose. Git marks the lines in the file. You keep the right version, remove the marker lines, then add and commit.
22.Why does an OIDC trust policy fail when the job uses an environment?Senior
The token's sub claim changes. A job on a branch has repo:ORG/REPO:ref:refs/heads/main. A job that uses an environment has repo:ORG/REPO:environment:NAME. The trust policy must match the form your job really produces.
23.How do you stop two deployments from running at the same time?Senior
Use a concurrency group, for example group: deploy-production. A second run waits, or cancels the first if you set cancel-in-progress. For deployments, waiting is usually safer than cancelling.