A developer commits an AWS access key to a public repository by accident. Within hours, someone has found it and started spinning up servers on the company’s account. Nothing in the CI pipeline checked for secrets, so nobody noticed until the bill arrived. Stories like this are why security has moved into the DevOps pipeline itself, and why job descriptions in Pune increasingly ask for DevSecOps skills.
The short answer: DevSecOps means building security checks into every stage of the delivery pipeline instead of leaving them for a review at the end. In practice that is a handful of automated scans (secrets, code, dependencies, container images and infrastructure code), plus good habits around secrets and permissions. You do not need to be a security specialist to start. If you can write a CI pipeline, you can add these checks to it.
DevSecOps builds on the core skills covered in our DevOps training in Pune: Git, CI/CD, Docker and infrastructure as code. This guide shows where security fits into each of them.
What “shift left” actually means
Picture the pipeline as a line from left to right: code, build, test, release, deploy, run. Traditionally, security sat at the far right, with a penetration test or audit just before release. Problems found there are expensive, because the code was written weeks ago and the release date is close.
Shifting left means moving checks earlier, so a developer finds out about a vulnerable library or a leaked password within minutes of pushing, while the change is still fresh. It does not remove later checks. It just means fewer surprises reach them.
The five scans worth adding first
1. Secrets scanning
Catch passwords, API keys and tokens before they reach the repository. Tools like gitleaks can run as a pre-commit hook on your laptop and again in CI:
gitleaks detect --source . --verbose
2. Static code analysis (SAST)
SAST tools read your source code looking for risky patterns, such as SQL built from user input or unsafe deserialisation. SonarQube is widely used in enterprises, and Semgrep is a lighter option that is quick to set up.
3. Dependency scanning (SCA)
Most applications are mostly third-party libraries. Software composition analysis checks them against databases of known vulnerabilities. GitHub’s Dependabot, OWASP Dependency-Check and Snyk are common choices.
4. Container image scanning
A Docker image carries a whole operating system layer, and old base images often contain known vulnerabilities. Trivy scans an image in seconds, and the --exit-code flag lets it fail the build:
trivy image --severity HIGH,CRITICAL --exit-code 1 myapp:1.0
5. Infrastructure-as-code scanning
Misconfigured cloud resources cause many real breaches: a public S3 bucket, a security group open to the whole internet, an unencrypted database. Checkov and Trivy can scan Terraform files before anything is applied:
checkov -d ./terraform
Putting it into a pipeline
Here is how those checks fit into a simple pipeline. The order matters: the fastest, cheapest checks run first, so a leaked secret fails the build in seconds instead of after a ten-minute image build.
- On every commit: secrets scan, then SAST and dependency scan, running in parallel.
- After the image is built: container image scan. Fail on critical issues, report the rest.
- Before Terraform apply: IaC scan on the plan or the code.
- After deploying to a test environment: optionally, a dynamic scan (DAST) with a tool like OWASP ZAP against the running app.
Whether you use Jenkins or GitHub Actions, each check is just another stage or step. If you have not built a pipeline yet, start with our comparison of Jenkins vs GitHub Actions.
Beyond scanning: three habits that matter more
Scanners catch known problems. These habits prevent whole classes of them.
- Keep secrets out of code entirely. Store them in a secrets manager such as HashiCorp Vault, AWS Secrets Manager or Azure Key Vault, and inject them at runtime.
- Use least privilege. Give each pipeline, server and person only the permissions they need. A CI job that deploys to staging should not be able to delete production.
- Patch on a schedule. Rebuild images regularly from updated base images, even when your code has not changed.
If you are writing infrastructure code, the IaC side of this is covered in our Terraform for beginners guide, including why the state file must never be committed to Git.
Mistakes teams make when they start
- Turning everything on at once. A first scan can report hundreds of findings. Fail the build only on critical issues to begin with, then tighten over time.
- Treating every finding as urgent. A vulnerability in a library function you never call is lower priority than an open security group. Learn to triage.
- Making security a separate team’s problem. DevSecOps works when developers see and fix findings themselves, inside the tools they already use.
Is DevSecOps a separate career?
It can be. Some companies hire dedicated DevSecOps or cloud security engineers, and these roles tend to sit at the higher end of DevOps pay because they combine two skill sets. Most often, though, DevSecOps is something every DevOps engineer is now expected to understand. A strong DevOps foundation comes first, then security depth on top. Our DevOps vs SRE vs platform engineer guide explains how these specialisations relate.
Frequently asked questions
Do I need a security background to learn DevSecOps?
No. Start from DevOps. If you can build a pipeline and a Docker image, you can add scanners to them. Security knowledge, such as the OWASP Top 10, grows as you read and fix real findings.
Which DevSecOps tools should a beginner learn first?
Trivy and gitleaks. Both are free, run from the command line, take minutes to set up and give immediate, understandable results. Add SonarQube or Semgrep once you are comfortable.
Is DevSecOps the same as cybersecurity?
No. Cybersecurity is a broad field that includes network defence, incident response and compliance. DevSecOps is narrower: it is about building security into how software is written, built and deployed.
Can I add DevSecOps to a portfolio project?
Yes, and it stands out. Take an existing CI/CD project, add secrets, dependency and image scans, and show in the README how a deliberately vulnerable library fails the build.





