Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

docattest

Latest version: v0.6.1

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
PyPI package Publisher: matthammond96
1 Stars
0 Forks
19 Versions
2.5K Downloads
Rust Repo language

Scan summary

docattest was last scanned on 24 Nov 2026 at version 0.6.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 19 versions; the latest 5 were published on 24 Nov 2026.
  • Findings: No rules fired in version 0.6.1.
  • Downloads: 2,514 downloads.

Versions

19 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.1 LATEST 24 Nov 2026 No rules fired
0.6.0 24 Nov 2026 No rules fired
0.5.4 24 Nov 2026 No rules fired
0.5.3 24 Nov 2026 Not shown
0.5.2 24 Nov 2026 Not shown

No rules fired in 0.6.1

Findings

Findings for v0.6.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.6.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

docattest for Python

docattest for Python projects: documentation that CI can fail. Your Markdown pages carry examples that run, facts that are compared with values in your code, tables whose rows are tests, and citations of tests you already have.

Try it in your browser first: the playground lets you break a small project's code and watch docattest catch its docs.

Python 3.10 or newer. Standard library only: no dependencies, and Node is never needed.

Install

pip install docattest

The prebuilt docattest core comes inside the wheel for macOS, Linux (glibc and musl) and Windows, so nothing is downloaded when docattest runs.

Quick start

  1. Run docattest init at the project root to detect your pages and Python surface, write docattest.config.json, and run an initial gap audit against your existing docs.
  2. Run docattest audit --apply to bind matching claims automatically, or add proofs to a page (see A page below).
  3. Run docattest check. It exits 1 when a page and the code disagree.

Wire up coding agents (AGENTS.md, hooks, and a concise Python skill) in one command:

docattest init --agents --hooks --skill

A page

This page documents the small shop library that this package's tests use (tests/fixture/), and this guide checks it inside a copy of that project:

# Pricing

A discount is a whole percentage taken off a price.

```python check
from shoplib import Money, apply_discount

assert apply_discount(Money(1000), 25) == Money(750)
```

The same as an interpreter session:

```pycon check
>>> from shoplib import Money, total
>>> total([Money(1000)], "NL")
Money(cents=1210, currency='EUR')
```

Prices are in `EUR` unless told otherwise. <!-- fact: DEFAULT_CURRENCY -->

Tax is known for these regions: <!-- fact: TAX_RATES -->
- `NL`
- `DE`
- `FR`

<!-- cases: discount -->
| case           | price | percent | result |
|----------------|-------|---------|--------|
| a quarter off  | 1000  | 25      | 750    |
| rounds half up | 999   | 50      | 500    |

Discounts above the maximum are refused. <!-- test: tests/test_pricing.py > "TestTotals" > "test_rejects_big_discounts" -->
docattest check          # exit 1 when a page and the code disagree
docattest uncovered      # exports no page attests
docattest where total    # the pages, lines and sentences that attest a symbol
docattest audit          # lists, tables and values that look copied from the code, with no directive
docattest impact         # after an edit: the exports it affects and the prose that names them

A failing proof is reported with its line, what the page expected and what the code gave. The same project has a page that is wrong on purpose, once for each way a proof can fail:

$ docattest check --quiet docs/broken.md
docs/broken.md
  ✗ L5 example: AssertionError: expected Money(cents=700, currency='EUR'), got Money(cents=750, currency='EUR') (block line 3)
  ✗ L11 example: `quote("NL")`: expected 2, got 1 (block line 2)
  ✗ L17 example: cannot import name 'aply_discount' from 'shoplib' (src/shoplib/__init__.py) (block line 1)
  ✗ L21 example: ShopError: No carrier serves the region (block line 2)
  ✗ L26 example: timed out after 3000 ms
  ✗ L31 example: URLError: <urlopen error network access is disabled for attestations; tag the block `check network` to allow it> (block line 2)
  ! L36 example: example at L36: unknown tag "chekc"; did you mean "check"?
  ✗ L40 fact: expected 60, got 50 from MAX_DISCOUNT
  ✗ L42 fact: missing: DE, FR; unexpected: BE (2 items on the page, 3 in TAX_RATES)
  ! L46 fact: fact `_round(0.5)`: _round is not exported by surface "default" (NameError: name '_round' is not defined)
  ✗ L51 cases: docs/broken.md:51 wrong on purpose: AssertionError: expected '800', got '750'
  ✗ L52 cases: docs/broken.md:52 too much: ShopError: The discount is outside the allowed range
  ! L54 cases: cases runner "nope" at L54 is not in `cases` of docs/docattest_setup.py (known: discount, delivery)
  ! L59 test: tests/test_pricing.py declares no test "test_that_was_renamed"; tests there: "test_discount_rounds_half_up", "TestTotals" > "test_adds_tax", "TestTotals" > "test_rejects_big_discounts"
FAILED
[exit 1]

Configure

docattest.config.json at the project root:

{
  "pages": ["README.md", "docs/**/*.md"],
  "sources": ["src/**/*.py"],
  "surfaces": { "default": "shoplib" },
  "setup": "docs/docattest_setup.py",
  "adapter": "python"
}
  • surfaces name what pages are allowed to observe. An entry is

    • a module name, "shoplib" or "shoplib.shipping": imported as written. It is looked for in the project root, then in src/, then wherever import finds it;
    • a path, "./src/shoplib" or "./shoplib/shipping.py": that file of the project, imported under the name Python gives it (src/shoplib/shipping.py is shoplib.shipping: the path from the first directory without an __init__.py);
    • both, { "import": "shoplib", "path": "build/lib/shoplib/__init__.py" }: examples import import, and it is read from path.

    A surface may be a program, a __main__.py ("shopd": "./src/shopd/__main__.py"): importing it would run it, so its constants are all that facts read of it (see Facts, below).

  • What a surface exports is its __all__ when that is written out as a list. Otherwise it is the module's public names: every function, class and assigned name that does not start with _, and, in a package's __init__.py, what it imports from its own package (from .pricing import total is a re-export; import os is not). uncovered lists the exports no page attests.

  • sources are the Python files whose docstrings hold examples (see below).

  • setup is a Python module with the runners of cases tables and named facts.

