Interview Prep/CI/CD/Jenkins Shared Libraries, Credentials and Security

The security team asks you to prove that production builds come only from the main branch of approved repos.

AdvancedScenarioJenkins Shared Libraries, Credentials and Security
Answer

Situation read → Need verifiable build provenance.

What I'd do →

  1. Restrict prod-deploy credentials to a folder and job that only builds main of approved repos.
  2. Generate SLSA-style provenance recording repo, commit, builder and parameters, and sign it (cosign attest).
  3. Verify the attestation at deploy time or in admission control (Kyverno verifyImages, Sigstore policy-controller).

Why → Policy plus signed evidence is stronger than process rules.

Interview tip → Name SLSA and cosign; it shows you know the supply-chain vocabulary.

All CI/CD questions

More on Jenkins Shared Libraries, Credentials and Security