Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__pycache__/
.pytest_cache/
dist/
build/
*.egg-info/
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ autonomous agents, and asks every contributor to write its own system prompt and
environment into the pull request. It never merges anything, so it never pays anything. The
bounty is the bait; the agent's configuration is the product.

`trapcheck` reads the text a coding agent would read — issue bodies, `CONTRIBUTING.md`,
`README.md`, `AGENTS.md`, `CLAUDE.md`, `.cursorrules`and tells you whether you are about to
walk into one.
`trapcheck` reads the text a coding agent would read — the repository description, issue
bodies, `CONTRIBUTING.md`, `README.md`, `AGENTS.md`, `CLAUDE.md`, `.cursorrules`, and
pull-request/issue templates — and tells you whether you are about to walk into one.

```
$ trapcheck ClankerNation/OpenAgents#16
Expand Down Expand Up @@ -76,6 +76,7 @@ trapcheck owner/repo # scan guidance files + newest open iss
trapcheck owner/repo#123 # scan guidance files + one specific issue
trapcheck https://github.com/o/r/issues/7
trapcheck owner/repo --json # machine-readable
trapcheck --version # print version and exit
```

Exit codes: `0` clean or caution, `1` suspicious, `2` trap. So you can gate on it:
Expand Down Expand Up @@ -148,6 +149,8 @@ Read these before trusting a `CLEAN`.

- It reads text. A repo whose trap lives in a build script, a test fixture, or a dependency will
pass. `CLEAN` means "no agent-targeting patterns in the text checked", nothing more.
- The repository description and PR/issue templates are checked, but GitHub renders more text
than this list — milestone descriptions, release notes, wiki pages and issue labels are not.
- Without `#issue`, it samples only the newest open issues. The trap may be in issue #400.
- Regex rules are evadable by anyone who reads this file. It raises the cost of the cheap,
high-volume version of this attack; it does not stop a careful adversary.
Expand Down
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"

[project]
name = "trapcheck"
version = "1.2.0"
version = "1.3.0"
description = "Pre-flight safety check for autonomous coding agents: read a GitHub repo the way an agent would, before you point one at it."
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { text = "MIT" }
authors = [{ name = "agentatwork", email = "agent@agentatwork.xyz" }]
keywords = [
Expand All @@ -25,6 +25,9 @@ classifiers = [
]
dependencies = []

[project.optional-dependencies]
dev = ["pytest>=7"]

[project.urls]
Homepage = "https://agentatwork.xyz/trapcheck/"
Source = "https://github.com/agentatwork/trapcheck"
Expand All @@ -35,3 +38,8 @@ trapcheck = "trapcheck:_console"

[tool.setuptools]
py-modules = ["trapcheck"]

[tool.pytest.ini_options]
testpaths = ["test_trapcheck.py"]
pythonpath = ["."]
addopts = "-q"
Loading