Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .agent-eval/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends git make ca-cer
RUN git config --system user.name "Eval Contributor" && git config --system user.email "contributor@example.com"
COPY dokimi/requirements.lock.txt dokimi/requirements-ci.lock.txt dokimi/requirements.txt \
dokimi/requirements-test.txt /opt/dokimi-req/
# The lock and the tools CI installs (uv among them), hash-checked so a rerun grades alike.
RUN pip install --no-cache-dir --require-hashes -r /opt/dokimi-req/requirements.lock.txt \
# The lock and the tools CI installs (uv among them), hash-checked so a rerun grades alike;
# --no-deps because the locks are the full closure (SECURITY.md says why it matters for filelock).
RUN pip install --no-cache-dir --no-deps --require-hashes -r /opt/dokimi-req/requirements.lock.txt \
-r /opt/dokimi-req/requirements-ci.lock.txt
ENV UV_CACHE_DIR=/opt/uv-cache UV_PYTHON_PREFERENCE=only-system UV_LINK_MODE=copy
RUN uv venv --python 3.11 --seed /tmp/warm && uv pip install --python /tmp/warm/bin/python \
--require-hashes -r /opt/dokimi-req/requirements.lock.txt -r /opt/dokimi-req/requirements-ci.lock.txt \
--no-deps --require-hashes -r /opt/dokimi-req/requirements.lock.txt -r /opt/dokimi-req/requirements-ci.lock.txt \
&& rm -rf /tmp/warm && chmod -R a+rwX /opt/uv-cache
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
4 changes: 2 additions & 2 deletions .github/workflows/agent-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
cache-dependency-path: dokimi/requirements.lock.txt
- name: Install deps
if: steps.changes.outputs.code == 'true'
run: pip install --require-hashes -r requirements.lock.txt
run: pip install --no-deps --require-hashes -r requirements.lock.txt
- name: Clone uxlfoundation/skills (pinned commit, retried)
if: steps.changes.outputs.code == 'true'
run: |
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
cache: pip
cache-dependency-path: dokimi/requirements.lock.txt
- name: Install deps
run: pip install --require-hashes -r requirements.lock.txt
run: pip install --no-deps --require-hashes -r requirements.lock.txt
- name: Run benchmark
run: |
python cli.py run --root . --spec benchmarks/spec.v1.yaml \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ jobs:
python-version: '3.13'
cache: pip
cache-dependency-path: dokimi/requirements.lock.txt
- run: pip install --require-hashes -r requirements.lock.txt -r requirements-ci.lock.txt
- run: pip install --no-deps --require-hashes -r requirements.lock.txt -r requirements-ci.lock.txt
- name: mypy
run: mypy
# The CLI snapshot, on the pinned Python: its content check (tests/test_cli_flags.py)
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:
# The lock, not the ranges: a PR's result should not depend on what was
# released upstream that morning. test-latest below watches the ranges.
- name: Install deps
run: pip install --require-hashes -r requirements.lock.txt
run: pip install --no-deps --require-hashes -r requirements.lock.txt
# Offline by construction: pytest-socket (addopts in pyproject.toml) fails
# any test that opens a network socket. --outcomes also checks the user
# outcomes in tests/outcomes/: an evidence id that no test claims fails the
Expand Down Expand Up @@ -486,7 +486,7 @@ jobs:
smoke="$PWD/scripts/smoke_installed.py"
cd "$RUNNER_TEMP" && python "$smoke"
- name: Install test deps
run: python -m pip install --require-hashes -r requirements.lock.txt
run: python -m pip install --no-deps --require-hashes -r requirements.lock.txt
# test_runs_scan.py holds the only junction test of the runs-root containment; it runs on Windows only.
- name: Run a few fast tests
run: pytest -q tests/test_cli_help.py tests/test_console_encoding.py tests/test_runs_scan.py tests/test_runs_show.py
2 changes: 1 addition & 1 deletion .github/workflows/cli-interface.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
with:
python-version: '3.13'
- name: Install dependencies
run: pip install -r requirements.lock.txt
run: pip install --no-deps -r requirements.lock.txt
# The base is the merge base of HEAD and the base branch, as in the other
# diff-against-base steps: on CI that is the merge commit's own base, even if
# the base branch moved on since. git archive, not a worktree: no git state changes.
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
fail-on-severity: high
# The filelock advisories SECURITY.md documents; tests/test_advisory_lists.py
# keeps them in sync with pip-audit.yml and dokimi/osv-scanner.toml.
allow-ghsas: GHSA-567q-5qvw-pf92,GHSA-6627-m3xw-93mp,GHSA-69hj-f68j-2879,GHSA-8mx5-7m5m-r77g,GHSA-9c4x-gm8v-wgc4,GHSA-9j6q-wvj5-jgjg,GHSA-9vhv-jxww-xfm5,GHSA-cwqr-hh33-gh44,GHSA-fq56-3cx3-fjxp,GHSA-j8f7-rjxc-mr56,GHSA-m462-7rxw-wvpg,GHSA-rfpc-qcw5-3pc4,GHSA-v4x8-3wr5-3wq8
# The summary only: a PR comment would need pull-requests: write,
# which a fork PR's token does not have.
comment-summary-in-pr: never
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
dokimi/requirements-docs.lock.txt
# The locks, not the ranges, as in ci.yml: a PR's result should not depend on
# what was released upstream that morning.
- run: pip install --require-hashes -r requirements.lock.txt -r requirements-docs.lock.txt
- run: pip install --no-deps --require-hashes -r requirements.lock.txt -r requirements-docs.lock.txt
- name: mkdocs build
run: mkdocs build --strict
- if: github.event_name != 'pull_request'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# The runtime lock for the tests, and mutmut's own lock (requirements-mutation.txt),
# which no other workflow installs.
- name: Install deps
run: pip install --require-hashes -r requirements.lock.txt -r requirements-mutation.lock.txt
run: pip install --no-deps --require-hashes -r requirements.lock.txt -r requirements-mutation.lock.txt
- name: Run mutmut
# Crashes are reported below, not failed on. The step timeout sits inside the job's 90 minutes, so the summary
# step still runs; a job-level timeout would fail the whole job instead.
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/pip-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,15 @@ jobs:
- name: Install tools
run: pip install --require-hashes -r requirements-ci.lock.txt
# Full-closure locks, so --no-deps --disable-pip audits them as written; markers are stripped (3.13 skips false ones).
# Each --ignore-vuln is in SECURITY.md and osv-scanner.toml: add or drop it in all three, together.
# An --ignore-vuln added here goes into SECURITY.md, osv-scanner.toml and dependency-review.yml too.
- name: pip-audit
run: |
sed -e 's/ *\\$//' -e 's/ *;.*//' \
requirements.lock.txt requirements-docs.lock.txt requirements-ci.lock.txt \
requirements-mutation.lock.txt | sort -u \
| awk -F'==' '/^[A-Za-z0-9]/ { print > (ENVIRON["RUNNER_TEMP"] "/pins" seen[$1]++ ".txt") }'
for f in "$RUNNER_TEMP"/pins*.txt; do
pip-audit -r "$f" --no-deps --disable-pip --progress-spinner off \
--ignore-vuln GHSA-v4x8-3wr5-3wq8 \
--ignore-vuln GHSA-9vhv-jxww-xfm5 \
--ignore-vuln GHSA-567q-5qvw-pf92 \
--ignore-vuln GHSA-j8f7-rjxc-mr56 \
--ignore-vuln GHSA-cwqr-hh33-gh44 \
--ignore-vuln GHSA-9c4x-gm8v-wgc4 \
--ignore-vuln GHSA-6627-m3xw-93mp \
--ignore-vuln GHSA-m462-7rxw-wvpg \
--ignore-vuln GHSA-69hj-f68j-2879 \
--ignore-vuln GHSA-8mx5-7m5m-r77g \
--ignore-vuln GHSA-9j6q-wvj5-jgjg \
--ignore-vuln GHSA-rfpc-qcw5-3pc4 \
--ignore-vuln GHSA-fq56-3cx3-fjxp
pip-audit -r "$f" --no-deps --disable-pip --progress-spinner off
done

