test: add semantic regression corpus for Hermes rules #9
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thidev/Kodus-rules!9
Loading…
Reference in a new issue
No description provided.
Delete branch "hermes-semantic-fixture-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add a deterministic semantic fixture corpus around the high-value Hermes rules introduced in the previous ruleset work, with an explicit bias toward false-positive prevention.
Corpus
Adds 48 cases covering 16 high-value semantic rules. Every covered rule has exactly three classes of scenario:
finding: concrete source-to-sink / invariant violation with enough evidence for high confidence;no-finding: explicit safe implementation;suppress: intentionally incomplete or ambiguous context where Hermes must not guess.Covered areas include BOLA/IDOR, privileged authorization, mass assignment, path traversal, command injection, unsafe deserialization, credentialed CORS, HTTP timeouts, retry/idempotency, file uploads, uniqueness races, SQLAlchemy transaction/session state, frontend-only authorization, open redirects, React async races and multi-write atomicity.
CI invariants
Adds
test/semantic-fixtures.test.mjs, automatically picked up by the existingnpm testcommand and therefore by Forgejo Actions. It validates that:Important scope
This PR establishes the deterministic regression corpus and its CI contract. It does not pretend that the Node test runner executes an LLM/Hermes review. The corpus is designed to become the stable input/expected-output contract for a subsequent Hermes evaluation runner, while already preventing accidental loss or weakening of the positive/negative/ambiguous test matrix.