jenkins-lint
Catch Jenkinsfile mistakes before they break your CI, without a Jenkins
controller: no server, no Docker, no JVM. One small binary checks Groovy
syntax, Declarative Pipeline structure and security, and reports errors with
the same wording as Jenkins's own validator. --remote also validates the
files with your Jenkins, which knows its plugins.
$ jenkins-lint Jenkinsfile
Jenkinsfile:2:5: error: Not a valid section definition: "agent". Some extra configuration is required.
Jenkinsfile:9:9: error: Expected one of "steps", "stages", or "parallel" for stage "Test"
Jenkinsfile:14:36: high: script-injection: CHANGE_BRANCH is the name of the pull request's branch, and Groovy interpolates it into the sh script: ...
help: https://jenkinsci.github.io/jenkins-lint/rules/script-injection/
1 finding (1 high)
Install
pip install jenkins-lint # or: pipx install jenkins-lint, uv tool install jenkins-lint
PyPI has prebuilt wheels for Linux (x86_64, aarch64, i686, armv7; glibc and
musl), macOS (x86_64, arm64) and Windows (x86_64, x86). They hold only the
jenkins-lint binary, which needs no Python to run. On other platforms pip
builds it from the sdist, which needs a Rust toolchain.
As a pre-commit hook:
repos:
- repo: https://github.com/jenkinsci/jenkins-lint
rev: # the latest version
hooks:
- id: jenkins-lint
Documentation: https://jenkinsci.github.io/jenkins-lint/. Source and design notes: https://github.com/jenkinsci/jenkins-lint.
Build and run
cd crates/jenkins-lint
cargo build --release
./target/release/jenkins-lint path/to/Jenkinsfile [more files or directories...]
./target/release/jenkins-lint --output-format json Jenkinsfile
Exit code is 0 when no file has an error or a finding, 1 when any does,
and 2 for usage errors. Warnings do not fail the run.
--output-format json prints one object per file:
[{"file": "Jenkinsfile", "declarative": true, "diagnostics": [
{"line": 2, "column": 5, "severity": "error", "message": "Not a valid section definition: ..."}],
"findings": [], "fixed": []},
{"file": "vars/notify.groovy", "declarative": false, "diagnostics": [], "findings": [], "fixed": []},
{"file": "missing", "error": "No such file or directory (os error 2)"}]
declarative is false when the file has no pipeline block (a Scripted
Pipeline, a shared-library step, plain Groovy): its Groovy syntax was checked,
but there was no Declarative structure to check.
What it checks
- Groovy syntax, including every string form (
'...',"${...}", triple-quoted, slashy, dollar-slashy), command calls with named arguments (sh script: 'ls', returnStdout: true), trailing closures,@Library(...) _, method and class definitions. - Declarative structure: required
agentandstages; allowed and duplicate sections; each stage has exactly one ofsteps,stages,parallelormatrix; no nestedparallel/matrix;agentforms and built-in agent parameters;environmentkeys and values;options,triggers,parameters,tools,libraries,input;whenconditions and their nesting;postconditions;matrixaxes and excludes; steps that are blocked in Declarative (stage,properties, mixedparallel);pipeline {}inside the block of another step (node { pipeline { } }).
What it cannot check
Anything that depends on the plugins installed on a controller:
- whether a step exists and takes the given parameters,
- agent types added by plugins (reported as a warning, not an error),
- tool installations configured on the controller,
- script-security sandbox rules.
Use jenkins-lint --remote with your Jenkins for those.
How close is it to the official validator?
The pipeline-model-definition plugin ships the test Jenkinsfiles for Jenkins's own validator. Running jenkins-lint over them:
| Result | |
|---|---|
| Valid files with no false errors | 287 / 287 |
| Invalid files caught | 90 / 90 |
| ... with the same message as Jenkins | 90 / 90 |
| Invalid files that need plugins or a controller to judge | 33 (not counted above) |
Reproduce with:
cargo build --release
python3 scripts/corpus_check.py # clones the plugin at a pinned commit
Development
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
python3 scripts/corpus_check.py
pip install . # builds the wheel with maturin and installs it
A release bumps version in Cargo.toml, and the version and the
jenkins-lint== pin in the root pyproject.toml with it:
scripts/check_version.py checks that they agree.
cargo test also lints every case in tests/jenkins/ and compares the
result with tests/jenkins/expected.txt, which records what Jenkins's own
validator said about the same file and explains each known difference.
Metadata
Release files for jenkins-lint 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jenkins_lint-2.0.0.tar.gz | 153.0 kB | With provenance | Details for jenkins_lint-2.0.0.tar.gz |
Built distributions (wheels)
Total release size: 18.1 MB
Release files / jenkins_lint-2.0.0.tar.gz
| Download URL | jenkins_lint-2.0.0.tar.gz |
|---|---|
| Size | 153.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a105a3c93b6d66f36de6e82ff2094482805c70380d3da2f4748bc87dd1bb0b97
|
|
BLAKE2b-256 checksum How to use checksums |
96f387b1c6ca9712b4d64ad482bbac3c96ee32fe1f7fd5124848518af750e339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-win_amd64.whl
| Download URL | jenkins_lint-2.0.0-py3-none-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4b3dabd74f6d972295231ac175275a0117d14bfdab100462a5fc591c7e77a39c
|
|
BLAKE2b-256 checksum How to use checksums |
f125ef6448fa048a1672c3f3c2a3946eee99ad3e470ed3982b5a9a375dbbd6cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-win32.whl
| Download URL | jenkins_lint-2.0.0-py3-none-win32.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
e2e68adaced214ba4e5b0cb02b1d0da3545c8bf28cc5ec6d83d9c89206647a39
|
|
BLAKE2b-256 checksum How to use checksums |
89a80c6c3f03540deeeba13b6760a514d421ff35b8aa1c68274e481684d7752f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | jenkins_lint-2.0.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
d7eccd2376a3a04d0d06084e752a6287cbb889400fe6476158335aa72a119368
|
|
BLAKE2b-256 checksum How to use checksums |
df7d3b1dc66b449b278661534667a7b2862b060704415db7747f4c999f36adb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-musllinux_1_2_i686.whl
| Download URL | jenkins_lint-2.0.0-py3-none-musllinux_1_2_i686.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux musl 1.2+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
b866a5c69de13c79f1cf09a96b3ebf8fb083692b7ddb98aae95db68abe2dc936
|
|
BLAKE2b-256 checksum How to use checksums |
cf75e4660529189b2551c4f913da560d1e431e0750287314f3be6b5681cc594a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-musllinux_1_2_armv7l.whl
| Download URL | jenkins_lint-2.0.0-py3-none-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Linux musl 1.2+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
e0ccc9cc934da6daf8fa9c5f3fb3c92711770d9dad5f9c8ec43c0dc8ded1b41c
|
|
BLAKE2b-256 checksum How to use checksums |
6bd139b3a7b277580d7a2e66983b825e2c2852cc26c34a341fe7f84632543372
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | jenkins_lint-2.0.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
a97f87b9889bc1c63827019441d7c46e8eadecdd33bde2008ea26887bb9ac7df
|
|
BLAKE2b-256 checksum How to use checksums |
d8b72eedc0a216620a80a5acd5e526cd0da499f87225a21af5755a64d00e4068
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | jenkins_lint-2.0.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
eb2fae0c57536849f7effc92c70763a160f355df2e5cfd1cdfddceeb827f8f50
|
|
BLAKE2b-256 checksum How to use checksums |
2d0472fd02f1fb943905f1635294b91b2bcf52beed49e299af3bffddf673ecc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
| Download URL | jenkins_lint-2.0.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux glibc 2.17+ x86-32 Python 3 |
|
SHA-256 checksum How to use checksums |
9dcdaf394108a9069600cd5a50edbe81a15ba00a657489fc2ffa1a03e2207da8
|
|
BLAKE2b-256 checksum How to use checksums |
1f7fd0b69bfa122537b8a08cdbb704989d998b4362fe949d8abd45bb98167c9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | jenkins_lint-2.0.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Linux glibc 2.17+ ARMv7l Python 3 |
|
SHA-256 checksum How to use checksums |
ef2abbac39dae90110e7421742613f689c245a261e764c53b3226cb03f2bd53a
|
|
BLAKE2b-256 checksum How to use checksums |
e77ff5465d2d3c58a17927551cb237ce165334590c7a6ac65b5c4f21ca56de77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | jenkins_lint-2.0.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
84e0453a16d2d2a396a81093d6a8b49add56258c19f81ebff1109962236c76fb
|
|
BLAKE2b-256 checksum How to use checksums |
09e17f33554e179392d5d0b5ef53d504936c998535f5293741ec3dd60f1afae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-macosx_11_0_arm64.whl
| Download URL | jenkins_lint-2.0.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
81cff9d054b71fc29a6851fc19b2171287fb7c7de75cab63f97e45d10009aff4
|
|
BLAKE2b-256 checksum How to use checksums |
a116191707bdcde6584b6e1d33ba9684cd14e307a43c6f72c50d8c05a20b17f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / jenkins_lint-2.0.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | jenkins_lint-2.0.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
be395fb9bf26d57d0749c17f329fcff71efac1a4c1e924ccfb36ba8de6c5ea13
|
|
BLAKE2b-256 checksum How to use checksums |
5749a04e92e669744cdcb6f8ecff175ce11c3ffd2fb99e66de0f084640b08ab5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for jenkins-lint 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 13 files in this release have been uploaded with provenance metadata.
Attestation for jenkins_lint-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.