@dtifx/audit
v5.0.1
Published
Policy-driven governance engine with audit runners, evidence capture, and actionable compliance reports.
Maintainers
Readme
Overview
@dtifx/audit is the governance engine for the DTIFx Toolkit. It evaluates policy manifests against
resolved DTIF tokens, surfaces structured violations, and integrates with the shared CLI for
repeatable compliance checks.
Installation
pnpm add -D @dtifx/cli @dtifx/audit
# or
npm install --save-dev @dtifx/cli @dtifx/auditThe package supports Node.js 22 or later. Pair it with @dtifx/build when policies need to inspect
resolved artefacts from the build pipeline.
Usage
Command line
pnpm exec dtifx audit run --config ./dtifx.config.mjs
pnpm exec dtifx audit run --reporter markdown --reporter json
pnpm exec dtifx audit run --json-logs --telemetry stdoutManifest configuration defines policy registries, reporter plans, and telemetry exporters. The
stdout telemetry exporter streams runtime metrics to standard output for local inspection or CLI
composition. See the Audit governance guide for a complete
walkthrough.
Node.js API
import { createAuditRuntime, createPolicyConfiguration } from '@dtifx/audit';
const configuration = createPolicyConfiguration({
policies: [
/* policy factories */
],
reporters: [
/* reporter entries */
],
});
const runtime = createAuditRuntime({ configuration });
const report = await runtime.run();
console.log(report.summary.totalFindings);The runtime emits structured diagnostics, making it straightforward to plug results into logging or observability pipelines.
