Why You Can't Rely on Manual Security Reviews Anymore
I remember the days when a security review meant a Friday afternoon meeting with a senior dev squinting at a code diff. Those days are gone. Teams now push code dozens of times a day. Containers spin up and down. APIs change weekly. Manual review? Itās like trying to catch raindrops with a sieve.
According to www.artificialintelligence-news.com, modern DevSecOps needs security checks that run before release day. The pressure has grown because teams write code, build services, and deploy updates at a pace manual review simply cannot match. Automated testing helps catch routine flaws before they hit production. Thatās not a nice-to-have anymoreāitās survival.
So letās skip the theory. Iāll walk you through setting up three automated security testing tools I actually use. Iāll show you the gotchas, the configs that work, and the moments when the tool lied to me. Youāll leave with a working pipeline, not just another blog post to bookmark.
The Three Tools I Tested (and Why These Specific Ones)
I tested Semgrep, Snyk, and Trivy over two weeks with a sample Node.js + Docker app. Why these three? Because they cover the three layers you actually need:
- Static analysis (SAST) ā scans your source code for patterns that look like bugs or vulnerabilities.
- Dependency scanning ā checks your open-source libraries for known CVEs.
- Container scanning ā looks inside your Docker images for misconfigurations and vulnerable packages.
I didnāt test every tool out there. I tested the ones that fit into a CI/CD pipeline without requiring a full-time security engineer to configure.
Tool 1: Semgrep ā Static Analysis That Doesn't Make You Cry
Semgrep is an open-source static analysis tool. Think of it as grep, but for security rules. You write patterns, and it finds matching code patterns across your repo.
Setting Up Semgrep
# Install via pip or brew
pip install semgrep
# Or use Docker
docker run --rm -v "${PWD}:/src" returntocorp/semgrep semgrep --config=auto /src
Hereās the thing: Semgrepās --config=auto downloads a community ruleset. Thatās fine for a quick scan, but for a real pipeline, you should pin a specific ruleset.
My Configuration
I created a .semgrep.yml file in my repo root:
rules:
- id: no-hardcoded-secrets
pattern-either:
- pattern: "password = \"...\""
- pattern: "api_key = \"...\""
message: "Hardcoded secret found"
severity: ERROR
Then I ran:
semgrep --config=.semgrep.yml --error --json > semgrep-results.json
What I Found
I ran Semgrep against a small Express.js app. It flagged 14 potential issues. Three were false positives (it complained about password in a test fixture). But one was realāa developer had left an AWS secret key in a config file that was accidentally committed. Semgrep caught it before merge.
Pro tip: Use --error flag to make the pipeline fail if any rule with severity ERROR is triggered. Donāt rely on warnings aloneātheyāll be ignored.
Tool 2: Snyk ā Dependency Scanning That Actually Updates
Snyk is a commercial tool with a generous free tier. It scans your package.json, requirements.txt, or Gemfile.lock and tells you which libraries have known vulnerabilities. The killer feature? It can open a pull request with the fix.
Setting Up Snyk
- Sign up at snyk.io (free tier: 200 tests per month).
- Install CLI:
npm install -g snyk
snyk auth
- In your project root:
snyk test --json > snyk-results.json
The Hands-On Test
I ran Snyk against a Node.js app using express@4.17.1 and lodash@4.17.20. Snyk reported 4 vulnerabilities: 1 high, 2 medium, 1 low. It offered a fix PR for the high one (lodash needed an upgrade to 4.17.21).
But hereās the catchāSnykās free tier only scans open-source dependencies. If you have private packages, you need the paid plan. Also, Snyk sometimes suggests upgrades that break your code. I had a case where upgrading axios from 0.21.1 to 0.27.0 changed the error handling API. Test before merging.
Pipeline Integration (GitHub Actions)
name: Snyk Security Scan
on: [push, pull_request]
jobs:
snyk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Snyk
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
I set --severity-threshold=high to avoid blocking the pipeline on low-severity issues. You can adjust it to medium if youāre in a high-compliance environment.
Tool 3: Trivy ā Container Scanning That Doesn't Slow Down Your Build
Trivy is an open-source vulnerability scanner for containers. It checks your Docker image against a database of CVEs. The best part? Itās fastāscans a typical image in under 10 seconds.
Setting Up Trivy
# Install via brew or download binary
brew install trivy
# Or use Docker
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
aquasec/trivy image my-app:latest
The Test
I built a Docker image based on node:16-alpine and added a few packages. Trivy found 12 vulnerabilities in the base image aloneāmost were in Alpineās apk package manager. The fix? Use a more minimal base image like node:16-alpine-slim or apply security patches in your Dockerfile.
Real talk: Trivy sometimes reports vulnerabilities that donāt affect your app because the vulnerable package is installed but not used. You can filter these by writing a .trivyignore file:
# Ignore CVE-2023-XXXXX in libcurl because it's not used
CVE-2023-XXXXX
Pipeline Integration (GitLab CI)
container_scan:
stage: test
image: docker:latest
services:
- docker:dind
script:
- docker build -t my-app:$CI_COMMIT_SHA .
- docker run --rm aquasec/trivy image --exit-code 1 --severity CRITICAL my-app:$CI_COMMIT_SHA
I used --exit-code 1 so the pipeline fails if any CRITICAL vulnerability is found. Be carefulāif you set it to HIGH, you might block deployments too often. Start with CRITICAL only.
A Real Pipeline: Putting It All Together
Hereās the pipeline I run on every pull request. It takes about 2 minutes total:
- Semgrep scans the source code for hardcoded secrets and injection patterns.
- Snyk checks dependencies for known CVEs.
- Trivy scans the final Docker image.
If any tool finds a CRITICAL or HIGH issue, the build fails. I get a notification in Slack with a link to the results.
One gotcha: Running all three tools sequentially can slow down your CI. I parallelized the first two (Semgrep and Snyk) because they donāt need the built image. Trivy runs after the Docker build.
What These Tools Don't Tell You (And Why You Still Need Humans)
According to www.artificialintelligence-news.com, automated testing helps catch routine flaws before they reach production. Thatās true. But āroutineā is the key word. These tools wonāt find business logic flaws, race conditions, or authentication bypasses that require understanding your domain.
I once had a tool flag a SQL injection that was actually a false positiveāthe input was sanitized in a different layer. And Iāve had tools miss a real vulnerability because the CVE database hadnāt been updated yet. Always do a manual review for critical features like payments, user authentication, and data exports.
Which Tool Should You Start With?
If youāre a solo developer or a small team, start with Semgrep for source code and Snyk for dependencies. Both have free tiers and are easy to set up. Add Trivy when you start using containers.
If youāre in a regulated industry (PCI-DSS, HIPAA), youāll eventually need a commercial DAST tool like Burp Suite or Qualys. But for most teams, the three tools above will catch 80% of common vulnerabilities.
Your Next Move
Donāt try to implement all three at once. Pick oneāI suggest Semgrepāand add it to your pre-commit hook or CI pipeline this week. Run it on your existing codebase. Look at the results. Fix the real issues. Then add the next tool.
Automated security testing isnāt a one-time setup. Itās a habit. And like any habit, it starts with a single action. Go run semgrep --config=auto . right now. See what it finds. You might be surprised.

Originally reported by www.artificialintelligence-news.com. Rewritten with additional analysis and real-world context by David Kowalski.



