Skip to content

Diligent 0.2.1: developer integration

Choose a tag to compare

@github-actions github-actions released this 20 Oct 14:20
· 1 commit to main since this release

Developer integration lands: SARIF output for code scanning, a reusable GitHub Action, baseline and diff for backlog management, and Storybook component mode. The native gate and rules validator run through the companion binary when it is present, source-pass template support covers JSX, Vue, Svelte, Astro, Twig and Liquid, and 45 engine-informed rules were reviewed against primary sources and promoted to draft.

Added

  • diligent audit --storybook <url> audits the stories of a built Storybook (7 or 8) as components: each sampled story is captured and assessed with the element-level checks, whole-page obligations are recorded as not tested, a component gate sets the exit code, and COMPONENT-BASELINE.json records each story. A component audit is not a site claim. diligent-rs assess --component and checks list --json (scope) support it. See docs/storybook-mode.md.
  • diligent sarif --run <id> | --dir <run-dir> [--out <file>] [--baseline <file>] emits SARIF 2.1.0 from a run so results can be uploaded to GitHub code scanning. Every fail and needs_review check result becomes a SARIF result with a stable fingerprint, the rule's obligation text as its description, and the lifecycle note carried into the result. Hand-authored FINDINGS.json entries are emitted alongside when present. See docs/sarif.md.
  • diligent baseline write --run <id> --out <file> records the fingerprints of a run, and diligent diff --run <id> --baseline <file> [--fail-on new|any|none] partitions a later run into new, known, resolved and unverified. A team can accept a backlog and block only new problems. With --baseline, diligent sarif marks each result new or unchanged. See docs/baseline-diff.md.
  • diligent-rs infra --preload-lookup asks hstspreload.org whether the registrable domain is on the Chromium HSTS preload list and records the answer as inference evidence on the INFRA-02-hsts-preload row. Off by default; the Node orchestrator does not pass it in this release.
  • A reusable GitHub Action (uses: Simple-Cortex/diligent@<tag>, action.yml at the repository root) audits one URL on a Linux x86-64 runner, downloads the companion binary from the release and verifies it against SHA256SUMS, uploads the SARIF file to code scanning and the audit directory as an artifact, and fails the job only on the condition you choose (fail-on: gate | new | any | none). baseline-out writes a baseline for a write-on-main, diff-on-pull-request pair. See docs/github-action.md.
  • diligent-rs source scan reads .jsx, .tsx, .vue, .svelte, .astro, .twig and .liquid files as well as HTML, and every finding now carries a source line, a column and a byte offset when the file contains the element. Expressions, components and attribute spreads are opaque and turn a result into needs_review; a template with no html or body tag is treated as a fragment and skips document-level checks. SARIF results for these findings point at the file and line. See docs/source-pass.md.
  • plugins/vite-plugin-diligent-src is a Vite plugin that adds data-diligent-src="<file>:<line>" to native elements in JSX, Vue, Svelte and Astro files during development, and diligent-rs assess records the attribute as a source_ref on the finding it belongs to. The plugin lives in the repository and is not part of the npm package.
  • npm run shadow:rules compares diligent rules validate in Node against the companion binary over 25 mutation cases and fails on any difference. CI runs it on every push.
  • diligent-rs gate ports the regulatory gate to the companion binary. npm run shadow:gate runs the Node gate and the binary over every gate fixture, including a real audit directory from a GitHub runner, with and without --json, and fails on any difference in exit code, output, ASSESSMENT.json, EVENTS.jsonl or RUN.json. The Node gate stays authoritative. See docs/rust-shadow-notes.md.

Changed

  • 45 engine-informed rules were reviewed against their primary sources (clause locator, modality word, baseline id) and promoted from research to draft; FED-12 and INFRA-12 stay at research. Four modality words changed (FED-05 shall, FED-08 must, FED-18 must, FED-29 should). review-packet.mjs gained apply, and promote now refuses a rule whose clause locator is still unatomized. See docs/review/2026-10-20-source-review-packet.md.
  • Authority A43 (OMB M-15-13) now points at the archived memo; https.cio.gov no longer resolves.
  • The gate's limitation sentence and the claim boundary no longer say Diligent runs no automated website checks; they say automated checks run only through the separately installed diligent-rs binary, in both the Node and native gates.
  • diligent gate and diligent rules validate run the diligent-rs binary when one reporting protocol 1 is present and fall back to the Node scripts otherwise; DILIGENT_ENGINE=node forces Node, and diligent --version --json lists the delegated commands. Argument errors from diligent-rs gate now carry the diligent: prefix to match Node.
  • Artifact and rules-data JSON parse errors no longer quote the JavaScript engine's message; they read <file>: not valid JSON so the Node and native outputs match.