How the package works

This package is what a Python user installs. It provides two commands:

  • docattest, the command you run. It is a launcher: it finds the docattest core (one binary for every language, which reads the pages and writes the report), tells it how to start the Python adapter and what command runs docattest in your project, and becomes it.
  • docattest-adapter-python, the adapter: the program that answers everything that needs Python. It speaks version 1 of the adapter protocol. You do not run it yourself.

The distribution is called docattest . Its import packages are docattest (the launcher) and docattest_python (the adapter).

The core comes inside the wheel: there is one wheel for each of 5 platforms, py3-none-<platform> (the Python code is pure; only the core is native), and pip picks the one built for your machine. Nothing is downloaded when docattest runs, and Node is never needed.

platform name wheel tags
macOS 11+ on Apple silicon darwin-arm64 macosx_11_0_arm64
macOS 10.12+ on Intel darwin-x64 macosx_10_12_x86_64
Linux x86-64, glibc or musl linux-x64 manylinux_2_17_x86_64, manylinux2014_x86_64, musllinux_1_1_x86_64
Linux arm64, glibc or musl linux-arm64 manylinux_2_17_aarch64, manylinux2014_aarch64, musllinux_1_1_aarch64
Windows x64 windows-x64 win_amd64

The name is the platform's in every docattest package: the npm package and the Go archive that carry its core are called by it too.

The Linux core is a static binary, so one wheel serves glibc and musl (Alpine) alike. There is no source distribution, because it could not build the core: on any other platform pip install docattest finds nothing to install, rather than installing a docattest that cannot run. An install from a checkout (pip install -e adapters/python, for development) has no core either; its first run says so, names your platform, and says to install the wheel or set DOCATTEST_CORE.

python3 adapters/python/build_wheel.py --out <dir> --core <platform>=<binary> builds the wheels from cores built for each platform (the release workflow runs it; see CONTRIBUTING.md, "Releasing"). It needs nothing but the standard library and pip, which fetches setuptools for the build.

The launcher looks for the core in three places, in this order, the same as the npm package does:

  1. DOCATTEST_CORE , the path of a core binary. It is asked for its version (--version --json) and refused when it speaks another protocol than this package, or does not answer.

    $ DOCATTEST_CORE=/bin/echo python3 -m docattest check
    docattest: DOCATTEST_CORE (/bin/echo) is not a docattest core: it does not answer --version --json
    [exit 1]
  2. docattest/bin/docattest inside this package (docattest.exe on Windows): where the wheel for your platform carries it.

  3. <cache>/core/<version>/<name>/docattest, a cache shared with the npm package, where <name> is the platform's name from the table above. The version is the one in docattest_python/protocol/core.json, which this package pins. <cache> is:

on set cache
any system DOCATTEST_CACHE=/mine /mine
macOS ~/Library/Caches/docattest
Linux XDG_CACHE_HOME=/x /x/docattest
Linux XDG_CACHE_HOME=relative ~/.cache/docattest
Linux ~/.cache/docattest
Windows LOCALAPPDATA=C:\Local C:\Local\docattest
Windows ~\AppData\Local\docattest

XDG_CACHE_HOME counts only when it is an absolute path, as the XDG specification says.

DOCATTEST_TRACE=1 makes the launcher say which core it runs.

From a checkout of the repository, without installing anything:

cargo build --release --manifest-path core/Cargo.toml
export DOCATTEST_CORE="$PWD/core/target/release/docattest"
export PYTHONPATH="$PWD/adapters/python"
python3 -m docattest check --root adapters/python/tests/fixture

docattest init --hooks, init --git-hook and init --agents write down a command that runs docattest without Node: the virtualenv's own script when the virtualenv is inside the project, else docattest when that is the script the PATH finds, else the script by its full path, else this interpreter by its full path (python -m docattest). AGENTS.md is committed, so a full path is never written there: it gets docattest instead. The launcher knows no coding agent. For a virtualenv inside the project it says {root}/.venv/bin/docattest, and the core writes the root as the reader of the command names it: "$CLAUDE_PROJECT_DIR"/.venv/bin/docattest impact --hook in a hook of Claude Code (its descriptor's projectRoot), ./.venv/bin/docattest in AGENTS.md and in a git hook. Set DOCATTEST_COMMAND to have it write something else (uv run docattest).

Any agent, or none, can use the two plain commands, from anywhere inside the project: docattest impact --file <path> after an edit and docattest check before finishing. docattest init --hooks --agent gemini (or cursor, or a descriptor file of your own) installs hooks for another agent; docs/agents.md has the details.

A bare core, run without the launcher, finds the adapter as docattest-adapter-python on the PATH, or through DOCATTEST_ADAPTER_PYTHON : a JSON array (["python3", "/path/to/adapters/python/bin/docattest-adapter-python"]) or a command line split on spaces.

What each attestation means in Python

Examples: python check, python compile

Blocks tagged python, py, python3, py3 or pycon are the adapter's.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases docattest

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229