- Home
- Skills
- DevOps & Cloud
- Jenkinsfile Safety Check
More screenshots
Works with the AI Agents you already use
Jenkinsfile Safety Check
sh "docker login -p ${PASSWORD}" puts your credential into the command line, and sh "echo ${env.CHANGE_TITLE}" lets a pull request run its own commands on your agents.
$5
Jenkinsfile Safety Check
Example session with this skill installed
Check this project with jenkinsfile-safety-check.
- Read your context and instructions
- Compiled the jenkinsfile safety check
$ python3 scripts/check_jenkins.py examples/risky
BLOCK Jenkinsfile:11 J02 SECRET_IN_PIPELINE
SLACK_TOKEN = '<redacted>'
Why: A password, token or key is written in the pipeline file. Everyone who can read the repository (and every fork) can use it, and it stays in git history.
Safer: Store it in Jenkins credentials and read it with credentials('id') or withCredentials; change the secret that was committed.
BLOCK Jenkinsfile:17 J01 CREDENTIAL_INTERPOLATED_IN_SHELL
BLOCK vars/announce.groovy:3 J03 PULL_REQUEST_VALUE_IN_SHELL
REVIEW Jenkinsfile:1 J15 LIBRARY_NOT_PINNED
REVIEW Jenkinsfile:4 J12 BUILD_ON_CONTROLLER
REVIEW Jenkinsfile:16 J13 TLS_CHECK_OFF
REVIEW Jenkinsfile:16 J14 DOWNLOAD_PIPED_TO_SHELL
REVIEW Jenkinsfile:18 J16 PRIVILEGED_CONTAINER
REVIEW Jenkinsfile:23 J18 PARAMETER_IN_SHELL
REVIEW Jenkinsfile:25 J11 CODE_RUNS_ON_CONTROLLER
REVIEW Jenkinsfile:32 J17 APPROVAL_OPEN_TO_ALL
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 2 files, 2 with Jenkins pipeline content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
sh "docker login -p ${PASSWORD}" puts your credential into the command line, and sh "echo ${env.CHANGE_TITLE}" lets a pull request run its own commands on your agents. This skill finds those and nine other Jenkins pipeline mistakes before they run, and tells you how to fix each one.
Your agent runs a scanner on your Jenkinsfiles (declarative and scripted, Jenkinsfile.*, *.jenkinsfile) and shared-library Groovy files. It skips Groovy comments, knows which strings Groovy fills in (double quotes) and which the shell reads at run time (single quotes, $), which names hold credentials (withCredentials, credentials() with its _USR and _PSW forms, password parameters), and which parameters are free text or fixed choices. It never connects to Jenkins or runs a build. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK
- J01: a credential put into sh, bat or powershell with a double-quoted Groovy string
- J02: a password, token or key written in the pipeline
- J03: pull-request titles, branches or authors interpolated into shell commands
REVIEW
- J11: evaluate(), GroovyShell or "...".execute() running on the controller
- J12: builds on the built-in node (master or built-in label)
- J13: curl -k, wget --no-check-certificate and other TLS checks turned off
- J14: downloads piped into a shell
- J15: shared libraries loaded without a version or from a branch
- J16: --privileged containers or the Docker socket mounted
- J17: input steps without a submitter
- J18: free-text build parameters interpolated into shell commands
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason and safer approach for each rule
- A risky and a safe example pipeline, and the real report the scanner produces on the risky one
Limits It reads each file as written: jobs set up in the Jenkins UI, parameters defined only in job settings, Job DSL, Configuration as Code and plugin versions are not checked. NOT FLAGGED is not a guarantee.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.
Static check of Groovy pipeline text. Jobs configured in the Jenkins UI and the controller's own settings are not checked. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example pipeline includes a clearly fake, inert token (not-a-real-...) for the scanner to find. It is never run.