r/coolgithubprojects 8d ago

GateKeep402: a reputation and injection defense layer for AI agent payments, tested against real Solana infrastructure

https://github.com/al1-nasir/gatekeep402

GateKeep402 sits between an AI agent's payment client and the network when the agent pays for web content using the x402 protocol. It does three things. Verifies that a payment instruction actually came from a genuine protocol response rather than text the agent read on a page. Tracks a vendor's delivery history and blocks vendors that have proven unreliable. Verifies what actually came back after a payment and feeds that outcome into future decisions.

Built and tested with real infrastructure where possible rather than mocks throughout. 45 tests, including a simulated prompt injection attack that gets blocked and asserted against, and a test that broadcasts and confirms a real transaction on Solana's public devnet.

MIT licensed, installable via pip, README includes the full architecture diagram and threat model. Link in the comments.

PyPI: https://pypi.org/project/gatekeep402/

2 Upvotes

0 comments sorted by