Below Staff/Lead Benchmark
"We use GitLab CI with a shared .gitlab-ci.yml that most teams copy into their repos. I set up stages for build, test, and deploy. We use protected branches so only senior devs can merge to main. We also added a SAST scan using GitLab's built-in security templates."
"For runners, we have a shared runner pool on our Kubernetes cluster. Most jobs just use that. We try to keep the pipelines consistent but different teams sometimes modify them for their needs."
"We store secrets in GitLab CI variables scoped to the project. Artifacts are stored in GitLab's built-in registry."
Assessor note: Describes execution of tooling, not governance of it. No evidence of architectural thinking — pipeline drift, supply chain risk, audit traceability, ephemeral isolation, or cross-repo enforcement are absent. Competent at the task level; not operating at the Staff/Lead bar.
Train of Thought — Clarifying Questions Asked Before Writing a Line
Q: Net-new platform or retrofitting existing repos?
A: Net-new — lets us enforce standards from day one rather than negotiating exceptions with legacy consumers.
Q: Blast radius of a breaking change in the shared library?
A: Contained — consumers pin a version tag. Only repos that explicitly bump the ref are affected.
Q: Who owns the compliance gate — platform team or repo owners?
A: Platform team, non-negotiable. Repo owners configure identity, not security behavior.
Assignment Decomposition — Top-Down Before Bottom-Up
"Before opening an editor, I break this into four workstreams in priority order:"
-
1.
Governance model — who owns what, what is enforced vs. configurable, where the authority boundary sits
-
2.
Repository structure — pipeline library layout, versioning strategy, consumer interface design
-
3.
Runner infrastructure — isolation model, secret injection mechanism, node topology
-
4.
Audit and compliance — what evidence is produced, where it lives, retention period, and what blocks merge on failure
Prior Art — Applied in a Live Compliance Engagement
"I led this exact pattern at a fintech processing $2B+ in annual transaction volume preparing for PCI-DSS v4.0 audit. The pipeline library was the first thing scoped — everything else followed from the governance model established in week one."
Situation
47 microservice repos, 6 teams, no enforced pipeline standard. Security scans existed but were optional — teams skipped them.
Problem
Audit found 12 repos with no SAST, 3 with hardcoded secrets in CI variables, and zero tamper-evident build provenance.
Action
Designed centralized pipeline library with pinned refs. Terraform enforced branch protection across all 47 repos in one apply. Ephemeral runners replaced long-lived shared pool. Compliance gate blocked merge on any policy failure — no exceptions path.
Result
PCI-DSS audit passed. Zero findings on pipeline controls. Secret exposure surface reduced to Vault-injected runtime values only.
Staff/Lead Benchmark — Met
Top-Down Framing
"Before touching pipeline syntax, I establish the governance model. The goal is a centrally-owned, consumable CI/CD framework that enforces compliance and security by default — while remaining flexible enough for diverse repository types, tech stacks, and release cadences."
"The architecture decision record for this sits at the platform level: one canonical pipeline library repository, versioned and distributed as a component via GitLab's include: project directive. Consuming repos reference a pinned tag — never a branch — so drift is structurally impossible without an explicit version bump."
Shared Pipeline Library Design
# .gitlab-ci.yml — consuming repo (minimal surface area)
include:
- project: 'platform/cicd-pipelines'
# pinned tag — no mutable branch refs
ref: 'v2.4.1'
file:
- '/templates/security.yml'
- '/templates/build.yml'
- '/templates/deploy.yml'
variables:
APP_NAME: "payments-service"
DEPLOY_ENV: "production"
# overridable per repo
ARTIFACT_RETENTION_DAYS: "90"
Consuming repos configure identity, not behavior. Security stages, SAST, DAST, secret detection, and audit artifact generation are non-negotiable — they cannot be overridden or removed by downstream teams.
Branch & Tag Protection Strategy
# Terraform — not UI clicks
resource "gitlab_branch_protection" "main" {
project = each.value.project_id
branch = "main"
# force MR — no direct push, ever
push_access_level = "no one"
merge_access_level = "maintainer"
allow_force_push = false
code_owner_approval_required = true
}
resource "gitlab_tag_protection" "release" {
project = each.value.project_id
tag = "v*"
# only platform team cuts releases
create_access_level = "maintainer"
}
Protection rules applied uniformly via Terraform across all repos. No manual GitLab UI configuration. Drift caught nightly by a compliance pipeline that diffs live state against declared state.
Ephemeral Runners — Zero Persistent Attack Surface
# runners/values.yaml — GitLab Runner on EKS (Helm)
gitlabUrl: https://gitlab.company.com
runnerToken: ${VAULT_INJECTED_TOKEN}
runners:
config: |
[[runners]]
[runners.kubernetes]
namespace = "gitlab-runners"
image = "alpine:3.19"
# rootless builds only
privileged = false
poll_timeout = 300
[runners.kubernetes.pod_annotations]
"vault.hashicorp.com/agent-inject" = "true"
[runners.kubernetes.node_selector]
# dedicated tainted node pool
"role" = "ci-runner"
[runners.kubernetes.pod_security_context]
run_as_non_root = true
run_as_user = 1000
Runners are ephemeral Kubernetes pods — created per job, destroyed on completion. Secrets injected at runtime by Vault agent. Node pool is tainted to prevent non-CI workloads from co-scheduling.
Audit Artifacts & Compliance Evidence
# templates/security.yml — enforced, not optional
stages:
- audit-init
- sast
- secret-detection
- dependency-scan
- compliance-gate
- audit-publish
audit-init:
stage: audit-init
script:
- echo "pipeline_id=${CI_PIPELINE_ID}" >> audit.env
- echo "commit_sha=${CI_COMMIT_SHA}" >> audit.env
- echo "triggered_by=${GITLAB_USER_LOGIN}" >> audit.env
- echo "timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> audit.env
artifacts:
reports:
dotenv: audit.env
compliance-gate:
stage: compliance-gate
script:
- ./scripts/validate-branch-policy.sh
- ./scripts/validate-approvals.sh \
--min-approvers 2 \
--require-codeowner
- ./scripts/sbom-verify.sh --policy strict
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
audit-publish:
stage: audit-publish
script:
# ships to S3, signed with KMS
- ./scripts/publish-audit-bundle.sh
artifacts:
name: "audit-${CI_PIPELINE_ID}"
paths: [audit/]
# SOC 2 retention requirement
expire_in: 2 years
when: always
Every pipeline produces a tamper-evident audit bundle: SBOM, SAST report, secret-detection output, approval evidence, and signed provenance. Retained two years for SOC 2 Type II and PCI-DSS v4.0. Compliance gate blocks merge to main — no bypass path available to downstream teams.
Assessor Note — What This Response Demonstrates
-
✓
Leads with governance intent before implementation detail — architectural thinking, not task execution
-
✓
Supply chain security enforced via pinned tag refs — pipeline drift is structurally impossible
-
✓
Branch and tag protection codified in Terraform — no manual UI configuration, no drift
-
✓
Ephemeral, rootless runners with Vault secret injection — zero persistent attack surface
-
✓
Audit artifacts retained two years with KMS-signed provenance — SOC 2 Type II and PCI-DSS v4.0 ready
-
✓
Compliance gate blocks merge to main — non-bypassable by downstream teams
-
✓
Framework is consumable and flexible across repo types while keeping security surfaces non-negotiable
Your assessment covers 8 domains at this depth — tailored to your actual background.
Apply for Your Assessment — $100