Repository navigation
Conversation
An Agent Skill that turns a Suricata rule into a realistic pcap that fires it, verified through Dalton on each Suricata version. Includes helper scripts (Dalton client, rule decoder, pcap linter), build templates, reference notes, evals and tests, plus a README section.
whartond
marked this pull request as ready for review
November 20, 2026 08:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
rule2pcap, an Agent Skill (.agents/skills/rule2pcap/) that turns a Suricata rule into a realistic pcap that fires it. The agent researches the traffic behind the rule, builds the capture reproducibly, tests it through Dalton on every Suricata version available, and writes up what is confirmed versus invented.SKILL.md: the workflow (preflight, decode, validate, research, build, lint, test, report)scripts/:dalton_client.py(preflight / validate / test against the Dalton API, with an opt-in Docker fallback; an engine that never reads the pcap, because the job timed out or crashed or the engine stopped on a config error, is reported as not run and exits 2),rule_facts.py(decodes contents, buffers, roles and build-relevant notes),pcap_lint.py(flags broken or unrealistic packets)templates/: Flowsynth, Scapy and TLS build scripts pluspcapkit.pyhelpers that work around Flowsynth 1.4 defects and give each host its OS's TCP options, windows and timestampsreferences/: Suricata gotchas, Flowsynth notes, realism, research and write-up guidesevals/evals.json: nine eval prompts.gitignoreentries,cryptographyin thetestingextras, ruff covers.agents/The build venv pins flowsynth 1.4.1, scapy 2.8.0, ruamel.yaml 0.17.40 and cryptography 50.0.2 (checked on Python 3.10 to 3.14). Nothing is installed into the system Python.
Testing: new
tests/test_rule2pcap_*.py; the full suite passes (185) apart from the existingtest_flowsynth.py::test_pcap_compile_fsfailure, which is unrelated. The templates rebuild byte-identically and fire on Suricata 7.0.17 and 8.0.6, through Dalton (normal and socket-control jobs) and the Docker runner. All nine evals passed end to end in independent runs, and the threshold, TLS and Suricata 8-keyword evals passed again after the review fixes. In a further blind run on 18 private training rules, every pcap fired on both engines, 17 of them on the first build.Related: secureworks/flowsynth#29 fixes the Flowsynth defects the templates currently work around; the workarounds stay harmless with it.
Also fixes two README code blocks that didn't render (separate commit).