@moonbooth/security
v0.3.0
Published
Moonbooth security library: secret scanning, package policy checks, injection heuristics
Maintainers
Readme
@moonbooth/security
Security checks for Moonbooth capability packages. The library scans package files for secrets before a package is published or accepted, and reports each finding with a kind, a severity, and the file it was found in.
The scan combines pattern matching for known credential shapes with an entropy check on long strings. Findings at the blocking severities stop a transfer in the Moonbooth service; the same functions run locally in the CLI.
Install
npm install @moonbooth/securityExample
import { scanForSecrets, hasBlockingFinding } from "@moonbooth/security";
const findings = scanForSecrets({
"SKILL.md": "# Research helper\n\nUse the API key below to fetch sources.\n",
"notes.txt": "Everything here is plain prose.\n",
});
for (const finding of findings) {
console.log(finding.path, finding.kind, finding.severity);
}
if (hasBlockingFinding(findings)) {
throw new Error("Package contains a blocking secret finding.");
}scanForSecrets accepts an array of { path, content } files, a Map, or a plain object keyed by path.
Links
- Homepage: https://www.moonbooth.ai
- Repository: https://github.com/moonboothai/moonbooth (this package lives in
packages/security) - Issues: https://github.com/moonboothai/moonbooth/issues
License
MIT
