What I found scanning 697 public Jenkins pipeline files

Hi all. I’m a DevOps engineer, and I made a small offline scanner for Jenkinsfiles and shared libraries called Pipeline Doctor. It looks for problems a syntax check won’t catch, such as credentials interpolated by Groovy, privileged containers and missing timeouts.

I ran it on 697 public files from 27 open-source repos. 103 of them were Declarative pipelines:

  • 79 of the 103 had no build retention policy in the file
  • 37 had no timeout in the file
  • 13 had at least one high-severity finding

Across all 697 files, 40 used a privileged container or mounted the Docker socket.

Two caveats: this isn’t a random sample, and timeouts and retention can also be set at job or folder level, so some of these may be fine.

It’s one Python file with no dependencies, it makes no network calls, and it’s free under the MIT licence. There’s also a paid Pro version, but this post is about the free one: GitHub - svrforge/devops-forge: Offline security and reliability audit for Jenkins pipelines. 19 rules, no dependencies, an exact fix for every finding. · GitHub

I’d really like to know where it’s wrong. Which findings would you ignore, and what should it catch that it doesn’t?