added testing docs to sensor template readme removed duplicated docs

This commit is contained in:
AndReicscs
2026-06-18 19:17:56 +00:00
parent a4315f9e9a
commit a20a0ecc66
2 changed files with 5 additions and 37 deletions
@@ -24,4 +24,8 @@ HoneyWire provides two distinct ways to test your sensor's payload delivery safe
```bash
python3 scripts/mock_hub.py &
docker run --rm -e HW_HUB_ENDPOINT=http://<LOCAL_IP>:8080 -e HW_HUB_KEY=test_key -e HW_SENSOR_ID=test_sensor -e HW_TEST_MODE=true your-sensor-image:latest
```
```
2. **Testing Against a Real Hub**: Deploy the sensor using `wizard apply`, then run the `wizard firedrill` command to safely verify telemetry transmission to your live Hub.
> **Note**: For an actual trip check, you can manually trigger the specific sensor's tripwire on your own to verify the event appears in the Hub UI.
-36
View File
@@ -1,36 +0,0 @@
# HoneyWire Python Sensor Template
Welcome to the HoneyWire ecosystem! This template contains everything you need to build a custom, Dockerized security sensor that natively reports to the HoneyWire Hub.
## How to Build Your Sensor
1. **Copy this folder** and rename it to your sensor's name (e.g., `ssh_watcher`).
2. **Write your logic** inside `sensor.py`. The file is heavily commented and shows you exactly where to put your code.
3. **Add dependencies**: If your script needs extra Python libraries (like `scapy` or `paramiko`), add them to `requirements.txt`.
4. **Update `manifest.json`**: Add any custom `HW_` variables your sensor needs to the `env_vars` array so the Hub can configure them.
## Deployment
In the new HoneyWire architecture, sensors are driven by the Hub and Wizard via `manifest.json`.
1. Define your sensor in `manifest.json`.
2. Build and push your image to a registry.
3. Sync the manifest to your Hub, and deploy it securely using `wizard apply`.
This ensures your sensor runs under strict Distroless sandboxing with dropped capabilities (`cap_drop: ALL`) and read-only file systems out-of-the-box.
## Testing Your Sensor
HoneyWire provides two distinct ways to test your sensor's payload delivery safely:
1. **Local Boot-Time Testing (CI/CD)**: Use the internal Mock Hub to validate your payload format without booting the full server environment.
```bash
# Start the Mock Hub in a separate terminal
python3 scripts/mock_hub.py
# Run your sensor in test mode
docker run --rm \
-e HW_HUB_ENDPOINT=http://<LOCAL_IP>:8080 \
-e HW_HUB_KEY=test_key -e HW_SENSOR_ID=test_sensor -e HW_TEST_MODE=true \
your-sensor-image:latest
```