Opsera Launches BrickForge, a Purpose-Built AI Operational Command Center for Enterprise Data Teams

Available on Databricks Marketplace

Evaluate your code base for modernization.

Shift left security pipeline from commit to deployment illustration

TL;DR

  • Release-gate security reviews find vulnerabilities after they’ve merged and spread across services. Shift left security moves secret scanning, SAST, dependency scanning, and container/IaC scanning into the PR pipeline, each scan runs before code advances to the next stage.
  • Secret scanners block credentials before they reach CI logs. SAST flags injection risks and unsafe functions at the line level. Dependency scanners check package manifests against CVE databases before the build runs. Container and IaC scanners catch misconfigured images and overpermissive cloud configs before terraform apply.
  • Programs break down via alert fatigue (no severity distinction), tool sprawl (five dashboards per PR), and slow scans (results after the developer has moved on). Fix: critical findings fail the build, high require review, medium go to backlog, and findings are annotated directly on the PR diff line.
  • Opsera’s Security Scan Agent runs all four scan types with a single command and produces a single ranked report. Meshtastic firmware scan (1,861 files): 22 secrets (all test vectors), 1 critical XXE fixed by swapping xml.etree.ElementTree for defusedxml, 4 medium strcpy() buffer overflows, 0 dependency CVEs.

A few years back, security was treated as a checkpoint before a release was shipped. A developer writes code, opens a pull request, the code is reviewed and merged, CI runs tests, and then, before the release candidate ships, the security team conducts a review.

The problem is timing. By the time a security review runs, the commit introducing a vulnerable dependency or hardcoded cloud credential has already been merged, integrated with other changes, and potentially replicated across staging environments. Fixing the vulnerability now means checking out an earlier state of the codebase, making the change, pushing a new branch, getting a second code review, and re-running the full CI pipeline, sometimes across multiple services that already pulled the bad dependency.

In pipelines that ship several times a day, this gap widens further. A developer pushes a change at 9 AM. The security review is scheduled for Friday. By the time the scan runs, 40 other commits have been merged on top, three services have pulled the vulnerable package, and the developer who introduced the change has moved on to a different feature. The fix now requires understanding a code change made days earlier, identifying every downstream service that consumed the vulnerable version, and coordinating a patch across multiple deployment environments.

Shift-left security addresses this by moving scans to the point where code is written—not where it ships.

What Is Shift Left Security?

The term “shift left” refers to the standard left-to-right visualization of a software delivery pipeline. For example, identifying a vulnerable open-source package during development is a shift-left practice, whereas discovering it during a release audit is not.

Traditional pipeline showing security scanning at release stage

In a traditional workflow, security sits near the right end. Code moves through development, build, and test before a security team examines it. Shift left security moves those checks leftward. 

For example, instead of discovering a vulnerable dependency during a pre-release security review, a dependency scanner can flag the issue as soon as the package is introduced into the codebase.

Shift left security scans running at commit and PR stage in SDLC

Instead of waiting for a security review during the final stages of the CI/CD pipeline, security scans run automatically at commit and PR time. When a developer opens a pull request, the pipeline runs secret detection, static analysis, dependency scanning, and container checks before the code is approved for merge. This reduces the overload on the outer loop of the SDLC as security is autonomously handled earlier in the development cycle with developers in the loop.

Here is a concrete example of what that timing difference produces. A developer pushes a change that includes an AWS access key in a config file:

AWS_ACCESS_KEY = "AKIAxxxxxxxxxxxxx"AWS_SECRET_KEY = "xxxxxxxxxxxxxxxx"

In a release-gate model, the credential sits in the repository until the next scheduled scan. If the repository is accessible to more than one person or the secret is exported to a build log, it may be harvested before the scan runs.

In a commit-time model, a secret scanner running as a pre-commit hook or PR check detects the exposed credential immediately. The CI/CD pipeline fails the security check, preventing the pull request from being merged until the issue is addressed. 