# A scheduled run that finds an advisory opens one issue (or comments on the
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/repo-eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ jobs:
DOKIMI_REPO: ${{ inputs.dokimi-repository }}
run: |
# The lock is hashed, and pip cannot hash a git URL: install the lock, then dokimi without deps.
pip install --require-hashes -r "https://raw.githubusercontent.com/$DOKIMI_REPO/$SHA/dokimi/requirements.lock.txt"
pip install --no-deps --require-hashes -r "https://raw.githubusercontent.com/$DOKIMI_REPO/$SHA/dokimi/requirements.lock.txt"
pip install --no-deps "dokimi @ git+https://github.com/$DOKIMI_REPO@$SHA#subdirectory=dokimi"
- name: repo validate
env:
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
DOKIMI_REPO: ${{ inputs.dokimi-repository }}
run: |
# The lock is hashed, and pip cannot hash a git URL: install the lock, then dokimi without deps.
pip install --require-hashes -r "https://raw.githubusercontent.com/$DOKIMI_REPO/$SHA/dokimi/requirements.lock.txt"
pip install --no-deps --require-hashes -r "https://raw.githubusercontent.com/$DOKIMI_REPO/$SHA/dokimi/requirements.lock.txt"
pip install --no-deps "dokimi @ git+https://github.com/$DOKIMI_REPO@$SHA#subdirectory=dokimi"
# Report only: a failing claim does not fail the job (an unreadable
# manifest still does). The table lists the failing claims.
Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
DOKIMI_REPO: ${{ inputs.dokimi-repository }}
run: |
# The lock is hashed, and pip cannot hash a git URL: install the lock, then dokimi without deps.
pip install --require-hashes -r "https://raw.githubusercontent.com/$DOKIMI_REPO/$SHA/dokimi/requirements.lock.txt"
pip install --no-deps --require-hashes -r "https://raw.githubusercontent.com/$DOKIMI_REPO/$SHA/dokimi/requirements.lock.txt"
pip install --no-deps "dokimi @ git+https://github.com/$DOKIMI_REPO@$SHA#subdirectory=dokimi"
# Builds the image from the manifest's Dockerfile (the tree without its
# tasks), then grades the null and the oracle workspace in it.
Expand Down
7 changes: 5 additions & 2 deletions dokimi/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ CI additionally holds a PR to:
[traceability](docs/user-journeys/traceability.md#what-the-check-enforces).
- **Docs build** — `mkdocs build --strict`, from `dokimi/`. `make dev` already
installs its packages and `make ci-local` runs it; by hand, install them with
`pip install -r requirements.lock.txt -r requirements-docs.lock.txt`. It fails on
`pip install --no-deps -r requirements.lock.txt -r requirements-docs.lock.txt`. It fails on
a link or `#anchor` between pages that does not resolve, on a link into the
source tree whose file does not exist (an anchor into such a file is not
checked), and on a list that nests differently on the site than on GitHub
Expand Down Expand Up @@ -180,7 +180,10 @@ PyPI. The mutation workflow adds mutmut's closure
nothing else installs, and pip-audit audits with the others. When you change a range in
`requirements*.txt`, regenerate the lock with the command in its header: run it
from `dokimi/`, and add `--upgrade` to pick up new versions (without it, uv
keeps the current pins). The command's `--exclude-newer=P7D` skips releases
keeps the current pins). The main and tools lock headers pass
`--override=requirements-overrides.txt`, which keeps filelock at 4.2.1 or later
against litellm's declared cap, and so every install of `requirements.lock.txt`
passes `--no-deps` (`SECURITY.md` says why). The command's `--exclude-newer=P7D` skips releases
less than 7 days old; if a security fix is newer than that, its vulnerability PR
fails to resolve, so regenerate the lock by hand without the flag. The docs lock
and the tools locks (`requirements-ci.lock.txt`, `requirements-mutation.lock.txt`) are constrained to the main one,
Expand Down
2 changes: 1 addition & 1 deletion dokimi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ validate-benchmark-spec:
# added to CI is picked up here). The lock goes first: ci_local.py needs PyYAML.
dev:
uv venv --python $(PYTHON_VERSION) --seed --allow-existing $(VENV_ABS)
uv pip install --python $(VPY) -r requirements.lock.txt
uv pip install --python $(VPY) --no-deps -r requirements.lock.txt
uv pip install --python $(VPY) $$($(VPY) scripts/ci_local.py tools)

