firstwatch
First line of defence for AI agents. Scans pages, files and tool results for attacks aimed at agents (in the text people see and the text they don't), and records each one as evidence in an open, OpenTelemetry-ready format with MITRE ATLAS and OWASP IDs.
No dependencies. Python 3.9+.
pip install firstwatch
from firstwatch import scan, watch
scan(page_html)
# {"level": "stop", "findings": [{"rule": "exfiltrate-secrets", "hidden": True,
# "hidden_how": ["css:tiny-text"], "atlas": ["AML.T0086", ...], ...}]}
result = watch(page_html, url=url, tool="fetch") # scan + save a capture on a stop
if result["level"] == "stop":
... # don't hand the page to the model as instructions; tell the user
Command line:
firstwatch scan page.html
firstwatch list
firstwatch export otlp security-captures/<folder>/capture.json
It catches instruction overrides, role hijacks, orders to hide things from the user, requests to send secrets out, requests to reveal the system prompt, curl | sh in hidden text, markdown image data leaks, edits to the agent's own setup, and orders aimed at AI assistants. It looks in HTML comments, CSS-hidden elements, attributes, invisible Unicode tag characters, zero-width characters and base64.
The Node package (npm install firstwatch) uses the same rules and format, and adds Claude Code hooks that block actions after an attack.
Docs, examples and the capture format: https://github.com/dave8172/firstwatch
MIT licensed. Made by @dave8172.
Metadata
Release files for firstwatch 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| firstwatch-0.1.1.tar.gz | 16.0 kB | With provenance | Details for firstwatch-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| firstwatch-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for firstwatch-0.1.1-py3-none-any.whl |
Total release size: 35.3 kB
Release files / firstwatch-0.1.1.tar.gz
| Download URL | firstwatch-0.1.1.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7c8278f4d55be1cd893ef728a9288e71eb7d1a9aeae98582c1f57cb0475ffe5
|
|
BLAKE2b-256 checksum How to use checksums |
4bd1e4e0896d335d6d4c30b7b8cd14e6f0aa61e32fa12f3a3a1c5046a331d5d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / firstwatch-0.1.1-py3-none-any.whl
| Download URL | firstwatch-0.1.1-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c131c1622f183f68e9b8b8126d705fa718aaa65b68421af17f891d83b795ec78
|
|
BLAKE2b-256 checksum How to use checksums |
7aac505ea1d010f9a62354acd6c4945029bc563ff045d55202a9e603b3a84a32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for firstwatch 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for firstwatch-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.