governance.Pintypeno test imports ittype Pin = { readonly version: string; readonly path: string; readonly sha256: string };The pin of one tool.
The pin of a scanner's binary: its version, where it is and the SHA-256 of the file. A tool is run only when the file at the pin's path has the pinned digest: a tool that was replaced, updated in place or never pinned is refused, and so is one whose pin is missing a field. The pins are the tenant's and an owner's approval is a commit that holds them; nothing here installs a tool or fetches one.
import { parsePins } from "./pins.ts";
parsePins({ nuclei: { version: "3.3.0", path: "/opt/tools/nuclei", sha256: "a".repeat(64) } }).kind; // "ok"governance.Pintypeno test imports ittype Pin = { readonly version: string; readonly path: string; readonly sha256: string };The pin of one tool.
governance.Pinstypeno test imports ittype Pins = Readonly<Record<string, Pin>>;The pins of a tenant, by tool.
governance.parsePinsfunctionno test imports itfunction parsePins(data: unknown): Result<Readonly<Record<string, Pin>>, readonly string[]>The pins from data, or every reason it is refused.
Pintypeno test imports ittype Pin = { readonly version: string; readonly path: string; readonly sha256: string };The pin of one tool.
Pinstypetype Pins = Readonly<Record<string, Pin>>;The pins of a tenant, by tool.
parsePinsfunctionfunction parsePins(data: unknown): Result<Readonly<Record<string, Pin>>, readonly string[]>The pins from data, or every reason it is refused.