The developer removes the secret from the code, rotates the compromised credential, and pushes an updated commit. As a result, the secret never reaches shared branches, downstream environments, or production systems. That is the core mechanic: the earlier a scan runs, the smaller the blast radius when a finding comes back. The most common question teams ask at this point is: what does “earlier” actually mean in terms of tooling? The answer is four specific scan types, each targeting a different layer of the codebase.

What Shift Left Security Scans at Every Commit

Shift left security is not a single tool. It integrates four scan types into a single pipeline, each catching vulnerabilities introduced at a different layer.

1. Secret Scanning: Catching Credentials Before They Enter Version Control

Developers work daily with API keys, cloud access credentials, service tokens, database connection strings, and private certificates. Accidentally committing one of these values is common, especially when config files are copied from local environments, or when a developer hardcodes a value to debug a failing request and forgets to remove it before committing.

A secret scanner scans commits, config files, scripts, and .env files for patterns that match known credential formats. Common detections include:

  • AWS access keys (AKIA…)
  • GitHub personal access tokens (ghp_…)
  • GCP service account credentials
  • Database connection strings containing passwords
  • Private keys in PEM format

Once a secret enters version control, it can spread to CI logs, build artifacts, Docker image layers, and repository forks. Catching it at the commit stage,before it reaches the main branch, means the required remediation is: remove the value from the commit, rotate the credential. Catching it after it has been merged, cloned, and exported to build artifacts requires auditing every system that may have received the value, which in a microservices environment can mean checking a dozen services, their logs, and their deployment artifacts.

2. SAST: Finding Insecure Code Patterns Without Running the Application

Static application security testing (SAST) analyzes source code without running it. The scanner reads code structure, data flows, and function call patterns to identify constructs that commonly introduce exploitable vulnerabilities.

Standard SAST detections include:

  • SQL queries built by concatenating user input directly into a query string
  • Functions that copy data into fixed-size buffers without checking the source length (e.g., strcpy())
  • XML parsers are configured to resolve external entity references, which can expose internal files
  • Deprecated cryptographic functions (e.g., MD5 for password hashing)
  • Sensitive data written to log output

For example:

query = "SELECT * FROM users WHERE id=" + user_input

A SAST scanner identifies this as a SQL injection risk at the line level, pointing the developer to the exact file and line number, before the code is deployed to a test environment, where the injection would need to be replicated manually to be found.

Because SAST runs directly on source code, it fits naturally into pull request checks and CI pipelines without requiring a running application or a test database.

3. Dependency Scanning: Flagging Packages With Published CVEs Before They Ship in a Build

Most modern applications import hundreds of open-source packages. A Node.js application might pull in 600+ transitive dependencies from npm. A Python service might import 80 packages from PyPI, each with its own dependency tree.

Every package in a build expands the application’s attack surface to include code the team did not write and may not have reviewed.

Dependency scanners compare the package manifest (package.json, requirements.txt, go.mod, pom.xml) against CVE databases, including the National Vulnerability Database and the GitHub Advisory Database. When a package version matches a published vulnerability, the scan surfaces:

  • The affected package name and installed version
  • The CVE identifier and CVSS severity rating
  • The patched version, if one exists
  • Whether a known public exploit is available

For example:

{  "express": "4.17.1"}

If a path traversal vulnerability was disclosed in that version of Express, the dependency scanner flags it in the pull request before the build runs, not after the application is deployed to staging and a penetration test finds the same CVE three weeks later.

4. Container and Infrastructure Scanning: Catching Misconfigured Images and Cloud Configs Before Deployment

Vulnerabilities are not limited to application code. A Docker base image built on an outdated Ubuntu release inherits all OS-level CVEs in that release. A Terraform configuration that opens port 22 to 0.0.0.0/0 exposes SSH to the public internet regardless of how secure the application code is.

Container and infrastructure scanning evaluates:

  • Docker base images for packages with known CVEs inherited from the OS layer
  • Kubernetes manifests for containers running as root or with excess Linux capabilities
  • Terraform and CloudFormation files for overly permissive security groups, unencrypted S3 buckets, and publicly accessible databases
  • Helm charts for insecure default values in chart configurations

