Podcast about DevSecOps

#84 - AI for DevSecOps: Current Wins and Ongoing Gaps

A Windows-only CVE on a MacBook shows why security teams need fewer irrelevant alerts.

17 min read

Can AI really help us build more secure software? What’s working in practice right now, and where do the tools still fall short? Mattias and Paulina share their views.

Discuss the episode or ask us anything on LinkedIn


The review step did not go away

Getting code written stopped being the slow part. You describe what you want, something comes back in seconds, and the bottleneck moves to the person who has to decide whether that something is correct, maintainable and safe to put in front of customers. That person is you, and your week didn’t get any longer.

That is where the security question actually sits. AI made producing code and configuration cheaper without making the reading of it cheaper, and the tools meant to catch what we miss haven’t moved much either. Your dependency scanner tells you a library contains a vulnerable function. Unless it does reachability analysis, it doesn’t tell you whether you call it. Your dependency bot opens a pull request to bump that library. It mostly doesn’t tell you whether the bump matters. The judgment is still yours, on more code than before.

Some of this is solved well enough to use on a Tuesday. Some of it is a slide in a vendor deck. Here is where the line sits, starting with the parts that already pay off.

The wins are real and they are unglamorous

We already get practical value from document work and prototypes.

What is AI actually saving you time on right now?

Translation between formats: a long document into bullet points, bullet points into a long document, and somebody else’s code into an explanation of what it does.

A lot of security work is documents. Policies, customer questionnaires, standards, a forty page PDF with a deadline attached. Paste it in, ask what it is, get the shape of it back in a minute. Then go the other way: hand over five bullets and get a draft that follows them, which you edit into something you’ll sign. That loop is the biggest time saver we have, and it has nothing to do with code.

Prototyping is the other one. Tools like Lovable put a working front end in front of someone who has never written any, and the code is messy. For a prototype that’s fine: the value isn’t the output, it’s that a colleague from outside engineering can show you the thing instead of describing it.

There’s a provider specific option in the same bucket: Amazon Q, worth a look if your day is spent inside AWS.

You need to know the answer’s shape before you can judge it

All of that assumes you can tell a good answer from a plausible one, which is the part that doesn’t come with the subscription.

Why do two people get completely different results from the same tool?

Because the one who understands the problem can describe it in the terms the tool needs, and can tell when the answer is wrong.

On one project someone from the business side spent a long time trying to get a drawing generated and got nowhere. The same task went to someone who knew how the code underneath splits a drawing up, and it worked. The tool didn’t change. The description did.

The failure mode in the other direction is quieter. A friend of ours who isn’t a programmer asked for a Python program that fetches some data and prints it out, and the model printed the program. He never ran it and never tested it. The assumption was that code a model prints is code that works, so the job looked done the moment the listing appeared.

Use the tools. Just notice that handing them to people who cannot check the output is a different decision from the one most teams think they’re making.

Your scanner flags the library, your bot patches it anyway

The same missing context runs straight through the vulnerability workflow, at both ends of it.

Why does your scanner flag a vulnerability you never call?

Because it matched the package, not your code.

Two tools get lumped together here. Static application security testing reads the code you wrote; software composition analysis, SCA, reads the open source dependencies you pulled in, and Snyk’s own write up puts the split exactly there. The complaint about a library you barely touch belongs to SCA, not to static analysis in general.

The shape of it: a library has a known exploit in one function, your code never calls it, and an SCA tool without reachability analysis flags the library anyway, because the package and version are all it can see. Now you own a finding you can’t close without reading the advisory yourself, multiplied by every dependency in every repository. Our favourite example is a ticket for an Edge browser vulnerability on a MacBook, raised, assigned, action required. Read the CVE and it only applies to Windows. That is the ticket that teaches people to stop reading tickets.

Reachability analysis is the vendor answer, and a real improvement. Snyk builds a call graph from your code through its transitive dependencies and marks a finding REACHABLE or NO PATH FOUND, per its own documentation. What that doesn’t settle is safety: the same docs say NO PATH FOUND doesn’t mean the vulnerability can’t be exploited, and coverage differs by language.

Now the fix side, thin in the other direction though not uniformly. GitHub documents two separate Dependabot workflows: version updates chase the latest release whether or not anything is wrong with it, while security updates raise a pull request to the minimum version that includes the patch, per its documentation. Exploitability is what neither covers for you, with one exception: Dependabot alerts have shown vulnerable function calls since an April 2022 beta, which shipped for Python only. Everywhere else a bump arrives without an answer to whether your code reaches the vulnerable function, or whether the new version moves a default you depend on. Configure it so nothing merges without approval and the work is what it always was: read the release notes, decide, merge.

The supply chain attacks you during npm install

Dependencies aren’t only a vulnerability problem. They’re an execution problem, and one path has a clock on it.

When does a malicious package actually run its code?

Install hooks are the earliest path, but not the only one.

