Rule pushes
A rule push is how the hub changes a service's rules: a new vulnboxd-rules.yml, sent to the agent, checked and loaded by vulnboxd within a second, then committed to the service's Git repository under your name and pushed. It ends up exactly where a rule edited by hand would, so the rest of the team sees it with git pull, and vulnboxctl rollback undoes it like any other change.
Every change to a rules file from the hub is a push:
- Push to vulnbox in the rule builder;
- the switch on a rule, reordering or deleting one, Promote on a shadow rule and Revert in the rules history, all on the Vulnbox screen;
- Edit file as text on the Vulnbox screen, or Edit whole file in the rule builder, for anything else.
- Revert this rules commit on a checker canary alert, raised when the gameserver's verdict turns bad or the flags stored drop right after a push.
What happens to a push
On the hub, when you push:
- The change is applied to the rules file as the hub last saw it, at the commit your page was showing. Comments and layout are kept.
- vulnboxd's own parser checks the result. A file it would not load is refused there and then, with its message.
- A change that gives a rule a blocking action — a new rule that is not shadowed, a promote, or switching on a rule that blocks, stalls or rewrites — is checked against the last 20 ticks of traffic. If it would have hit flows that look like the checker (the checker hint: they stored a flag, or their fingerprint is labelled
checker), the push still goes ahead: the hint is no reason to hold it back, since anyone can make a flow look like the checker. The hub shows a warning next to the push listing those flows (up to 20) and why each looks like the checker, so you can check them and switch the rule off if they are the checker. - The push is queued, and delivered as soon as the agent is connected. While the agent is offline it waits, and you can still cancel it.
On the vulnbox, the agent then:
- Checks the agent's own settings allow pushes at all, and at this rate.
- Checks the rules file is still at the commit the change was made from, with nothing edited on the box that is not committed. If not, the push ends as a conflict and nothing is touched.
- Checks the new file with vulnboxd's parser again (validated), then against the agent's settings: denied rule keys, bypass headers.
- Writes the file and waits up to 30 seconds for vulnboxd to load it (live). During the end-of-tick window vulnboxd holds rule reloads until the window has passed. If it does not load in time, the previous file is put back and the push is rejected.
- Commits it as
hub: <message>, with you as the author andvulnboxdas the committer (committed), and announces it on the alert webhook. - Pushes the repository (pushed).
The hub shows each step as it happens, on the rule builder and under Recent pushes on the Vulnbox screen:
queued ─▶ sent ─▶ validated ─▶ live ─▶ committed ─▶ pushed
│ └──▶ push failed ─▶ … ─▶ pushed (the agent retries)
├──▶ rejected vulnboxd's parser refused it, or did not load it
├──▶ refused the agent's settings forbid it
└──▶ conflict the file moved onrejected, refused and conflict end the push with nothing changed on the box.
When the Git push fails
Once a push is live, the rules are working, and that is what counts during a game. If the commit cannot reach the remote — GitHub is down, the network is out — the push shows push failed with the reason, and the agent tries again every 30 seconds until it gets there. A live push is never undone because of Git.
A repository with no remote stops at committed: the push shows push failed with a note that the repository has no remote and the commit stays local, and nothing is retried.
"Landed as"
If someone pushed to the service's repository in the meantime, the remote has moved on and a plain push would be refused. The agent fetches, rebases its commit onto theirs and pushes again — the same way rollback commits are pushed. Rebasing gives the commit a new id, so the push shows both:
committed 4e7d2b9 → landed as 9c0e4f1 (rebased)9c0e4f1 is the one in the repository and in everyone's git log; 4e7d2b9 only ever existed on the box.
Conflicts
A push carries the commit it was made from, and nothing is ever overwritten silently. That is checked twice:
- On the hub, when you push: if the hub has seen the file move on since your page loaded it, the push is refused straight away.
- On the vulnbox, when the push arrives: if the file was changed in the meantime, by a teammate's
git pushor by an edit on the box that is not committed yet, the agent reports a conflict along with what the file holds now.
Either way, refresh, look at what changed, and push again. A switch, a reorder or a promote applies just as well to the new file. Rules are referred to by port, position and name, and the name is checked, so a file that changed underneath you gives a conflict rather than switching off the wrong rule.
An edit on the box that is not committed blocks every push to that service until someone commits or discards it.
Shadow mode
Tick log only first in the rule builder, and the rule goes in as action: log, marked with what you meant it to do:
ports:
"9100":
rules:
- name: 'notes no-referer'
match:
path: '^/api/notes'
headers_absent: ['accept-language', 'referer']
action: log # shadow: promote to block
# shadow: set_status: 403
# shadow: set_body: 'Forbidden'What only matters to the real action, such as the answer a blocked request gets, waits in comments. It blocks nothing; it only counts what it would have blocked, as logged hits. On the Vulnbox screen the rule shows as log · shadow, with its hits per tick, so you can watch it for a few ticks against real traffic and the checker. When it only catches what it should, Promote to block (or stall, or replace) is a push that sets the real action and drops the comment — and goes through the checker check above.
A shadow rule someone has since changed through Git is no longer the rule the hub pushed, so it shows not promotable, with the reason. Change it by hand from there, or push it again.
Shadowing is the habit to get into: the cookbook advice to try a rule as log before letting it block, with the promote one click away.
Editing the file directly
Edit file as text opens the whole rules file of the selected service. Saving it is a push like any other: it is checked by vulnboxd's parser before it leaves the hub, and goes through every step above, conflicts included. Use it for what the buttons do not cover — bypass, protocol settings, a comment.
Revert on a commit in the rules history undoes that commit's change to the rules file, as a new commit, the way git revert would; if later changes overlap it, the hub says so and you resolve it by hand. It is greyed out when the hub does not have the file as it was at that commit and before it.
Safety settings
Two sets of limits apply, and the agent's are the ones that count, since the hub cannot change them.
On the vulnbox, in agent:
| setting | default | |
|---|---|---|
rule_push | true | false refuses every push |
rule_push_deny | [] | rule keys the hub may not add or change, such as [route, mirror], which send traffic somewhere else |
rule_push_bypass | true | false refuses any change to the rules file's bypass headers |
rule_push_rate | no limit | at most this many pushes a minute |
A push these forbid ends as refused, with the setting that refused it in the reason.
On the hub, for everyone:
- only signed-in users can push, and every push is committed under their name;
- at most 6 pushes a minute per user;
- a blocking rule that would hit flows that look like the checker is pushed with a warning listing them (never held back);
- after the push lands, the checker canary watches the next five ticks of the gameserver's verdict and the flags stored, and alerts with a one-click revert when they turn bad;
- vulnboxd's parser checks every file before it is queued.
If you do not want pushes at all, set rule_push: false: the hub still shows rules and their hits, and the rule builder still drafts and previews rules for you to paste into the file yourself.