How to automate security vulnerability scanning
How to automate security vulnerability scanning
The average time to exploit a newly disclosed CVE is now 15 days, down from 45 days in 2021 — according to Mandiant's 2024 M-Trends report. If your team runs security scans manually once a sprint, you're giving attackers a two-week head start. When you automate security vulnerability scanning, you shift from periodic audits to continuous detection with instant alerting. CodeWords wires together scanners, LLM-powered triage, and team notifications into a single pipeline that runs on autopilot.
TL;DR
- Automated vulnerability scanning catches CVEs within hours of disclosure, not weeks.
- CodeWords runs scanners in ephemeral sandboxes, uses LLMs to prioritize findings, and routes alerts to the right team.
- A good AppSec pipeline doesn't just find vulnerabilities — it explains severity and suggests fixes.
Unlike generic AI automation posts, this guide shows real CodeWords workflows — not just theory.
Why periodic security scans are not enough
A quarterly pen test is a point-in-time snapshot. Between scans, your attack surface changes with every merged PR, updated dependency, and infrastructure change.
The Verizon 2024 DBIR found that 14% of breaches involved exploitation of vulnerabilities — up from 9% the prior year. The trend is clear: attackers are moving faster, and defenders need to match that pace.
Continuous scanning isn't about running more tools. It's about running them at the right triggers — on every commit, on a schedule, and when a new advisory drops — then routing the results intelligently so engineers act on what matters.
How to build a vulnerability scanning pipeline in CodeWords
Tell Cody: "Every night at 2 AM, scan our main repo for dependency vulnerabilities, container image CVEs, and secrets in code. Prioritize findings by severity. Post critical items to #security in Slack and log everything to Airtable."
Cody generates:
- Dependency scanner — Runs
npm audit,pip-audit, andtrivyinside an E2B sandbox against the latest commit. - Container scanner — Pulls the latest Docker image from your registry and scans it with Trivy for OS-level and application-level CVEs.
- Secrets detector — Runs Gitleaks across the repo to catch accidentally committed API keys, tokens, and credentials.
- Triage engine — Passes all findings to an LLM with context: "For each vulnerability, explain the risk, whether it's exploitable in our stack, and suggest a fix. Rate severity as critical, high, medium, or low."
- Router — Critical and high findings go to Slack immediately. Medium and low go to a weekly digest. All findings are logged to Airtable for tracking.
The pipeline runs on a cron schedule, but you can also trigger it on every PR via a GitHub webhook.
How to prioritize vulnerabilities with AI
Scanners generate noise. A typical npm audit output might list 30 findings, but only three are actually exploitable in your application. The rest are in dev-only dependencies or behind authentication walls.
Use the LLM to filter signal from noise. Pass each finding with context:
- The dependency name and version.
- Whether it's a production or development dependency.
- The CVSS score and exploit availability from the NVD.
- Your application's exposure: is the affected function actually called in your codebase?
The LLM returns a prioritized list with one-sentence justifications. This is the list your security engineer reviews — not the raw dump.
How to automate fix suggestions and PR creation
Detection without remediation is just anxiety. Extend your workflow to suggest and apply fixes.
For dependency vulnerabilities, the workflow can:
- Check if a patched version exists.
- Bump the version in
package.jsonorrequirements.txt. - Run the test suite in an ephemeral sandbox.
- If tests pass, open a PR with the fix and tag the responsible team.
For secrets detected in code, the workflow can revoke the exposed key via the provider's API (if available), generate a new one, and update the secret in your vault or environment config.
Store the remediation playbook — which actions to take for which vulnerability types — in Google Drive and reference it in the workflow.
How to track AppSec metrics over time
Track vulnerability density (findings per 1,000 lines of code), mean time to remediation, and severity distribution over time. Log each scan's results to Google Sheets or Airtable.
A SANS 2024 AppSec survey found that teams tracking these metrics reduced their vulnerability backlog 40% faster than those without visibility.
Build a monthly report workflow: aggregate the data, pass it to an LLM with the prompt "Summarize this month's security posture. Highlight trends, top recurring issues, and recommended focus areas." Post the report to your security team's channel and archive it in Google Drive.
Frequently asked questions
Can this replace a dedicated SAST/DAST tool? CodeWords orchestrates scanning tools — it doesn't replace them. Think of it as the pipeline layer that runs your scanners, triages results, and routes alerts. You can integrate commercial tools like Snyk or SonarQube via HTTP calls.
How does this compare to Zapier for security workflows? Zapier can't run Trivy, Gitleaks, or pip-audit. CodeWords gives you full Python execution in sandboxes plus LLM access for triage.
Does it work for infrastructure-as-code scanning? Yes. Add a step that runs Checkov or tfsec against your Terraform or CloudFormation files in the same pipeline.
How do I handle false positives? Maintain a suppression list in Airtable. The triage engine checks each finding against the list before alerting, and your team can add entries via a Slack command.
Conclusion
Security scanning shouldn't wait for sprint planning. A continuous pipeline that scans, triages, and alerts on every meaningful change keeps your attack surface visible — and your response time measured in hours, not weeks.