npm runs preinstall, install and postinstall scripts as part of installing a package, as its documentation describes. You need a package, you type npm install, and somebody else’s shell command executes on your laptop with your SSH keys, your cloud session and your npm token in reach. No runtime, no deploy, no review step in between. Other payloads wait instead: for your code to import the package, or for a browser to load the bundle it ends up inside.

September 2025 gave us one of each. On the 8th, malicious versions of widely used packages including chalk and debug were published after a maintainer fell for a phishing mail from a lookalike domain, documented by Semgrep. That one wasn’t an install hook. GitHub’s advisory for debug@4.4.2 says the code redirected cryptocurrency transactions to the attacker’s addresses “from within browser environments”, and that local, server and command line environments were not affected, in GHSA-4x49-vf9v-38px. A week later a self replicating worm took the install path and needed no person at all. GitHub was notified on 14 September and says it spread by injecting malicious post install scripts, harvesting credentials and republishing itself into the victim’s other packages. Its response post sets the direction: trusted publishing instead of long lived tokens, and FIDO based two factor instead of TOTP. The numbers landed a week after that. From mid October, every newly created write enabled granular token gets a default expiration of seven days, down from thirty, and a maximum of ninety days where there used to be no limit, per GitHub’s 29 September changelog. Seven days is a default, not a ceiling.

What most of us do about this is a proxy. Artifactory or Nexus in front of the public registry, an allowlist, a human approving each new package. That works, and it’s a lot of process for a developer who needs one library this afternoon. npm install --ignore-scripts is the blunt instrument, and it breaks packages that legitimately compile something on install. That breakage is a compatibility check and nothing more: an optional script, or a hostile one, can be skipped without anything failing. For the inventory, read the lifecycle scripts your dependencies declare.

Detection is a pattern problem, response is a trust problem

Move past the laptop and the same split shows up in operations: detection runs ahead of response.

What can AI spot that an alert rule cannot?

The pattern nobody pointed a rule at, because nobody knew its shape in advance.

Be fair to the rules first. They were never limited to single events: CloudWatch metric math divides Lambda Errors by Invocations and alarms on the rate, as AWS showed in 2019. Nor were they all fixed numbers, because CloudWatch anomaly detection learns a metric’s normal baseline and alarms on that rather than a figure you typed, generally available since October 2019. The criticism belongs to static threshold alarms, and even an adaptive one needs a metric somebody nominated in advance. The AWS root account login is easy, because the shape was obvious. A scrape spread thin over three days, a rise in 401 responses on an endpoint nobody put a band around: nobody nominated those. Learning normal across data nobody pointed at is the part still missing, and security platforms have shipped a version of it for years under the name machine learning. The label changed more than the capability did.

Response is where we stop. Take the easy case: an account that sends thirty emails a week starts sending three hundred. Today an alert goes to a person, who agrees it looks compromised and locks the account. We’re close on detecting that. Handing over the locking is a different decision, and we aren’t ready to make it.

Products are ahead of our willingness here. Microsoft describes automatic attack disruption as disabling the account Octo Tempest is using and revoking its active sessions, with no analyst in the loop, in a July 2025 write up. The same post still tells SOC teams to run incident response afterwards to confirm the threat is contained. The acting is automated. Judging whether it was right is not.

That caution has evidence behind it. In July 2025 version 1.84.0 of the Amazon Q Developer extension for VS Code shipped with code a threat actor had committed into its open source repository. AWS traced the access to an inappropriately scoped GitHub token in the extension’s CodeBuild configuration, says the code “was unsuccessful in executing due to a syntax error”, and shipped 1.85.0 as the fix, in security bulletin AWS-2025-015. The version that reached us, that it would delete your infrastructure, isn’t in anything AWS published.

Noise is the problem to point AI at first

Before any of that autonomy matters, there is a more boring problem sitting in front of it. We struggle with the volume of findings.

Which security problem should AI be pointed at first?

The volume of findings, because every other improvement is stuck behind a queue nobody can read.

There’s an obvious way for that to go wrong. If the thing meant to cut the noise hallucinates, it invents alerts and you end up with more work than you started with. We’re trying to shrink the queue, not feed it.

Meanwhile there’s a practice that works now, without any model involved. Stop chasing zero, because you aren’t getting to zero. Take the count you have, call it the baseline, and watch the delta. Ten thousand findings that have been ten thousand for six months is a baseline; a thousand new ones this week is a signal worth reacting to on a Monday. It’s one signal and not the whole picture: a flat total can hide a finding reclassified as critical, or one that became exploitable because something else moved. The delta tells you what arrived. It doesn’t tell you the standing ten thousand is harmless, and that pile still needs a risk based pass of its own.

Where we hope a model earns its keep is the next step, when something does fire. Root account used in account X, here is the CloudTrail for that window, tell me what changed. We want help summarising the log window and identifying the changes that matter, on a volume of text nobody reads line by line. That hope isn’t a measurement: check the output against the original events before you act on it.

