repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by bugabinga
pi/agent/skills/wiki/scripts/wiki-doc.test.mjs
RawFile outline
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const skill = readFileSync(new URL("../SKILL.md", import.meta.url), "utf8");
test("url ingest requires approval for private/internal network targets", () => {
assert.match(skill, /private\/internal URLs.*explicit approval/i);
assert.match(skill, /localhost|loopback/i);
assert.match(skill, /169\.254\.169\.254/);
});
test("file and archive ingest guard secrets and unsafe extraction", () => {
assert.match(skill, /deny known secret paths/i);
assert.match(skill, /zip-slip|parent paths/i);
assert.match(skill, /file count.*total size|total size.*file count/i);
});
test("recall searches are literal and bounded", () => {
assert.match(skill, /rg -i -F --max-filesize/);
assert.match(skill, /-- "\$query"/);
});
test("lint is read-only unless fix is approved", () => {
assert.match(skill, /lint is read-only by default/i);
assert.match(skill, /--fix/i);
});