For example:

resource "aws_security_group" "web" {
  ingress {
    from_port   = 22
    to_port     = 22
    cidr_blocks = ["0.0.0.0/0"]
  }
}

An infrastructure scanner running in the PR pipeline identifies the publicly exposed SSH port and blocks the PR before the Terraform plan is applied to a cloud environment. Without the scan, this configuration would reach the cloud on the next terraform apply, at which point remediation requires updating the security group in the running environment, re-running Terraform, and verifying the change did not affect other attached resources.

Understanding what each scan type catches in isolation is one part of the picture. Understanding how they connect into a single uninterrupted pipeline, and why the ordering matters, is where the implementation becomes concrete.

Each Gate in the PR Pipeline Blocks a Different CVE Category Before the Next Stage Runs

When these four scan types run in sequence on every pull request and build, each stage acts as a gate that prevents a specific category of vulnerability from advancing to the next stage:

Security gates blocking vulnerabilities at each CI pipeline stage

The key property of this structure is that each scan runs before the code advances to the next stage. A hardcoded API key caught at the secret scanning stage never reaches the dependency scanner. A vulnerable npm package caught at the dependency stage never gets baked into a container image layer.

Remediation cost decreases at each earlier stage for the same reason. When the secret scanner catches a credential in a two-commit pull request, the fix is: remove the credential from the commit, rotate the key, push an amended commit. When the same credential is found after being deployed to a container image and exported to CI logs, the fix requires auditing every service and system that may have received the credential value, and rebuilding every artifact that contains the compromised layer.

Running these scans consistently is straightforward when the pipeline is configured correctly. The place where shift-left programs commonly break down is not the tooling; it is the workflow problems that emerge after the tooling is installed and developers start interacting with it daily.

How Shift Left Security Gates Sequence Through a CI Pipeline

When these four scan types run in sequence on every pull request and build, each stage acts as a gate that prevents a specific category of vulnerability from advancing to the next stage:

CI pipeline diagram showing four security scan gates with stop points

The key property of this structure is that each scan runs before the code advances to the next stage. A hardcoded API key, caught during the secret scanning stage, never reaches the dependency scanner. A vulnerable npm package caught at the dependency stage never gets baked into a container image layer.

Remediation cost decreases at each earlier stage for the same reason. When the secret scanner catches a credential in a two-commit pull request, the fix is: remove the credential from the commit, rotate the key, push an amended commit. When the same credential is found after being deployed to a container image and exported to CI logs, the fix requires auditing every service and system that may have received the credential value, and rebuilding every artifact that contains the compromised layer.

Running these scans consistently is straightforward when the pipeline is configured correctly. The place where shift-left security programs commonly break down is not the tooling; it is the workflow problems that emerge after the tooling is installed and developers start interacting with it daily.

Why Shift Left Security Programs Break Down After Initial Setup

1. Alert Fatigue: When All 40 Findings Have the Same Priority, Developers Stop Reading Them

A pull request scan that returns 40 findings, such as 15 medium, 8 low, 3 informational, and 1 critical, without distinguishing how they are presented, trains developers to ignore the output. After reviewing enough scan results where only 1 in 40 findings requires immediate action, engineers begin treating scanner output as noise and stop opening the results panel.

The fix is severity-based filtering at the PR level. Critical findings fail the build. High findings require a reviewer to explicitly acknowledge the finding before approving the PR. Medium and low findings create backlog items but do not block the merge. Informational findings are logged but not surfaced during code review.

A developer opening a PR sees at most 1–3 actionable findings and understands exactly what remediation is required before the branch can merge. The scanner stays credible because every finding it surfaces in the PR is one that actually requires action.

2. Tool Sprawl: Five Dashboards Force Developers to Manually Reconstruct a PR’s Security State

A common shift-left setup involves GitLeaks for secrets, Semgrep for SAST, Snyk for dependencies, Trivy for containers, and Checkov for infrastructure as code. Each tool solves a real problem, but each also produces separate output: a dashboard, a configuration format, a report structure, and a notification channel.

