feat: scan repo description and PR templates, add --version, pytest suite - #1
Open
ghostfix-pm wants to merge 1 commit into
Open
feat: scan repo description and PR templates, add --version, pytest suite#1ghostfix-pm wants to merge 1 commit into
ghostfix-pm wants to merge 1 commit into
Conversation
…uite - Scan the repository description as maintainer-controlled guidance text (the first thing a scanning agent reads; bait lives there too) - Add .github/pull_request_template.md, PULL_REQUEST_TEMPLATE.md, .github/ISSUE_TEMPLATE.md and docs/AGENTS.md to GUIDANCE_FILES — templates are read the moment an agent opens a pull request - Add --version/-V flag to the CLI - Convert test_trapcheck.py to a pytest-parametrized suite (32 tests, 0.05s) while keeping the zero-dependency standalone runner intact; new coverage for parse_target, verdict_for, _dedupe, render, main() flags, description/template bait detection, and version consistency - pyproject: pytest config, dev extra, requires-python aligned to README's documented 3.9+ claim - README: document description/template scanning, --version, and limits - .gitignore: add .pytest_cache/
Author
|
Fun fact from verification: running the tool against this very repo flags it as SUSPICIOUS (35) — the scanner is working as intended. The self-scan result is documented in the README (quoted payloads in the corpus are halved, not dropped), and it's unchanged by this PR. The tool works so well it catches its own ghost (ᵔᴥᵔ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trapcheckis a pre-flight honeypot scanner for coding agents: it reads a repo the way an agent would and flags the patterns used to farm agents rather than pay them. This PR closes the biggest gaps in that mission — the places bait lives that it wasn't reading — and makes the test suite first-class.What changed
descriptionshows up in theChecked:list..github/pull_request_template.md,PULL_REQUEST_TEMPLATE.md,.github/ISSUE_TEMPLATE.mdanddocs/AGENTS.mdtoGUIDANCE_FILES.--version/-Vflag on the CLI.test_trapcheck.pyis now a parametrized pytest suite that still runs standalone with zero dependencies (python3 test_trapcheck.py). New coverage for the previously untested pure logic:parse_target(all URL forms + invalid input),verdict_forthresholds,_dedupesource merging,render,main()flag handling, description/template bait detection, and version consistency.devextra inpyproject.toml,requires-pythonaligned to the README's documented 3.9+ claim,.pytest_cache/in.gitignore.--version, and the remaining blind spots.Verification
pytest— 32 passed in 0.05spython3 test_trapcheck.py(standalone, no deps) — all passtrapcheck agentatwork/trapcheck→SUSPICIOUS(score 35), unchanged verdict, now withdescriptionin the checked surfacetrapcheck ClankerNation/OpenAgents#16→TRAP(score 218), identical to the README's documented exampleTest Results
Files Changed
--version, v1.3.0--version, limits.pytest_cache/