Skip to main content
InterviewHubPRO
Section Overview
Q18

Question 18 of 50

Part 2: Advanced Workflows, Security & Containerization (Mid-Level)

36%
CI/CD & GitHub Actions (50 Qs)•Part 2: Advanced Workflows, Security & Containerization (Mid-Level)

How do you protect CI pipelines against Supply-Chain Attacks?

mid LevelPipesSecurity & AuthDocker & Containers

In Simple Words: Third-party actions can be compromised or hijacked (e.g. tag mutation of @v1).

Security Hardening Measures:

  1. Commit SHA Pinning: Reference actions by immutable Git commit SHA instead of mutable tags (uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1).
  2. Dependabot for Actions: Automatically create PRs to update pinned SHAs when upstream releases new versions.
  3. Audit Code with StepSecurity: Restrict outbound network egress on runners to prevent compromised actions from exfiltrating environment variables.
  4. CodeQL & Static Security Analysis: Automated SAST scans to catch insecure code patterns before merging.