Repository navigation
Earnie CLI 0.3.0
Added
-
earnie mcp setup(and--hooks) now installs a session-start hook for
Claude Code, Cursor and Codex that refreshes the Earnie policy block in
AGENTS.md,CLAUDE.mdor.cursor/rules/earnie.mdc. It replaces only what
lies between the<!-- earnie:policies:start ... -->and
<!-- earnie:policies:end -->markers, does nothing when the server's set
revision equals the block's, never creates a block setup did not write, and
never fails a session: an unreachable server adds at most about three
seconds, and a timeout or a missing key leaves the file untouched and logs
to stderr. Claude Code and Codex run it onstartupandresumeonly;
Cursor has no matcher. Edits made inside the managed block are overwritten
the next time the revision changes, and edits to the markers themselves stop
the refresh.earnie mcp doctorreports hooks that predate it
(policy_refreshin--json), andearnie mcp uninstallremoves it with
the other hooks. Rerunearnie mcp setup --hooksto add it to an existing
checkout. -
earnie export --freshalways generates a new SBOM snapshot. -
The generated triage models carry new optional crypto evidence fields: per
call-chain framelibrary(module, version, purl),entry_resolutionand
entry_declared_type; per chaindependency_pathandroot_kind; the
call_paths_total/call_paths_keptroute counts; theroute_evidence
tier (direct,dispatch,name_only) andno_callers_onlyflag;
dependency_provenance(the dependency'sdirectortransitive
relationship and declared path, each step markedwithout_sourcewhen it
was scanned without source); and theunresolved_dispatchand
dependency_without_sourceunknown reasons. No CLI command renders them yet.
Changed
-
Behaviour change for CI scripts:
earnie mcp doctorand
earnie mcp setup --checknow exit 9, not 2, when they find a problem. 2 is
the gate Require code. A script that treated doctor's exit 2 as "problems
found" must test for 9. Exit 0 (healthy) is unchanged. -
Behaviour change for CI scripts:
earnie mcp reviewnow exits from the
review's gate likescanandverdict: 1 for Block, 2 for Require, 0 for
Pass, Warn and None, and 3 (fail closed) when the review did not complete,
for example because it is still running, or its gate is an error or unknown.
It used to exit 0 whatever the gate said, so a CI step could not fail on a
blocked review. -
earnie exportno longer generates a new SBOM snapshot on every run. It
downloads the scan's latest snapshot that has the requested--bom-format
and the sections you named with--include, or, without--include, the
default sections the server reports for your key and plan, so a crypto-only
or AI-only snapshot is never returned in place of the default export. It
generates one only when none matches, when the server does not report its
default sections, or when the project's review state changed since the
latest snapshot (stale), saying so on stderr;--quietsilences the note. -
Server: crypto findings in a project whose dependencies do not resolve (no
lockfile or build file) now readreachableorunreachableinstead of
unknown, because the scan traces the project's own source. A policy on
reachable crypto can therefore start to fire on such a project, and
earnie scanreports it.
Fixed
-
EARNIE_SKIP_REVIEWis read as a boolean.1,true,yesandonskip the
review;0,false,noand an empty value no longer do. Any non-empty
value used to skip, soEARNIE_SKIP_REVIEW=0silently disabled the review. -
Usage errors now exit 8, as documented, instead of 3:
earnie mcp review
without exactly one selector,earnie scan diffwithout--base, an unknown
or duplicate--client,--globalwith--project,--checkwith
--dry-run,--hooksand--no-hookstogether, a missing API URL in
mcp setupandmcp doctor, and unreadablemcp hookinput or a missing
--client. Hook adapters stay clear of exit 2, which Claude Code and Cursor
read as "block", so their input errors cannot block an agent. -
earnie exporton a project whose latest scan finished before SBOM evidence
was kept now fails with the error codescan_evidence_unavailableand a
message telling you to run a new scan. The server used to answer HTTP 500,
which the CLI reported as a retryableapi_unavailable, so a retry could
never succeed. -
Server: SBOM documents from
earnie exportand theearnie_export_bomtool
keep the licence the scan detected next to a concluded one: adeclared
entry beside theconcludedone in CycloneDX, andlicenseDeclaredin SPDX
(it readNOASSERTION). -
Server: SBOM documents name Earnie and the server build as the generating
tool (earnieand its version). They named the SBOM library (scanoss,
versiondev).