When a developer opens a PR, they receive five separate sets of findings across five interfaces. Determining whether a single code change introduced a security regression requires checking each tool, correlating findings by file and line number, and deciding whether findings from different tools represent distinct risks or overlapping false positives on the same line.

As repositories scale, 50 repos, 100 repos, this correlation cost per PR compounds. Teams either invest significant engineering time building internal aggregation tooling, or they accept that developers will skip checking tools they cannot easily reach inside a normal code review session.

3. Slow Scans: 45-Minute Results Arrive After the Developer Has Already Switched Tasks

The effectiveness of a PR-triggered scan depends on how quickly results arrive after the developer opens the PR. A scan that completes in 2 minutes returns results while the developer still has the code change loaded in memory. A scan that takes 45 minutes returns results after the developer has moved to the next feature, requiring a full reload of which part of the code introduced the finding, what the intent of the change was, and whether a dependency upgrade would break other parts of the system.

When scan feedback arrives fast enough that the developer has not closed the mental model of the change, acting on a finding takes minutes. When it arrives hours later, the same remediation takes significantly longer because the developer is reconstructing context from scratch rather than working from an active understanding of the change.

These three failure modes, such as noisy alerts, fragmented tool output, and slow scan feedback, are not addressed by deploying additional security tools. They are addressed by the pipeline’s structure and by how findings are delivered to the developer. The following practices target each failure mode directly.

How Opsera Runs Shift Left Security Across All Four Scan Types in One Agent

Engineering teams already have scanners for secrets, code vulnerabilities, dependencies, and infrastructure. The challenge begins when a single pull request triggers multiple security workflows and returns multiple sets of findings. Developers are left piecing together results across tools to understand what actually needs to be fixed before the code can be merged.

Opsera’s Security Scan Agent consolidates these into a single workflow triggered from a natural language command in Claude Code, Cursor, or VS Code:

Opsera Security Scan Agent running in VS Code with Claude Code

The agent orchestrates:

  1. Secret scanning via GitLeaks across all committed files and recent commit history
  2. SAST analysis via Semgrep across source files against 119+ active security rules
  3. Dependency vulnerability analysis against CVE databases, including NVD and GitHub Advisory
  4. Container and filesystem scanning for base image CVEs and package-level vulnerabilities
  5. Infrastructure configuration validation for misconfigurations in Terraform, Kubernetes manifests, and cloud configurations

Instead of producing five separate tool outputs, the agent consolidates the results into a single report that includes severity classifications, affected file paths and line numbers, security impact descriptions, and recommended remediation steps, delivered within the developer’s existing IDE environment.

Findings are structured for severity-based triage: critical and high findings appear at the top of the report with direct file references, while medium and low findings are grouped in a separate section for backlog tracking. The developer does not need to open a separate dashboard, correlate findings from five tools, or manually sort by severity.

To show what this looks like against a real production-scale codebase, Opsera ran the Security Scan Agent against the Meshtastic firmware repository, an open-source project with 11,942 commits across multiple embedded hardware targets.

Shift Left Security in Action: Scanning the Meshtastic Firmware Repository

The Meshtastic firmware repository is an open-source LoRa mesh networking project supporting multiple embedded hardware platforms. With 11,942 commits and a codebase spanning C++, Python, and multi-target build configurations, it represents the scale and complexity of a production repository.

Meshtastic firmware security scan report showing 32 total findings

The Security Scan Agent ran a single workflow against the repository, executing secret detection, SAST analysis, dependency scanning, and filesystem scanning across 1,861 files using 119 active security rules out of 225 total. 

The scan returned 32 total findings: 1 critical, 0 high, 4 medium, and 22 low(treating it as test data).

Secret Detection: 22 Credential-Like Patterns in test/test_crypto/test_main.cpp, All Cryptographic Test Vectors

The first phase searched committed files and configuration for patterns matching known credential formats. GitLeaks v8.30.1 flagged 22 matches under the generic-api-key rule, all located in a single file: test/test_crypto/test_main.cpp.

