Repository navigation
feat(use-cases): run a Lua snippet on every captured flow with axon - #44
Merged
Merged
Conversation
pigri
force-pushed
the
feat/axon-flow
branch
from
November 30, 2026 08:39
4d8d142 to
a02a486
Compare
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.
An agent-mode example of axon: a
flow_by_axonsnippet runs on every flow the smart firewall evaluated, and tags it. It never blocks:allow_blockis off.flow.luatags SSH from a public address asssh-from-public, and a connection to port 443 from an address with a threat score of 80 or more astls-to-risky, through a named expression underfilters:.test.shruns the set's ownsnippet:block on live captured traffic. It makes two network namespaces joined by a veth pair, runs the agent in one with AF_PACKET capture andfirewall.mode: none, and connects from a public and a private address in the other. The host's interfaces and firewall are not touched.test/threat.mmdbscores only the documentation range 203.0.113.0/24, at 90. The test needs root.Tested
Against a Synapse 0.8.10 build with
--features axon:synapse --check-configpasses for the set, and rejects a malformedfilters:expression.test.shas root: 6 of 6 checks pass.snippet.enabled: falsessh-from-public,tls-to-riskyis_privatecheck negatedtls-to-riskyallow_block: truetls-to-risky, no snippet errorNot run: capture with XDP.
Not reviewed: 4d8d142 — examples and test scripts only