Repository navigation
test(marketplace): cover static skill-scan heuristics - #41
Conversation
|
Thanks @alexsmolya — second one from you in three minutes, and same apology as on #40: your CI was held in Verified locally in the meantime:
Two things worth calling out. The negative cases are what make this valuable. Second, I appreciate the honesty in the description: "These tests verify the current regex behavior; they do not claim to provide complete security coverage." That's exactly the right framing and I'd rather have it stated than implied. These lock in current behaviour so it can be changed deliberately — they're a regression net, not a safety guarantee. On the sandbox note in your description — the unrelated adapter test that wanted to write under your home directory is a known rough edge on our side and nothing to do with your change. Don't worry about it. Leaving the merge to @mar-schmidt. |
|
Merged — thanks @alexsmolya, this is the stronger of your two. Verified: Splitting the positive and negative rule cases into separate test funcs ( |
Closes #36
Adds focused, table-driven tests for the existing static marketplace heuristics.
Coverage includes:
scannableTextfor scripts, Markdown, extensionlessscripts/entries, and non-text assets.scriptRules, including pipe-to-shell, network calls, credential paths, base64 blobs, and dynamic execution.promptRulesentries plus negative SKILL.md-style prose.dedupeFindingsduplicate collapse and distinct(File, Rule)retention.Production scanner logic was not changed. These tests verify the current regex behavior; they do not claim to provide complete security coverage.
Validation:
go test ./internal/marketplace/...go vet ./...git diff --checkThe repository-wide Go suite was also attempted. Marketplace tests passed; one unrelated adapter test was blocked by the sandbox refusing a write under
/home/alex/.codex.