GitLeaks secrets detection findings for Meshtastic firmware repository

The report noted that all 22 findings are deterministic cryptographic test vectors used for unit testing, not production credentials. The report recommended three remediation steps to prevent future false positives: adding // gitleaks:allowinline comments to suppress the rule on known test data, creating a .gitleaksignore file with fingerprints for the test file, and adding code comments documenting that the values are test vectors.

SAST: One Critical XXE in bin/bump_metainfo/bump_metainfo.py and Four Medium Buffer Overflow Risks

Semgrep SAST scan showing 1 critical XXE and 4 medium findings

The SAST phase ran Semgrep v1.157.0 across 1,861 files and returned 5 findings: 1 critical and 4 medium. The critical finding was an XML External Entity (XXE) vulnerability in bin/bump_metainfo/bump_metainfo.py at line 3:

# Current (Vulnerable):
import xml.etree.ElementTree as ET

# Fixed:
from defusedxml import ElementTree as ET

Python’s native xml.etree.ElementTree resolves external entity references in XML documents in certain configurations. An attacker who controls the XML input passed to this parser can craft a payload that reads local files, triggers outbound network requests from the parsing host, or causes a denial-of-service via an XML bomb. Replacing the import with defusedxml, a drop-in wrapper that disables external entity resolution, closes the attack surface without changing the rest of the parsing logic. The report marked this finding as requiring immediate action, with an estimated remediation effort of 1–2 hours and low implementation risk.

The four medium findings were buffer copy operations using strcpy() without length validation:

strcpy(info->name, ".");
strcpy(info->name, "..");

strcpy() copies bytes from the source pointer into the destination buffer until it hits a null terminator, with no check on whether the destination buffer is large enough to hold the input. If the source string exceeds the destination buffer size, strcpy() overwrites adjacent memory. The report recommended replacing strcpy() with strncpy() or strlcpy(), which accept an explicit buffer length and prevent writes beyond that boundary. Estimated remediation effort: 4–8 hours across 4 instances.

Dependency and Filesystem Scans: Zero CVEs in Tracked Third-Party Packages

The dependency scan returned no CVEs in tracked third-party packages. The filesystem scan produced a complete package inventory and confirmed scan coverage across all 1,861 files analyzed.

Consolidated Report: All 32 Findings in One Document With a Three-Phase Remediation Roadmap

Three-phase security remediation roadmap with effort and risk levels

The final report consolidated all scan results into a single severity-ranked document with file-level links:

Scan TypeCount
Secret Detection22
SAST5
Dependency CVEs0
Files Scanned1,861
Security Rules Run119

The report closed with a three-phase remediation roadmap:

  • Phase 1: Immediate (1–2 hours, low risk): Replace xml.etree.ElementTree with defusedxml in bump_metainfo.py, run existing unit tests, and push through CI.
  • Phase 2: Short-term (4–8 hours, medium risk): Replace 4 instances of strcpy() with strncpy() or strlcpy(), validate buffer sizes against all call sites, and re-run the full test suite.
  • Phase 3: Medium-term (1–2 hours, low risk): Add a .gitleaksignore file for test/test_crypto/test_main.cpp, add // gitleaks:allow comments on each test vector line, and document the test vector pattern in code comments.

Each finding in the report links directly to the affected file and line number. The path from receiving the report to opening the relevant file to making the remediation change is a single click rather than a multi-tool correlation exercise across five dashboards.

That is what shift left security looks like when the pipeline runs correctly: the critical XXE caught before the file reached a production XML-parsing path, the buffer overflows flagged at the line where they appear, and a prioritized remediation roadmap delivered to the developer inside the tool they are already working in, not in a separate security portal they check once a week.

Shift Left Security Best Practices for Fast, Non-Blocking Pipelines

Run all four scan types on every pull request, not only on scheduled builds. 

Scheduled scans create a gap between when a vulnerability is introduced and when it is found. PR-triggered scans close that gap to the specific commit that introduced the finding, when the developer still has the change in context.

Set severity-based merge gates, not a universal build-blocking rule. 

