Skip to content

build: add modrot dependency-archival audit target#5683

Merged
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:feat/audit-modrot
Jul 23, 2026
Merged

build: add modrot dependency-archival audit target#5683
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:feat/audit-modrot

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

What

Add make audit modrot, a new report-only scanner in the audit family. It
runs modrot recursively over
the backend go.mods — src/jetstream, src/jetstream/api, and every plugin
module — in a single pass, flagging archived and deprecated GitHub
dependencies (a supply-chain rot signal the existing vuln scanners don't
cover).

Details

  • Report-only (|| true), gated on which modrot, matching every other
    make audit target.
  • Wired through the existing register / WANT / FLAG modifier machinery, the
    no-op target list, and KNOWN_MODS, plus the header and make help lines.
  • Not in the default make audit set: modrot needs gh auth token +
    network (GitHub GraphQL), which the offline default scanners don't. It's a
    standalone extra, like tree / history / licenses.
  • Flags: --recursive --deprecated --resolve (archived and deprecated deps;
    --resolve maps vanity imports like google.golang.org/grpc to their
    GitHub repo so they're actually checked).

CI wiring (a token + the shared tools image) is deferred to the pipeline work;
this PR adds the make target only, runnable locally today.

Verification

make audit modrot runs clean and reports (found archived deps incl.
golang/mock, mitchellh/mapstructure). make audit (default) excludes it;
make audit backend modrot composes correctly; no parse warnings.

Add `make audit modrot`, a report-only scanner that runs modrot over the
backend go.mods (jetstream + api + every plugin module, one recursive pass)
to flag archived and deprecated GitHub dependencies. Wired through the same
register/WANT/FLAG machinery as the other audit modifiers, plus the no-op
target and KNOWN_MODS entry.

It needs `gh auth token` + network (GitHub GraphQL), so it is a standalone
extra and is NOT part of the default `make audit` set.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - modrot will be updated later to provide go.mod line numbers and and SARIF output.

@norman-abramovitz
norman-abramovitz merged commit bb4615a into cloudfoundry:develop Jul 23, 2026
22 checks passed
@nabramovitz
nabramovitz deleted the feat/audit-modrot branch July 23, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants