/** * Pure L3 skill security scanner (spec): runs stable, low-false-positive * detectors over one in-memory SkillEntry — description, SKILL.md body, and * sorted files. Never reads the filesystem, never executes scanned scripts, * never scans beyond the single entry handed to it. * @module dsh-continual-harness */ import type { DiagnosticProvider, SecurityIssue, SkillEntry } from './types.ts'; /** Hard internal findings cap per scanSkillBundle call (spec §4); not configurable. */ export declare const MAX_FINDINGS = 100; /** Thrown when scanSkillBundle hits MAX_FINDINGS; carries the issues collected so far. */ export declare class ScanTruncatedError extends Error { readonly issues: SecurityIssue[]; readonly code = "findings-truncated"; constructor(issues: SecurityIssue[]); } /** Scan options: an optional abort signal checked between scan blocks. */ export interface ScanOptions { signal?: AbortSignal; } /** * Scan one skill entry (spec §3.2). Order is stable: description (file * 'SKILL.md', no line), SKILL.md body (file 'SKILL.md', 1-based lines), the * legacy reference/arguments fields (file 'SKILL.md', no line — they reach the * model overview without a separate file), then files sorted by relative path * (1-based lines). Does not scan version, updatedAt, or provenance metadata. */ export declare function scanSkillBundle(skillId: string, entry: SkillEntry, options?: ScanOptions): SecurityIssue[]; /** * Post-apply diagnostics adapter (spec §3.3): scans only * `request.touchedSkillIds` and aggregates findings per skill. A * ScanTruncatedError from any skill keeps that skill's findings and still * lets later touched skills scan; the aggregated truncation is re-thrown so * the runner records a `findings-truncated` error with all collected issues. */ export declare const securityProvider: DiagnosticProvider; //# sourceMappingURL=scan.d.ts.map