Security Embedded, Not Bolted On: Golden Paths
01
What problem does embedded security solve that bolt-on security cannot?
The traditional security model in software organizations is adversarial by design. Development teams build features. Security teams review them. The review happens late in the pipeline, often after code is merged and sometimes after it is deployed. When security finds issues, the fix requires context-switching back to code that engineers finished weeks ago. The result is predictable: security becomes a bottleneck, developers learn to route around it, and vulnerabilities reach production through the gaps.
I encountered this pattern at a SaaS company with 67 engineers in 2024. Their security review process added an average of 6.3 days to the deployment cycle. Engineers submitted security review requests via Jira tickets. The security team of 3 analysts processed a backlog of 40 to 60 tickets at any given time. Priority tickets were reviewed in 2 days. Non-priority tickets waited 9 days. The rational response from engineering teams was to mark everything as priority, which defeated the triage system entirely.
The underlying problem was not a shortage of security analysts. It was an architectural problem: security was a gate, not a guardrail. Gates create queues. Guardrails create boundaries that allow autonomous movement within safe parameters. The project was to replace the gate with guardrails.
02
How were the golden path pipelines designed?
The golden path concept comes from Spotify’s engineering culture: a pre-paved, well-maintained, default path that makes the right thing the easy thing. Applied to security, a golden path CI/CD pipeline embeds security controls directly into the build and deployment process, so that secure deployment is the default and insecure deployment requires deliberate effort to achieve.
The pipeline had 5 security stages, each automated and non-blocking unless a critical threshold was exceeded:
Stage 1: Dependency scanning. Trivy scanned container images and dependency manifests on every commit. Known vulnerabilities were classified by CVSS score. Critical (CVSS 9.0 or higher) blocked the build. High (CVSS 7.0 to 8.9) generated a warning and a Slack notification to the security channel. Medium and below were logged for weekly review. This stage added 45 seconds to the build.
Stage 2: Static analysis. Semgrep ran custom rules targeting the top 10 vulnerability patterns specific to the codebase (SQL injection, XSS, insecure deserialization, hardcoded secrets, and 6 others identified from historical incident data). Rules were written by the security team and version-controlled alongside the pipeline configuration. False positive rate after 3 months of tuning was 8%. This stage added 90 seconds to the build.
Stage 3: Infrastructure policy. Open Policy Agent (OPA) evaluated Terraform plans and Kubernetes manifests against 23 security policies: no public S3 buckets, no containers running as root, no services exposed without authentication, minimum TLS version 1.2, and 19 others. Policy violations blocked deployment with a clear error message linking to the specific policy documentation and remediation guidance. This stage added 30 seconds.
Stage 4: Secret detection. GitLeaks scanned every commit for patterns matching API keys, passwords, private keys, and connection strings. Any detection blocked the commit from being pushed. The pre-commit hook ran locally in under 5 seconds, catching secrets before they entered version control.
Stage 5: Container image signing. Cosign signed every container image that passed all previous stages. The Kubernetes admission controller (Kyverno) rejected any image without a valid signature. This ensured that only images from the golden path pipeline could run in production, regardless of how they were deployed.
03
What were the measurable outcomes?
12 → 1
Vulnerabilities Escaping to Production Per Quarter
6.3 → 0
Days Waiting for Security Review
28%
Increase in Deployment Frequency
2.5 min
Total Security Stage Duration in Pipeline
8%
False Positive Rate After Tuning
23
Automated Policy Checks Per Deployment
The security team’s role shifted from reviewing deployments to writing policies, tuning detection rules, and consulting on architectural decisions. Their ticket backlog dropped from 40 to 60 items to 3 to 5 items (complex architectural reviews that genuinely required human judgment). Developer satisfaction with the security process, measured by quarterly survey, rose from 3.1 to 7.8 on a 10-point scale. The security team’s satisfaction also improved: they were doing analytical work instead of repetitive review.
04
What would I change in hindsight?
I would have involved the security team in pipeline design from day one. In the initial implementation, I designed the pipeline stages and presented them to the security team for approval. This created an “us building for them” dynamic that generated resistance. When I brought the security team into the design process for Stage 3 (infrastructure policy), their engagement and ownership increased markedly. The policies they wrote were more accurate, better documented, and more readily accepted by engineering teams because the security team could explain the reasoning directly.
I would also have invested earlier in a developer feedback mechanism for false positives. The initial 8% false positive rate was acceptable in aggregate but frustrating for the teams that hit false positives repeatedly on the same code pattern. A “report false positive” button in the pipeline output, linked to an automated Semgrep rule exception workflow, would have reduced frustration and improved rule quality faster. I implemented this in month 4, but it should have been in the initial release.
The golden path works because it aligns incentives. Engineers want to deploy quickly. Security teams want to deploy safely. When the fast path and the safe path are the same path, the conflict dissolves. The engineering effort to build the pipeline was approximately 320 hours across 2 months. The annual cost savings from eliminating the manual review process was approximately 2,400 hours of security analyst time and 4,100 hours of developer wait time. The return was realized within the first quarter.