Skip to content

chore(github): Dependabot also watches the release image's base and the composite action - #544

Merged
DrunkOnJava merged 2 commits into
mainfrom
chore/dependabot-docker-composite
Sep 30, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
chore/dependabot-docker-composite

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Dependabot now also watches the release container image's base (docker/Dockerfile) and the composite action under .github/actions, which it did not before. Nothing in the crate, the CLIs or the viewer changes.

Motivation

A sweep of the repository's dependency manifests (five Cargo.toml files, pyproject.toml, viewer/package.json, docker/Dockerfile, .github/actions/fetch-corpus/action.yml) against .github/dependabot.yml found two that nothing kept current:

  • docker/Dockerfile pins gcr.io/distroless/static-debian13:nonroot@sha256:.... The digest pin is right (a moving tag would change the image without a commit), but with no docker entry nothing proposed a newer digest, so the container image published with each release would keep the base it was first built on, including its CA certificates and tzdata.
  • .github/actions/fetch-corpus/action.yml pins actions/cache and actions/checkout by SHA. The github-actions entry looked only at /, which is .github/workflows, so the composite action's pins could fall behind the workflows' own.

The other manifests are covered or deliberately not: pyproject.toml only has a range (maturin>=1.0,<2.0), and tools/ci/witness-ifc-lite pins its third-party witness to an exact version on purpose (OctetProof 9.6; bumping it means updating the witness registry), while its lockfile is in the dependency graph (ifc-lite-core 7.1.1 is in the repository's SBOM), so the alerts cover it.

Changes

  • .github/dependabot.yml: the github-actions entry takes directories: [/, /.github/actions/*]; a new docker entry for /docker, weekly, labelled dependencies and docker, with the same deps commit prefix. The file validates against the vendored Dependabot schema (check-jsonschema --builtin-schema vendor.dependabot).
  • The docker label is created (colour 0db7ed), since the repository's audit checks that every label Dependabot applies exists.
  • docs/maintaining.md: what Dependabot watches, and that the witness crate gets alerts but no version updates.

Testing

No product code changes.

  • check-jsonschema --builtin-schema vendor.dependabot .github/dependabot.yml: ok
  • Required checks pass on GitHub's runners
  • Not checked by this pull request, and read after it merges: that Dependabot opens (or reports nothing to open for) the docker and composite-action entries on its next run, in the repository's Dependabot insights

Audit-honesty checklist

  • Not established here: whether the distroless digest already is the newest (Dependabot's first run says), and whether Dependabot's directories glob /.github/actions/* matches fetch-corpus as documented
  • No emojis, private paths or PII

Legal and contribution hygiene

  • Apache-2.0
  • No Autodesk content
  • No fixtures

Breaking changes

None.

Related issues

None.


Note

Low Risk
Configuration and documentation only; no runtime, auth, or product code changes.

Overview
Dependabot coverage is expanded so two previously unwatched manifests get weekly update PRs: the release image’s digest-pinned distroless base in docker/Dockerfile, and SHA-pinned actions inside composite actions under .github/actions/*.

The github-actions entry switches from a single root directory to directories: [/, /.github/actions/*] so workflow pins and composite-action pins stay in sync. A new docker ecosystem entry targets /docker with the same weekly schedule, dependencies/docker labels, and deps commit prefix as the other ecosystems.

docs/maintaining.md is updated to list Cargo (crate + fuzz), GitHub Actions (workflows + composite actions), viewer npm, and the release image base, and to note that tools/ci/witness-ifc-lite receives alerts but no automated version bumps because its witness is intentionally pinned.

Reviewed by Cursor Bugbot for commit 0c8c24d. Configure here.

…he composite action

Two things the repository pins were outside Dependabot's configuration:

- docker/Dockerfile pins its distroless base by digest
  (gcr.io/distroless/static-debian13:nonroot@sha256:...), and nothing
  proposed a newer digest, so the release container image would keep the
  base it was first built on. A `docker` ecosystem entry for /docker now
  opens a weekly pull request for it, labelled `dependencies` and `docker`
  (the label is created).
- .github/actions/fetch-corpus/action.yml pins actions/cache and
  actions/checkout by SHA, and the `github-actions` entry only looked at
  /.github/workflows. It now covers `/` and `/.github/actions/*`.

tools/ci/witness-ifc-lite stays out: its third-party witness is pinned to an
exact version on purpose (OctetProof 9.6), and its lockfile is in the
dependency graph, so the alerts cover it. docs/maintaining.md lists what
Dependabot watches and what it does not.
@DrunkOnJava DrunkOnJava added area:github Work in the github area. priority:P3 Useful follow-up work after core milestones land. type:ci Continuous integration or automation work. labels Sep 30, 2026
@cursor

cursor Bot commented Sep 30, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_f18610e2-5a49-474f-bbc7-0c3f94754567)

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 30, 2026 16:53
@DrunkOnJava
DrunkOnJava merged commit 51af585 into main Sep 30, 2026
22 checks passed
@DrunkOnJava
DrunkOnJava deleted the chore/dependabot-docker-composite branch September 30, 2026 17:07
DrunkOnJava added a commit that referenced this pull request Sep 30, 2026
…ks that Dependabot covers every lockfile

Main's health. #536 made the check read each workflow's latest run from two
differently shaped REST queries, on the reasoning that a stale answer only
hides newer runs. Within the hour the same Fuzz failure from 2026-09-06
came back: both queries of the pair were stale at once, and a minute later
every query shape was fresh. The REST runs list, filtered by branch, cannot
be trusted in any shape, so the check now reads the check suites of main's
last 100 commits through GraphQL, which reads the primary store: a workflow
run is attached to the commit that was main's head when it ran, and each
suite carries its event, status and conclusion. Only push and scheduled runs
count, a cancelled or skipped suite says nothing, and a workflow whose last
run is older than 100 commits is not judged. Checked against seven crafted
answers (a failure, a fix after it, a cancelled run after a failure, a
manual failure, an unfinished newest run, no runs, a GraphQL error) and the
live repository.

Dependabot's coverage. New check: every Cargo.lock, npm lockfile,
Dockerfile and composite action in the repository tree must be under an
update entry in .github/dependabot.yml, or be listed in the script as
deliberately unwatched (the witness crate's exact pin). Run against main
before #544 it named exactly the two gaps #544 closes, docker/Dockerfile and
.github/actions/fetch-corpus/action.yml.
DrunkOnJava added a commit that referenced this pull request Sep 30, 2026
… through GraphQL and checks Dependabot's coverage (#545)

## Summary

Adds `tools/maintainer/clean_caches.py`, which deletes the GitHub
Actions caches nobody can use again, and gives the audit (#534, #536)
three corrections and additions: its cache check adds up the list of
caches, its check of `main`'s health reads check suites through GraphQL,
and a new check that Dependabot watches every lockfile, Dockerfile and
composite action. Nothing in the crate, the CLIs or the viewer changes.

## Motivation

Three findings from running the audit on 2026-09-30.

**The cache was at 9.1 GB of the 10 GB limit, and most of it was dead.**
GitHub evicts the least recently used cache past the limit, so a cache
that sits near it leaves no room to see a real problem. The chore was a
scratch script the first time (1,195 caches of closed pull requests, in
#529); this keeps it, and finds what that script never looked for:
`main`'s own superseded generations. rust-cache saves a cache per
toolchain and lockfile hash, so every lockfile change (every Dependabot
merge) leaves the previous generation behind, never read again, at about
200 MB each for the larger families.

| | caches | size |
|---|---|---|
| before | 1,180 | 9.1 GB |
| closed pull requests and deleted branches | 220 | 0.45 GB |
| superseded rust-cache generations on `main` (up to eight per family) |
36 | 4.49 GB |
| after | 926 | 4.2 GB |

The audit read `actions/cache/usage`, which still said 9.1 GB for
minutes after the deletions, so it now adds up the list of caches.

**The REST runs list lied twice in an hour, and #536's fix did not
hold.** #536 had the check ask each workflow for its latest run with two
differently shaped queries, on the reasoning that a stale answer only
hides newer runs. Later the same `Fuzz: failure` from 2026-09-06 (run
34030881111) came back: both queries of the pair were stale at once, and
a minute afterwards every shape of the query was fresh again. A filtered
runs list cannot be trusted in any shape. Check suites read through
GraphQL (`repository.ref.target.history.nodes.checkSuites.workflowRun`)
come from the primary store; a run is attached to the commit that was
`main`'s head when it ran, and the suite carries its event, status and
conclusion.

**Dependabot skipped two things the repository pins.** #544 adds the
`docker` ecosystem for `docker/Dockerfile` and the composite action's
directory; it was found by listing the repository's manifests by hand.
The audit now does that listing.

## Changes

- `tools/maintainer/clean_caches.py`: lists the caches, the open pull
requests and the live branches, and deletes a cache if its ref is a pull
request that is not open, a branch that no longer exists, or a
rust-cache generation on `main` older than the newest two of its family
(`--keep N`). The caches of `main`'s newest generations, of live
branches, of open pull requests and of tags are kept. A dry run unless
given `--delete`, which paces the deletions and backs off on 429 and
403.
- `tools/maintainer/audit.py`: the cache check sums `actions/caches`;
`main_green` reads the check suites of `main`'s last 100 commits through
GraphQL (only push and scheduled runs, a cancelled or skipped suite says
nothing, and a workflow whose last run is older than 100 commits is not
judged); the new `dependabot_coverage` check lists every `Cargo.lock`,
npm lockfile, `Dockerfile` and composite action in the repository tree
and fails for each that is under no entry of `.github/dependabot.yml`,
except the witness crate's lockfile, which is pinned on purpose.
- `docs/maintaining.md`: the housekeeping items name the tool and the
coverage.
- `CHANGELOG.md`.

## Testing

No product code changes. The tools run against the live repository are
the evidence.

- [x] `clean_caches.py`, dry run: `1180 caches, 9.1 GB; 256 unusable
(4.9 GB), 4.2 GB kept`; with `--delete`: `deleted 256, already gone 0,
failed 0`; dry run after: `926 caches, 4.2 GB; 0 unusable (0.0 GB), 4.2
GB kept`
- [x] `main_green` against seven crafted GraphQL answers (scratch probe,
output below): a failed scheduled run fails; a failure fixed by a later
success is ok; a cancelled run after a failed one leaves the failure
standing; a manual failure is ignored; an unfinished newest run leaves
the failure before it standing; no runs is ok; a GraphQL error is
`skipped`
- [x] `dependabot_coverage` on `main` before #544: `FAIL
docker/Dockerfile (docker) is not in .github/dependabot.yml;
.github/actions/fetch-corpus/action.yml (github-actions) is not in
.github/dependabot.yml`, exactly the two gaps #544 closes
- [x] `python3 tools/maintainer/audit.py` on this branch brought up to
date with `main` (which has #544): `12 of 12 checks ok`, including the
GraphQL check of `main` and `ok Dependabot watches every lockfile,
Dockerfile and composite action, or the audit says why not`
- [x] Required checks pass on GitHub's runners (the merge waits for
them: auto-merge is armed on them)

```
newest scheduled run failed                                    -> FAIL    Fuzz: failure
failed then fixed: the newest is a success                     -> ok
a cancelled run after a failed one: the failure still counts   -> FAIL    CI: failure
a manual run failed: not main                                  -> ok
the newest run is still in progress: the failure before it counts -> FAIL    CI: failure
no runs at all                                                 -> ok
GraphQL answers with errors                                    -> skipped boom
```

## Audit-honesty checklist

- [x] What this does not establish: that GraphQL is never stale. It was
fresh in every call made today, and `gh pr checks` reads check suites
the same way, but nothing here proves it; if it ever lies, the check
will say something false in the same way
- [x] What this does not establish: that the two newest generations of a
cache family are always enough for a build to restore from. rust-cache
restores the newest cache that matches its key prefix, and the
generations kept are the most recently accessed, but a cold family can
lose its only cache to the next run; it rebuilds, which costs minutes,
not correctness
- [x] The cleaner is destructive only with `--delete`, and only for
caches GitHub would evict first anyway
- [x] No emojis, private paths or PII

## Legal and contribution hygiene

- [x] Apache-2.0
- [x] No Autodesk content
- [x] No fixtures

## Breaking changes

None.

## Related issues

Follows #534, #536 and #544.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:github Work in the github area. priority:P3 Useful follow-up work after core milestones land. type:ci Continuous integration or automation work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant