# Suricata: apply a rule to a packet capture Apply a rule to a packet capture. ## 1. Run the example [Download the Suricata example](https://www.security.run/docs/examples/suricata.zip). Extract it, install `httpx`, set your API URL and token, then run `python client.py`. The client uploads the included inputs, submits the command, and saves the result under `results/RUN_ID`. ## 2. Check the result Read the logs directory, including generated alert/event files. Read the native exit code and cleanup status printed by the client. [Read results and save reports](https://www.security.run/docs/visibility.html) explains the returned files. ## 3. Use your own inputs Edit `example.json` to change the command arguments, requested outputs or deadline. Replace the files under `inputs/` with your own data, keeping the staged paths aligned with the command. The client creates the artifact IDs for you; illustrative IDs shown here must not be copied into a live request. ### Files used by this example - `capture.pcap` - `rules/local.rules` - `logs/.keep` The example uses supplied files or the disposable execution environment. Nothing from the environment carries into a later run unless you request and reuse its output. Qualified version: `1:7.0.10-1+deb13u4`. Commands: `suricata`. Inspect `GET /v1/tools/suricata` for the current installed version and readiness. The published snapshot has 1 functional case(s), plus timeout and cancellation checks. These examples demonstrate the native path; other flags and inputs are supported within the tool’s runtime limits. ## Command submitted by the example ```json { "tool": "suricata", "timeout_seconds": 90, "invocation": { "args": [ "-c", "/etc/suricata/suricata.yaml", "-r", "capture.pcap", "-S", "rules/local.rules", "-l", "logs", "--runmode", "single", "--set", "unix-command.enabled=no" ], "outputs": [ "logs" ], "success_exit_codes": [ 0 ], "executable": "suricata", "files": [ { "path": "capture.pcap", "artifact_id": "artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "executable": false }, { "path": "rules/local.rules", "artifact_id": "artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "executable": false }, { "path": "logs/.keep", "artifact_id": "artifact_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "executable": false } ] } } ```