Skip to content

Add Slop Detector skill - #20

Open
m0erbye wants to merge 1 commit into
hackenproof-public:mainfrom
m0erbye:feat/slop-detector
Open

m0erbye wants to merge 1 commit into
hackenproof-public:mainfrom
m0erbye:feat/slop-detector

Conversation

@m0erbye

@m0erbye m0erbye commented Aug 31, 2026

Copy link
Copy Markdown

Summary

Implements the Slop Detector requested in #13: a skill that checks each fact a report cites against the source it cites, and returns a verdict per citation rather than a judgement on the report.

  • Four verifiers, one per check in the issue: code citations (every cited file, line, symbol and dependency version against the in-scope commit), advisories (CVE existence and affected product via NVD; affected version ranges via GHSA), on-chain (transaction hashes against the chain), and PoC form (prose standing in for evidence).
  • Five verdicts per citation, never averaged: verified, verified-with-drift, citation-without-commit, unresolvable, contradicted. The load-bearing pair is unresolvable vs contradictedcould not look vs looked and it is absent.
  • Every check resolves before it may return a negative: annotated tags are dereferenced to their commit, a 404 path is searched by basename across the tree, a quote is searched ±30 lines from the cited range. Without this step three ordinary citation mistakes are indistinguishable from fabrication.
  • Reputation gate for the Spam −20 / Invalid −5 policy the issue asks this to feed: only contradicted on a load-bearing claim can support a penalty, receipts printed, and never while an unresolvable verdict stands on the same claim.
  • Applicability gate first: code checks run only when target.type is github_repository, and only against a commit that could actually be established — a citation pinned to a moving branch is reported as its own defect, not silently checked against HEAD.
  • No clone. Files come from contents?ref=, the tree is fetched once per commit. Repositories in scope reach several gigabytes.
  • Endpoints and limits in the references are measured, not assumed: public Solana nodes hold roughly 2.2 days of history, so a null result on an older signature is pruning rather than invention; NVD without an API key allows about five requests per thirty seconds and returns malformed output past that; several commonly recommended RPC endpoints are dead and listed as such.

Structure

Follows the existing plugin layout (mirrors hackenproof-poc-grader):

plugins/hackenproof-slop-detector/
  .claude-plugin/plugin.json
  skills/hackenproof-slop-detector/
    SKILL.md
    agents/openai.yaml
    references/code-citation-checks.md
    references/advisory-checks.md
    references/onchain-checks.md
    references/verdicts-and-reputation.md

Plus a marketplace.json entry. claude plugin validate passes for both the plugin and the marketplace manifest.

Notes for review

  • The prose-PoC screen is the same judgement as hackenproof-poc-grader's evidence tiers; it defers to that skill rather than reimplementing it, and comes out cleanly if you would rather this skill not touch PoC form.
  • The CVE and GHSA verifiers are built and tested, but code-review programmes cite file:line, not dependency advisories — happy to split them into a dependency-class skill instead.
  • pruned-inconclusive is honest but terminal for any on-chain proof older than a couple of days. If the team has an archival RPC key, tell me where the skill should read it from and the verdict becomes decidable.

Closes #13

Copilot AI lite review requested due to automatic review settings August 31, 2026 11:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new hackenproof-slop-detector skill/plugin intended to validate report citations against their sources (repo contents at an established commit, advisory databases, and on-chain RPC), and to emit per-citation verdicts that can be used as evidence for downstream reputation decisions.

Changes:

  • Introduces the Slop Detector skill docs and agent configuration, including workflow steps and output rules.
  • Adds reference guides for code-citation checks, advisory checks (CVE/GHSA), on-chain verification, and verdict/reputation mapping.
  • Registers the new plugin in the marketplace manifest (plus a small description escape fix for an existing entry).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
plugins/hackenproof-slop-detector/skills/hackenproof-slop-detector/SKILL.md Defines the skill’s purpose, workflow, trust boundary, and output rules.
plugins/hackenproof-slop-detector/skills/hackenproof-slop-detector/references/verdicts-and-reputation.md Specifies verdict taxonomy and how evidence maps (conservatively) into reputation guidance.
plugins/hackenproof-slop-detector/skills/hackenproof-slop-detector/references/onchain-checks.md Documents transaction validation and RPC-based verification flow, including retention-window handling.
plugins/hackenproof-slop-detector/skills/hackenproof-slop-detector/references/code-citation-checks.md Documents repo/commit establishment and file/line/symbol/dependency claim validation steps.
plugins/hackenproof-slop-detector/skills/hackenproof-slop-detector/references/advisory-checks.md Documents CVE existence/product checks (NVD) and affected-range checks (GHSA), with rate-limit handling.
plugins/hackenproof-slop-detector/skills/hackenproof-slop-detector/agents/openai.yaml Adds agent UI metadata and a default prompt for invoking the skill.
plugins/hackenproof-slop-detector/.claude-plugin/plugin.json Declares the plugin metadata (name/version/description/author).
.claude-plugin/marketplace.json Adds the new plugin to the marketplace list and fixes an existing description escaping.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

