Skip to content

ci: add a full-tree license scan for both ecosystems - #175

Merged
voyvodka merged 1 commit into
mainfrom
ci/full-tree-license-scan
Aug 10, 2026
Merged

ci: add a full-tree license scan for both ecosystems#175
voyvodka merged 1 commit into
mainfrom
ci/full-tree-license-scan

Conversation

@voyvodka

Copy link
Copy Markdown
Owner

dependency-review has two structural blind spots: it only inspects dependencies that change in a pull request, and its matcher silently passes a crate whose license string it cannot parse. unescaper carried a GPL arm in the tree unnoticed for exactly the second reason — it declared the deprecated GPL-3.0/MIT slash syntax, which the parser could not read, until upstream rewrote it as real SPDX in 0.1.10 and it suddenly failed a PR.

This adds the backstop that check cannot be.

What it does

  • Cargocargo deny check licenses against src-tauri/deny.toml. cargo-deny parses every entry in Cargo.lock as an SPDX expression, so a dual MIT OR GPL-3.0-only correctly resolves to its MIT arm, and anything unparseable fails loudly instead of sailing through.
  • npmlicense-checker-rseidelsohn --onlyAllow over the production tree.

Weekly on Monday (same day as Dependabot), plus a PR trigger scoped to lockfiles and this config, plus workflow_dispatch.

It found two licenses on its first run

Both benign, both now explicitly allowed rather than silently passing:

License Crate/package Why it is fine
CDLA-Permissive-2.0 webpki-root-certs via reqwestrustls-platform-verifier The root CA bundle — permissive data license, no copyleft
OFL-1.1 @fontsource/ibm-plex-mono / -sans SIL Open Font License; a font license, never reaches the application's terms

Neither had ever appeared in a dependency-review run, because neither is GPL-shaped and the check is a deny-list.

Note on the allow-lists

The Cargo list includes MPL-2.0 because serialport — a direct dependency — is MPL-2.0. That is file-level weak copyleft and already shipped; the list records reality rather than changing it.

Unused allowances were removed, so cargo-deny stays quiet and a genuinely new license surfaces as a failure rather than hiding among warnings.

Validation

Both checks run clean locally: cargo deny check licenseslicenses ok (exit 0), and the npm checker exits 0 across the production tree.

dependency-review only inspects dependencies that CHANGE in a pull request, and
its matcher silently passes a crate whose licence string it cannot parse — which
is how unescaper's GPL arm sat in the tree unnoticed until upstream rewrote the
deprecated slash syntax as real SPDX. This is the backstop that check
structurally cannot be.

It found two licences on its first run that the deny-list had never surfaced,
both benign and both now explicitly allowed rather than silently passing:
CDLA-Permissive-2.0 (webpki-root-certs, the root CA bundle via reqwest) and
OFL-1.1 (the bundled IBM Plex fonts).

Weekly rather than per-PR, since dependency-review already gates changed
dependencies; the PR trigger is scoped to lockfile and config edits.
@voyvodka
voyvodka merged commit 62c6a15 into main Aug 10, 2026
10 of 11 checks passed
@voyvodka
voyvodka deleted the ci/full-tree-license-scan branch August 10, 2026 13:30
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.

1 participant