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 a sizeable engineering organization. Their security review process added a long delay to the deployment cycle. Engineers submitted security review requests via Jira tickets. The small security team processed a standing backlog of tickets at any given time. Priority tickets were reviewed promptly. Non-priority tickets waited much longer. 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 a series of 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 severity (the top CVSS band) blocked the build. High severity (the next CVSS band down) generated a warning and a Slack notification to the security channel. Medium and below were logged for weekly review. This stage added little time to the build.
Stage 2: Static analysis. Semgrep ran custom rules targeting the most common vulnerability patterns specific to the codebase (SQL injection, XSS, insecure deserialization, hardcoded secrets, and others identified from historical incident data). Rules were written by the security team and version-controlled alongside the pipeline configuration. False positive rate after a period of tuning was low. This stage added a modest amount of time to the build.
Stage 3: Infrastructure policy. Open Policy Agent (OPA) evaluated Terraform plans and Kubernetes manifests against a set of security policies: no public S3 buckets, no containers running as root, no services exposed without authentication, a modern minimum TLS version, and others. Policy violations blocked deployment with a clear error message linking to the specific policy documentation and remediation guidance. This stage added little time.
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 moments, 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?
The security team’s role shifted from reviewing deployments to writing policies, tuning detection rules, and consulting on architectural decisions. Their ticket backlog dropped to only the complex architectural reviews that genuinely required human judgment. Developer satisfaction with the security process, measured by quarterly survey, rose sharply. 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 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 later, 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 a one-time investment. The annual cost savings from eliminating the manual review process came from security analyst time and developer wait time. The return was realized within the first quarter.