Skip to content

Hook proposals ​

A runtime hook has to get into the service, usually as a small compose change. The hub works that change out for you: it reads the service's files, recognises each container's runtime, and proposes the hook as a change. Nothing changes until a player reviews it and approves it. vulnboxd then commits it, one commit per container, pushes it and deploys it like any other change.

The hub never adds a hook on its own.

From a hook proposal to a deployed hook The agent reads a snapshot of the service's files. The hub recognises each container's runtime and works out the change. A player reviews the diff and approves the containers they want. On the vulnbox, the agent checks that the files have not moved on, that its own policy allows the change and that docker compose accepts the result, then makes one commit per container and pushes them. vulnboxd deploys them at the end of the tick; each container's commit can be reverted on its own. the hubthe vulnbox1 · Snapshotthe agent reads theservice's files2 · Detectruntime per container,the change it needs3 · Reviewdiff, warnings,steps by hand4 · Approvea player ticksthe containers5 · Checksfiles unchanged?push policy allows it?compose config valid?6 · One commitper containerapi: hook (P3)web: hook (N2)worker: hook (J1)7 · Pushvulnboxddeploys at theend of the ticknothing changesuntil step 4a failed check: nothingis committed
Every hook is a commit of its own, so a rollback, a bisect or a revert can take out one container's hook and keep the rest.

Opening it ​

Vulnbox → a service → Runtime hooks →. The hub asks the agent for a snapshot of the service's checkout (the file listing, the files detection needs, the effective docker compose config, the commit) and lists each container (compose service) with its decision and why. Read again takes a fresh snapshot after the service changed.

DecisionMeaning
proposeda hook fits; the change is ready to review
appliedthe compose file has the change already
zero-codenothing to change: Go binaries with symbols are traced by the sensor (G1)
kernelno hook needed: the kernel already links its requests (databases, plain nginx, a process per connection)
manualthe runtime could not be told, or no proposal fits: follow the cheat sheet
errora proposal exists but cannot be applied to this compose file, with the reason

Each proposal also says how much the hub automates: full (the hub makes the whole change), partial (it pushes the compose part; a source change stays by hand) or none.

Reviewing ​

A service's Runtime hooks page: the api container proposed, the database marked kernel, and the review open with the proposal to pick and the compose diff that would be committed.A service's Runtime hooks page: the api container proposed, the database marked kernel, and the review open with the proposal to pick and the compose diff that would be committed.

Review on a container shows:

  • the change as a diff, against the snapshot;
  • what it does, its warnings, and what must hold for it to work;
  • the source steps you make by hand, with the package's example diffs (for compiled languages);
  • what it was detected from, and the alternatives to pick instead;
  • a do it by hand link to the container's cheat sheet.

Everything in a snapshot comes from the service: file names, commands and snippets are shown as text.

Approving ​

Tick the containers and Approve N containers. The confirmation lists the commits: one per container, so one container's hook can be reverted alone. Two containers whose changes touch the same lines share a commit, and the review says so.

Then, on the vulnbox, the agent:

  1. checks that every file is still as in the snapshot (otherwise a conflict, nothing changed);
  2. checks its push policy (otherwise refused; the rules file is never touched this way);
  3. checks the result with docker compose config (otherwise rejected, files put back);
  4. commits each change, authored by you (committed), and pushes them together (pushed). A failed push is retried; the commits stay.

vulnboxd deploys the new commits at the end of the tick like any other change. If a hook breaks the service, its rollback undoes it, and a deploy bisect finds the one container's commit that did it. Only one proposal push per service runs at a time.

Reverting ​

The service's pushes are listed under the proposals, each with its steps. Revert on a push, or on one container's commit, queues a revert commit that the agent makes with a three-way git revert. A revert that does not apply cleanly ends as a conflict, with nothing changed.

Settings on the vulnbox ​

The hub cannot change what the agent allows:

  • agent.service_files: let the hub read a snapshot of the service's files (false: no proposals);
  • agent.file_push, file_push_allow, file_push_deny, file_push_rate: whether and where the hub may push file changes.