# Every step of the PR workflows, in file order, from each step's own cwd. It
Expand Down
83 changes: 23 additions & 60 deletions dokimi/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,56 +46,20 @@ The project is pre-1.0; only the latest `main` is supported. Fixes land on

`pip-audit` against the locks (`requirements.lock.txt`,
`requirements-docs.lock.txt`, `requirements-ci.lock.txt` and
`requirements-mutation.lock.txt`) reports these advisories with no
fix the locks can take:

- **filelock 3.32.7 — thirteen advisories** (fixed in 4.2.1, GHSA-j8f7-rjxc-mr56
in 4.0.9). Every litellm release requires `filelock<4.0`, so neither fix can be
locked. datasets, huggingface-hub and litellm (main lock) and cachecontrol,
python-discovery and virtualenv (tools lock) take `FileLock`, which is
`UnixFileLock` on Linux and macOS and `WindowsFileLock` on Windows. On a Unix
filesystem without `flock`, filelock turns that lock into a `SoftFileLock`
itself. huggingface-hub switches to a `SoftFileLock` when `FileLock` raises
`NotImplementedError`, but neither class raises it on its own platform
(`WindowsFileLock` reports a failed open as `OSError`), so that code never
runs. Their lock directories are the Hugging Face cache
(`~/.cache/huggingface` unless `HF_HOME` moves it) and the tools' user cache
and data directories. Drop all thirteen when litellm allows
`filelock>=4.2.1`.
- In the SQLite-backed `ReadWriteLock`, which no dependency of Dokimi uses:
GHSA-v4x8-3wr5-3wq8 and GHSA-9vhv-jxww-xfm5 (CVE-2026-112940,
CVE-2026-112913; POSIX and Windows), GHSA-j8f7-rjxc-mr56 (CVE-2026-112936;
it follows a symlink at the lock path into SQLite) and GHSA-cwqr-hh33-gh44
(CVE-2026-112915; a crafted lock database stalls every acquire).
- In `StrictSoftFileLock` and `SoftReadWriteLock`, which no dependency of
Dokimi uses: GHSA-9c4x-gm8v-wgc4 (CVE-2026-112911; both adopt a protocol
directory another account created). In `StrictSoftFileLock` only:
GHSA-6627-m3xw-93mp (CVE-2026-112908; claim directories created without the
lock's mode) and GHSA-m462-7rxw-wvpg (CVE-2026-112938; it follows a symlink
swapped in at `<path>.filelock`).
- In `UnixFileLock`, GHSA-69hj-f68j-2879 (CVE-2026-112909): another local
account that can rename or hard-link a file of the lock user onto a lock path
not yet created makes the next acquire truncate that file and, with an
explicit `mode` (huggingface-hub passes `0o664` and `0o666`), chmod it. It
applies where another account can rename files in the lock directory, such
as a Hugging Face cache several accounts share.
- In `WindowsFileLock`, GHSA-8mx5-7m5m-r77g (CVE-2026-112910): it ignores
`mode`, so the lock file takes the directory's inherited ACL. Where that ACL
lets another account read new files (a cache outside the user profile on a
shared Windows host), that account can hold the lock and stall a holder.
- In the soft locks on Windows, which no dependency of Dokimi takes:
GHSA-567q-5qvw-pf92 (CVE-2026-112907; another local account that can create
files in the lock directory can stall or break a lock holder).
- In `SoftFileLock` where it stands in for a missing `flock` on Unix:
GHSA-9j6q-wvj5-jgjg (CVE-2026-112912, low) tells another account that can
write the lock directory whether a path exists and is writable for the lock
user; GHSA-rfpc-qcw5-3pc4 (CVE-2026-112939) lets an account that can write a
holder's marker but not remove it forge the holder's PID and admit a second
holder (the marker takes the lock's `mode` less the umask, so
huggingface-hub's markers are group-writable under umask `002`); and
GHSA-fq56-3cx3-fjxp (CVE-2026-112935) admits two holders when an account
that can create files in the lock directory gets a stale-lock break to meet
a reused inode (ext4, xfs).
`requirements-mutation.lock.txt`) reports no advisory.