| `path.ts:61-66` | verified | quote matches at 61-66 | `gh api …contents/…?ref=…` |
| `configs/vite/x.ts` | verified-with-drift | real path `packages/extension/configs/vite/x.ts` | `grep -i /x.ts$ tree.txt` |
| `CVE-2099-99999` | contradicted | NVD totalResults=0 | `curl …?cveId=…` |
| `3TNNto2…xY61` | pruned-inconclusive | slot predates window 441633334→442113302 (~2.2d) | `getTransaction` + `getFirstAvailableBlock` |
| Any `unresolvable` | No penalty, whatever else is present. The check did not run. |
| One or two `contradicted` among many `verified` | No penalty. Transcription errors. Worth a Need-more-info asking them to correct the citations. |
| `contradicted` on the claim the finding rests on — the cited code is absent from the tree, or the transaction's stated effect is absent from a transaction the node does hold | Supports Invalid (−5). State the receipts. |
| Every substantive citation `contradicted`, plus `structurally-invalid` hashes or a non-existent CVE, plus a prose PoC | Supports Spam (−20). This is the only combination that does. |
Comment on lines +37 to +38
Fails the structural check → **`structurally-invalid`**. This is the only on-chain result that
supports a fabrication finding on its own.
Comment on lines +107 to +112
- Transaction's slot or block predates the window, or its date is older than the window → **`pruned-inconclusive`**. State the window. This needs an archival provider (Helius, Triton, QuickNode with full history) or an indexer, and the report cannot be judged on this citation without one.
- Transaction falls **inside** the window and still returns null → **`not-found-in-range`**. This is a genuine red flag: the node holds that period and does not have the transaction.

For EVM chains, `eth_getTransactionByHash` on a full node serves all history, so `null` there is
stronger evidence than on Solana — but confirm the node is not a pruned archive-less instance before
treating it as `not-found-in-range`.
Comment on lines +130 to +132
Per hash: chain · structural result · provider that answered · retention window where relevant ·
verdict · the command. Never write "the transaction does not exist" unless the result is
`not-found-in-range` with the window stated.
transaction — every specific-looking element a placeholder, a hypothetical, or a narrated result with
the result withheld.

This is the same test `hackenproof-report-quality-scorer` applies as its observed-value rule. Where

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"observed-value rule" on hackenproof-report-quality-scorer doesnt exists.

This needs to be fixed regardless of #18's merge, either rename to match Dimension 3 or drop the specific rule-name and just say "defer to its Impact & Evidence scoring."

@dorsky dorsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m0erbye for your info

No cross-reference either direction between this skill and hackenproof-poc-grader, even though they overlap: poc-grader already treats "fabricated txhash" and "code citations that don't exist" as negative signals driving its own Invalid/OOS verdict, while slop-detector does deeper per-citation verification of the same facts feeding a separate reputation table. Not a bug, but a triager could run one and not the other and get differently-grounded conclusions on the same evidence. Worth a short "relationship to other skills" note (like #18 has for poc-grader) rather than a functional fix.

- Dependency-and-version claims ("ships lodash 4.17.x")
- Repository issue and pull-request numbers

A report with no citations at all is not slop by that fact alone — it is a report to hand to `hackenproof-report-quality-scorer`, whose observed-value rule covers prose-only submissions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"observed-value rule" on hackenproof-report-quality-scorer doesnt exists.

This needs to be fixed regardless of #18's merge, either rename to match Dimension 3 or drop the specific rule-name and just say "defer to its Impact & Evidence scoring."

Comment thread .claude-plugin/marketplace.json Outdated
{
"name": "hackenproof-all-reports-export",
"description": "Export all reports of a HackenProof program into a structured file (Markdown, JSON, or CSV user's choice)",
"description": "Export all reports of a HackenProof program into a structured file (Markdown, JSON, or CSV \u2014 user's choice)",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to do any changes here

Closes hackenproof-public#13. Checks a report's cited facts against the thing each one cites:
files, lines and symbols against the in-scope commit; CVEs and advisories
against NVD and GHSA including product and version-range matching;
transaction hashes against the chain; and whether the PoC is prose.

Every threshold, endpoint and failure mode here was measured against live
reports before being written, and the measurements are in the references
so a verdict can be re-derived rather than trusted.

The governing rule is resolve-before-accuse. Three ordinary citation
mistakes are indistinguishable from fabrication under a naive check, and
all three were found on a report that turned out to be sound: an annotated
tag whose ref SHA is not the commit, a quote sitting at line 67 inside a
correct 62-74 range, and a path missing its packages/extension prefix. So
every check runs a resolution step — basename search over the tree, tag
dereference, a +/-30 line quote search — before it may return a negative.

Verdicts are graded per citation and never averaged: verified,
verified-with-drift, citation-without-commit, unresolvable, contradicted.
The load-bearing distinction is unresolvable versus contradicted — could
not look versus looked and it is absent. A public Solana node holds about
2.2 days of history, so a null result on a three-month-old signature is
pruning, not invention; the retention window is checked with
getFirstAvailableBlock before any such verdict, and several endpoints
commonly recommended for this are dead, including the one a live report
told the triager to use.

Only contradicted findings on a load-bearing claim can support the -5/-20
reputation policy the issue asks this to feed, receipts printed, and never
while an unresolvable verdict stands on the same claim.

No clone anywhere: repositories in scope reach several gigabytes, so files
come from contents?ref= and the tree is fetched once per commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slop Detector

3 participants