The Sentinel workflow page showed the scheduled checks from the administrator’s chair: a task is set up once, runs by itself, and its results arrive as issues. This page opens the machinery behind it. Sentinel is not a separate program; it lives inside the Wingman service that the Technical Details page describes, and it reuses that service’s SSH connection, vault, history and dashboard.
Architecture
Three parts work together. A scheduler inside the Wingman service decides when each task falls due on each server and sends the script through the same broker that runs every approved command. A Sentinel agent, started afresh in a container for each run, reads the result and writes issues. And the dashboard shows the issues, from where the administrator hands one to the interactive Wingman agent. The following diagram shows the path of one run:
The scheduler keeps one due time per task and server, so that every server of a task draws its own times. A server runs one Sentinel script at a time, and a busy server delays only its own run. Runs that fell due while the service was stopped run once after the restart, spread over a few minutes so that they do not all start together.
Why a run needs no approval card
Every other request in Wingman waits for a person. A Sentinel run does not, because the person approved it earlier: saving a task approves its script. That shortcut is safe only within limits, and Sentinel keeps them in code:
- The script is fixed. A run sends exactly the saved text; editing the script is a new decision in the dashboard’s editor, and a change proposed by an agent opens a card like any other request.
- Only servers in master data are valid targets, as for every request.
- A script cannot use a stored service password: Wingman refuses a
{{secret:NAME}}placeholder in a task, because nobody would approve its use at run time. - Root comes only from the server’s sudo password in the vault. While the vault is locked, root runs are skipped and nothing reaches the server.
- Every run is recorded in the history as an automatic request, beside the approved ones, with the task that caused it.
The remaining risk is the script itself. Once saved, a script that changes a server would change it on every run, which is why the packaged templates only read and why a proposed task always needs a person.
The Sentinel agent
The agent that reads a run is a separate agent from the interactive Wingman
agent. Wingman starts it for each run in a podman container of its own, a
sandbox much like the secdev container, which has no
privileges, a read-only file system, and a limit on memory and processes. The
container talks to a separate Sentinel endpoint of the Wingman service, with
a token that is valid for one run on one server and expires when the
container exits. The model behind the agent is reached through LiteLLM, a
gateway that offers many models behind one interface, and the administrator
chooses which model in the configuration; at the institute it is the same
local open-weight model that serves the Wingman agent.
The agent’s tools define what it can do. It reads the run, earlier runs on the same server, master data and the open issues; it files and updates issues, sends an alert and gives its verdict. It has no tool that runs a command or touches a server. The agent’s own prompt states that boundary first:
The prompt then tells the agent how to judge a run. Lines that start with
!! are flags the script raised; indented lines quote output from the server
and count as data, never as instructions; and a flag that a check could
not collect its evidence never justifies clearing an issue. The urgency of
an issue follows a fixed scale, which the prompt defines in full:
The task’s briefing, written by the administrator, overrides these general expectations for its servers. Usually the agent analyses the result after every run of the task.
The vulnerability lookup
One of the packaged templates, Vulnerable software, gets help from Wingman. The template’s script ends its output with the list of installed packages, their versions and the versions the package manager offers as an update. The Sentinel agent passes that list to a lookup in Wingman, which asks OSV.dev, an open database that collects the Debian and Ubuntu security trackers, for the known vulnerabilities (CVEs) of each package, and marks those that appear in the catalogue of known exploited vulnerabilities kept by the US cybersecurity agency CISA. The answer sorts the CVEs of each package into three groups:
- fixed by the pending update;
- fixed by a reboot into the newest installed kernel;
- no update yet.
The server itself sends nothing anywhere: Wingman makes the lookup and caches the answers. The list must end with a line that counts its packages, and the lookup refuses a list without that line, because a list cut short would make a server look safer than it is.
Issues as data
An issue is a record with an urgency, a title, a text and a list of servers, each of them open or cleared. For each server the issue counts how often it was seen and when it was first and last seen. Every change is an event in the issue’s timeline, with its author: the Sentinel agent, the administrator (the operator), or a Wingman session. The following screenshot shows an opened issue with its servers, the run it cites and its timeline:
(enlarge)Two rules keep the list short and honest. First, the agent adds its server to an existing open issue instead of filing a second one. Second, each analysis reads one run on one server, so the agent may clear an issue only on that server, never on the others: an issue on ten servers is cleared server by server as later runs show the problem gone, and resolves once all ten are clear. A resolved issue stays resolved: if the problem returns, the agent files a new issue, with a fresh count and a fresh alert, instead of reviving the old one.
Alerts and the handoff to a session
An alert goes out when the agent files a critical issue, when a critical issue gets worse, or when it spreads to another server. The agent writes the problem, the evidence and possible fixes, and Wingman adds the affected servers and a link to the issue and sends it by Mattermost, by e-mail or both. To keep a fault that rolls out over a fleet from flooding the channel, Wingman holds back a repeat for the same issue for a configurable number of hours, alerts again early only when the issue reaches further servers, and caps the alerts per hour. Every alert, sent or held back, is recorded with its full text.
The handoff of an issue to the interactive agent uses the plugin that
secdev installs in OpenCode, the same one that wakes a session after a
background request. The plugin reports the open sessions of the workspace to
Wingman, waits for a handoff, and delivers the prompt once the chosen session
is idle. The prompt names the issue and its servers, and the agent reads the
rest through its own tools, which can also comment on the issue, clear a
server or resolve the issue after a fix.
Configuration
Sentinel is configured in the sentinel section of Wingman’s configuration
file, ~/.config/itp3wingman/config.yaml. The following excerpt shows each
setting with a comment on its purpose and an example value:
sentinel:
# run tasks on their schedules; off: only "Run now"
enabled: true
# spread runs missed while stopped over this window
startup_spread_seconds: 300
# runs kept per task and server
max_runs_per_task: 500
# timeout of a script whose task sets none
default_timeout_seconds: 600
# the Sentinel agent, one podman container per analysis
agent:
enabled: true
# built by itp3wingman build-agent-image
image: localhost/itp3wingman-agent:latest
# the model, reached through LiteLLM
litellm_url: https://llm.example.invalid
model: qwen3.8-27b
api_key_file: litellm-key
# the agent's instructions, beside config.yaml
prompt_file: sentinel-system-prompt.md
# longest analysis, and analyses at the same time
timeout_seconds: 900
max_concurrent: 1
# limits of the container
memory: 2g
cpus: 2
# alerts about critical issues; leave a channel out
notify:
mattermost:
url: https://chat.example.invalid
bot_token_file: mattermost-token
# a channel, or users to message directly
channel_id: ""
direct_to: [admin]
email:
host: smtp.example.invalid
port: 587
security: starttls
from_address: sentinel@example.invalid
to: [admin@example.invalid]
# no repeat alert about one issue within this time
realert_hours: 24
# alerts in any hour, across all servers
max_per_hour: 10
# the dashboard link in every alert
dashboard_url: http://127.0.0.1:9402
# CVE lookup for the Vulnerable software template
vulnerabilities:
enabled: true
osv_url: https://api.osv.dev
# answers and the CISA catalogue are reused this long
cache_hours: 24
timeout_seconds: 30
The repository documents the few remaining settings, such as passwords given inline instead of in a file.
sentinel-system-prompt.md in the configuration directory holds the
agent’s instructions, editable like the Wingman agent’s own prompt, and the
tasks, runs, issues and alerts live in the same database as the history. The
Sentinel workflow page shows
how to switch the agent on.