The locks pin filelock 4.2.4 although every litellm release up to 1.106.6
declares `filelock<4.0`. filelock 3.32.7, the newest version under that cap, has
thirteen advisories, all fixed in 4.2.1. litellm lifted the cap on its main
branch (`filelock<5`, BerriAI/litellm#49137) but has not released it yet, and its
own code calls only `FileLock(path, timeout=..., mode=...)`, which 4.x keeps. So
both lock headers pass `--override=requirements-overrides.txt`
(`filelock>=4.2.1`), and every install that includes `requirements.lock.txt`
passes `--no-deps`: the locks are the full closure, and pip's resolver would
otherwise refuse litellm's declared cap (`pip check` reports that one mismatch).
`pip install dokimi` outside the locks still resolves a filelock below 4 until
litellm releases the change. Drop the override file and those `--no-deps` flags
once a litellm release allows filelock 4.

The locks do not contain ragas: it is the optional `[ragas]` extra (`eval ragas`,
`answers generate --ragas`), which installs ragas 0.3.9 and diskcache 5.6.3. Their
Expand All @@ -117,14 +81,13 @@ The `ragas>=0.3.0` floor keeps out 0.2.3–0.2.x, which are affected by
CVE-2025-45691 (GHSA-v2xr-wvrv-p969, file read through `retrieved_contexts`,
fixed in 0.3.0).

`.github/workflows/pip-audit.yml` runs `pip-audit` against the locks with exactly
the thirteen filelock IDs ignored, on every PR or push that changes a lock or requirements file and daily
on `main`; a daily run that finds a new advisory opens an issue rather than
`.github/workflows/pip-audit.yml` runs `pip-audit` against the locks with no
advisory ignored, on every PR or push that changes a lock or requirements file and
daily on `main`; a daily run that finds a new advisory opens an issue rather than
failing unrelated PRs. The `static` job in `.github/workflows/ci.yml` runs
`bandit -ll` with no Medium or High finding allowed.
The same IDs are ignored by osv-scanner through `dokimi/osv-scanner.toml`,
which OpenSSF Scorecard runs, and by `allow-ghsas` in
`.github/workflows/dependency-review.yml`, which fails a PR that adds or moves a
dependency to a version with any other High or Critical advisory. A removed
advisory comes out of the first list above, the `pip-audit` step, that file and
`allow-ghsas` together.
`bandit -ll` with no Medium or High finding allowed. An advisory Dokimi has to
accept is explained in this section and ignored in three places together: the
`pip-audit` step, `dokimi/osv-scanner.toml` (which OpenSSF Scorecard runs) and
`allow-ghsas` in `.github/workflows/dependency-review.yml`, which fails a PR that
adds or moves a dependency to a version with a High or Critical advisory;
`tests/test_advisory_lists.py` keeps the three in step.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Security

- **The locks pin filelock 4.2.4**, which fixes the thirteen filelock 3.32.7 advisories
that `pip-audit`, osv-scanner and dependency review ignored. Every litellm release still
declares `filelock<4.0` (its main has lifted it), so both lock headers pass
`--override=requirements-overrides.txt` and every install of `requirements.lock.txt`
passes `--no-deps`. No advisory is ignored anymore. Drop the override and `--no-deps`
once a litellm release allows filelock 4.
Loading
Loading