Skip to main content
zoll

Rego policies for every file in a repository, and for the code hidden inside it.

PyPI CI License

English | Русский

Code hidden inside other code is read by nothing until it runs: awk in a shell string, a script in a YAML run:, a RUN line in a Dockerfile, a command: in a Kubernetes manifest. conftest sees data formats only; a linter sees one language. zoll parses every file - data formats into their document, code into its syntax tree - finds the code embedded in it, and runs your Rego policies over all of it.

zoll check reports curl piped into a shell, at its line in a workflow's run: step

Highlights

  • 50 languages, one run. Data formats become the document conftest would give your policy; code becomes its tree-sitter tree.
  • Code inside code. Bash in a workflow run:, awk in that bash, a script in a Markdown fence: each is checked as a file of its own, to any depth, and reported at its line in the real file.
  • conftest's policies run as they are. YAML, JSON and TOML give the documents conftest gives; a package main is bound to its language by one line of config.
  • Policies from git, pinned. A policy set kept in its own repository is fixed to its commit in zoll.lock.
  • Reports for people and for machines: text, JSON, GitHub annotations, SARIF.
  • One binary, no OPA. Rego is evaluated in process; the wheel holds everything.

How it works

.github/workflows/ci.yml          yaml   → package yaml policies
└── jobs.build.steps[0].run       bash   → package bash policies
    └── awk '{print $1}'          awk    → package awk policies
  1. Each file's language comes from its name, extension or shebang.
  2. Data formats (YAML, JSON, TOML…) become the document conftest would give your policy - with YAML read as YAML 1.2, so on: stays on; code becomes its tree-sitter tree, as JSON.
  3. Code embedded in it is found by where it sits - the argument of awk, the value of run: - and is checked as a file of its own, to any depth.
  4. A policy in package bash runs on bash wherever it is: a .sh file, a run:, a Dockerfile RUN. A conftest policy's package main is bound to its language by one line of config, and runs with its file untouched.
  5. Every violation is reported at its line in the real file.

A policy

policy/bash.rego, found with no config at all:

package bash

# A pipe into a shell downloads and runs code nobody reviewed.
deny_curl_pipe contains {"msg": "curl piped into a shell", "at": node} if {
	walk(input, [_, node])
	node.type == "pipeline"
	some cmd in node.children
	cmd.type == "command"
	cmd.fields.name.text == "curl"
}

It finds the pipe in a workflow's run:, as the picture above shows: the bash there is a file of its own to it.

zoll inspect FILE prints the JSON a policy sees for that file and every fragment in it, so a rule is written against the real shape.

Configuration

zoll.toml, .zoll.toml, or [tool.zoll] in pyproject.toml:

[tool.zoll]
policies = [
  "policy/",
  "git+https://github.com/my-org/policies//embedded-code@v1.0.0",
]
data = ["policy/data/"]

Policies from git are pinned to their commit in zoll.lock; zoll lock --upgrade moves them on purpose.

A result is silenced by a comment on its line, or for a glob in the config:

curl -fsSL https://example.com/install.sh | sh  # zoll: ignore[bash.curl_pipe]
[tool.zoll.per-file-ignores]
"scripts/legacy/**" = ["bash.curl_pipe"]

One that silences nothing is reported, so a dead one does not linger.

Install

uv tool install zoll-lint

The command is zoll; the PyPI name zoll is taken by a look-alike. Wheels are built for Linux (x86_64, aarch64), macOS (x86_64, arm64) and Windows.

In CI

On GitHub, each violation becomes an annotation on its line:

steps:
  - uses: actions/checkout@v7
    with:
      persist-credentials: false
  - uses: astral-sh/setup-uv@v10
  - run: uvx --from zoll-lint zoll check --format github

License

MIT. The grammars and crates built into the binary keep their own licenses.

Metadata

Release files for zoll-lint 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zoll-lint 0.1.0
File Size Uploaded Provenance Actions
zoll_lint-0.1.0.tar.gz 1.5 MB Without provenance Details for zoll_lint-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for zoll-lint 0.1.0
File Actions
zoll_lint-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for zoll_lint-0.1.0-py3-none-win_amd64.whl
zoll_lint-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for zoll_lint-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
zoll_lint-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for zoll_lint-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
zoll_lint-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for zoll_lint-0.1.0-py3-none-macosx_11_0_arm64.whl
zoll_lint-0.1.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for zoll_lint-0.1.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 46.5 MB

Release files / zoll_lint-0.1.0.tar.gz

Download URL zoll_lint-0.1.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
f505aa144e23c1570852196e45e03a289b1fdf7ac46f981bbe6961666547ca08
BLAKE2b-256 checksum
How to use checksums
7baa12e1ed52b3d43513192192d3e1c3a592cb8e7ad2d887d8ce7314dfc3735b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / zoll_lint-0.1.0-py3-none-win_amd64.whl

Download URL zoll_lint-0.1.0-py3-none-win_amd64.whl
Size 9.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c83594bde16c5525bc9beacaf0098f866720f8904fd94274d313625f28d63419
BLAKE2b-256 checksum
How to use checksums
151d2df84dbc85742608b06098b1c6218600693825525c0df06a70ec8e837819
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / zoll_lint-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL zoll_lint-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 9.1 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
d54c44a39a9dd9bad45003958733467d45306a225665a9bc4112356d3fdee6af
BLAKE2b-256 checksum
How to use checksums
1607a8ba15423bdca199525dac51617d004028fc2ed7abfefa596bbe4e0dffc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / zoll_lint-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL zoll_lint-0.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 8.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
a80000139955fac90cab9c88bc01d6e752322c58b3bae8c31ada1c3c0c992545
BLAKE2b-256 checksum
How to use checksums
7f2dd3360a8cb56df7e7347b0855f6dd283879c2def93a261c470e440f2b1eb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / zoll_lint-0.1.0-py3-none-macosx_11_0_arm64.whl

Download URL zoll_lint-0.1.0-py3-none-macosx_11_0_arm64.whl
Size 9.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
36422a259546d1139f6d5ce114c26af49987fad1f6233a7b99fa301b4472f381
BLAKE2b-256 checksum
How to use checksums
1737ec8bef9f6f7b223a25b3ca81ed714570ae93f6adb9a6d5ce264b70b6b1d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / zoll_lint-0.1.0-py3-none-macosx_10_12_x86_64.whl

Download URL zoll_lint-0.1.0-py3-none-macosx_10_12_x86_64.whl
Size 8.9 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
52f524efe51ae3027598f0e1b1014287651caf5b29b24e4013b1c1ce94e75eea
BLAKE2b-256 checksum
How to use checksums
10c148da8fe3eed61cfafc5fed3df81d480d542e95a65a4dcb92015bb47f9b39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for zoll-lint 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page