Infrastructure as code is the easiest place left

If you want somewhere for AI review to pay off quickly, skip the application and look at the layer underneath.

Why is Terraform a good first target for AI review?

Because it is a small declarative language, the intent is written down rather than inferred, and misconfiguration is still one of the most common ways things go wrong.

OWASP ranks Security Misconfiguration fifth in its 2021 Top 10, and the practical version is familiar: a security group opened wider than it should be, logging switched off, a bucket policy nobody read. HCL is far easier to reason about than an application code base. This is a VPC. This subnet is public. This rule allows the world. A review tool that reads the change and flags what it does to your exposure is a tractable problem, and we covered a product built on that bet with Davlet Dzhakishev of Cloudgeni in episode 78.

The catch is that a source diff isn’t the change. It leaves out every unchanged resource, what the modules do with the values you passed, the variables that differ per environment, and the state of what is deployed. terraform plan is where those meet: it reads the current state of existing remote objects, compares the configuration against it, and proposes the actions that would reconcile them, per HashiCorp’s documentation. So review the configuration together with a plan run against the environment you’re changing, not the diff alone. That also catches the other half: somebody clicked something in a console during an incident, and your code and your account no longer agree.

Which raises where the code runs, and here we don’t agree. Mattias has been told for years that Kubernetes operators will take over from Terraform, is still waiting, and suspects clusters are past their peak. Paulina sees the opposite, with teams moving back to their own Kubernetes, on-prem and managed, including a Danish bank that cut a lot of cost doing it. We haven’t checked those numbers; the move off cloud got its own treatment in episode 79.

One correction, since we were unsure on air: provisioning cloud resources from a YAML file already exists. Google’s Config Connector gives you a BigQueryDataset custom resource, and AWS Controllers for Kubernetes does the same for AWS services. Whether you want a database’s lifecycle tied to a cluster’s is a separate argument.

What this means for teams

Forget whether AI will change security work and ask which of your current problems a model can take a bite out of this quarter. The honest answer is the reading problems, not the deciding problems. Summarising a log window, explaining a dependency advisory, turning a standard into a checklist, drafting the config you then review. Anything where being wrong is visible to you in seconds.

Four things worth doing this week:

  • Write down your count of open security findings and the number that arrived in the last seven days. The second is the new workload nobody has triaged. The first still needs a risk based pass, because a total that hasn’t moved can hold a finding that got worse.
  • Turn on reachability analysis if your scanner offers it, and treat NO PATH FOUND as a lower priority rather than a closed finding.
  • Read the lifecycle scripts your dependencies declare, so you know which execute code at install time. npm install --ignore-scripts in a scratch checkout is a useful companion: what breaks is what needs those scripts, which isn’t the same list.
  • Before adding any AI security tool, run it over findings you’ve already reviewed and count four things: real findings it kept, noise it removed, real findings it dismissed, and findings it invented. The last two decide it, because a tool that quietly buries vulnerabilities scores well on the first two.

Common questions, answered

Should I let Dependabot merge dependency updates on its own?

Configure it to require approval, so a bump lands only after someone has read the release notes.

The bot is a version bumper, not a risk assessor. Security updates go to the minimum version carrying the patch, version updates chase the newest release, and outside Dependabot’s Python vulnerable function call beta neither tells you whether your code reaches the vulnerable function.

How do I stop a package from running code when I install it?

Run npm install --ignore-scripts, which skips the preinstall, install and postinstall hooks. Some packages compile native code in those hooks and will break, so try it in a scratch checkout and allowlist the ones that need them.

Don’t read that breakage as an inventory of install time code: an optional script, or a hostile one, can be skipped without anything failing. Pair it with reading the lifecycle scripts your dependencies declare, plus a proxy registry of approved packages. On the publishing side, prefer trusted publishing, which authenticates a CI job over OIDC instead of a token you store.

Can I let an AI tool lock a user account on its own?

Keep a person in the loop to confirm it’s an incident before the tool acts, even though products such as Microsoft’s automatic attack disruption already disable accounts unsupervised. The same holds for blocking an IP, quarantining a container or isolating a host: each can cut off a colleague or a production path when the call is wrong.

The false positive rate has to come down first. Trust is the other half and it moves slower: a tool holding your credentials with no confirmation step is only as trustworthy as its own supply chain.

Resources

Since we recorded

The worm came back. A second wave, Shai-Hulud: The Second Coming, hit npm between 21 and 23 November 2025, this time using a preinstall hook and spreading to several hundred more packages, analysed by Check Point. OWASP also moved the furniture: in the 2025 Top 10, Security Misconfiguration rises from fifth to second and Software Supply Chain Failures enters at third, so both halves of this episode are now near the top of that list. We came back to the developer side of supply chain attacks in episode 97, and to what an agent should be trusted to do on its own in episode 111.