Skip to content
$ lynuxpro

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 1–10 of 10 questions

Learn GitHub & GitHub Actions →
1.Reusable workflow or composite action?Senior

A reusable workflow shares whole jobs and is called at job level. A composite action shares a few steps and is used like a single step inside a job.

2.Why use OIDC to deploy to a cloud?Senior

The job exchanges a short-lived signed token for temporary cloud credentials, so no long-lived key is stored in GitHub. A trust policy limits it to a specific repo and branch.

3.How do you secure a workflow?Senior

Set minimal permissions, pin third-party actions to a commit SHA, avoid untrusted input in run steps, use environments with approvals, prefer OIDC to stored keys, and enable Dependabot, CodeQL and secret scanning.

4.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.

5.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.

6.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.

7.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.

8.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.

9.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.

10.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.