Critical findings fail the build. High findings require a reviewer to explicitly acknowledge the finding before approval. Medium and low findings create backlog items but do not block the PR. This keeps the PR workflow moving while ensuring the highest-risk findings are resolved before merge, rather than training developers to dismiss all scanner output by treating a low-severity informational note with the same urgency as a hardcoded production credential.

Update CVE feeds before each scan run, not on a weekly refresh schedule. 

A dependency scanner running against a vulnerability database last refreshed five days ago misses CVEs published in the interim. Scan pipelines should pull updated vulnerability feeds before each run, or use a managed scanner with a continuously updated database. A five-day-old database is a five-day window where a newly disclosed CVE ships undetected.

Run infrastructure-as-code scanning in the same PR pipeline as application code.

Terraform files, Kubernetes manifests, and Helm charts introduce the same categories of misconfiguration as application code introduces injection flaws. Running a dedicated IaC scanner (Checkov, kics, tfsec) in the PR pipeline catches a misconfigured security group or unencrypted S3 bucket at the same point a SAST scanner catches a SQL injection pattern, before the configuration reaches a running environment.

Annotate findings directly on the line in the PR diff, not in a separate dashboard.

When a SAST finding is annotated on the exact line in the PR diff where the vulnerable pattern appears, the developer sees the finding in the same interface where the code review is happening. When the finding appears in an external dashboard, the developer context-switches to a different tool, searches for the file, and manually correlates the finding back to the commit, adding 5–10 minutes of overhead per finding, multiplied across every PR that triggers a scan.

Pin scanner configurations in version control alongside application code. 

Scanner rules, suppression lists, and severity thresholds should live in a .security or .github directory in the repository, versioned with the code. A configuration that drifts outside version control cannot be reviewed, reverted, or audited. A suppression added to silence a noisy rule should go through the same PR review as the code change that motivated it.

Include the patched version number in the finding, not only the CVE identifier. 

A dependency finding that reports [email protected] — CVE-2020-8203 (High) with no remediation path leaves the developer to look up the patched version, verify it does not introduce breaking changes, and update the lockfile manually. 

A finding that adds fix: upgrade to [email protected] reduces the action to a single npm install command, which cuts remediation time and increases the rate at which developers close findings during the PR review rather than deferring them to a later sprint.

These practices work when teams implement and maintain them independently. For teams that want a single agent to orchestrate all four scan types, consolidate findings into one report, and deliver remediation steps inside the same IDE where code is written, Opsera’s Security Scan Agent provides that workflow.

FAQ

What is shift left security? 

Shift left security moves secret scanning, SAST, dependency scanning, and container/IaC checks from a pre-release review into the PR pipeline. Each scan runs automatically when a developer opens a pull request or pushes a commit, before the change is approved to merge. A hardcoded credential or vulnerable dependency is caught while it exists in a single branch, not after it has been merged, replicated across services, and shipped to staging.

In the Scaled Agile Framework (SAFe), shift left security means integrating security validation into each team’s Definition of Done rather than treating it as a compliance gate before a Program Increment ships. A story cannot be marked complete if it introduces a secret, a vulnerable package, or an insecure code pattern flagged by an automated scan. This prevents security findings from accumulating across sprints and surfacing as PI-blocking issues during system demo or release preparation.

The name comes from the left-to-right layout of a software delivery pipeline: plan, develop, build, test, security review, deploy. Security traditionally sits near the right end of that sequence. Moving it left means running scans inside pull requests and CI pipelines rather than at the release gate. The earlier in the pipeline a scan runs, the fewer systems and environments a vulnerability has touched by the time it is found.

The main benefit is a smaller blast radius: a vulnerability found in a pull request affects one branch, while the same finding post-deployment may require patching multiple services, environments, and build artifacts. Developers also fix findings faster at PR time because they still have the context of the change in memory. For security teams, automated PR-level scans reduce the manual review queue before each release, freeing time for threat modeling and architecture review rather than per-commit inspection.

Evaluate your code base for modernization.

Recommended Content