@dointhai/owlwarden-sdk
v1.1.0
Published
Types and zod schemas for owlwarden reports, rules, and coverage. Install `owlwarden` to run the scanner.
Maintainers
Readme
@dointhai/owlwarden-sdk
Types and zod schemas for owlwarden output. Install this if you consume owlwarden's JSON — a dashboard, a bot, a CI gate of your own — rather than just running the CLI.
npm i @dointhai/owlwarden-sdkimport { reportSchema, type Report } from "@dointhai/owlwarden-sdk";
const report: Report = reportSchema.parse(JSON.parse(stdout));
for (const finding of report.findings) {
console.log(finding.id, finding.severity, finding.location.path);
}The schemas are not a hand-written description of the engine's output. A test in the repository serialises a report from the Rust engine and parses it with these schemas, so the two cannot drift: if the engine changes a field and this package does not, the build fails. See ADR 0010.
What is worth reading before you branch on it
suppressedCountexists so thatfindings: []is never mistaken for "no problems". Zero findings with a non-zero suppressed count means someone made a judgement call you may want to look at.confidenceisconfirmed,likely, orpossible. Static analysis cannot produceconfirmed; only correlation with a live probe can. Treatpossibleas "worth a human's attention", not "broken".truncatedmeans limits were hit and the report is incomplete. A truncated report always fails the CI gate (shouldFail/--ciexit 1).- Rule ids are permanent. Safe to hard-code, reference in config, and store.
Licence
MIT OR Apache-2.0.
