Repository navigation
Releases
kevward 0.19.2
The report timer can refresh the apt lists again (#227); stale or failed
lists are now reported (#179). After updating, run sudo kevward schedule install (or ssh-gate schedule.install) once on each host. Also:
allowed_forced_commands match counts (#224) and sshd failures compared with
the previous report (#225).
- Fix: the report timer could not refresh the apt lists or write kevward's
state (#227). The service runs withProtectSystem=strictand only
/var/log/kevwardand/var/cache/kevwardwere writable, soapt-get updatefailed ("Read-only file system") in every timer run and the lists
were only as fresh as Ubuntu's own apt-daily timer; the NEW forced-command
state (#215) was never saved either.kevward schedule installnow writes
a managed drop-in (kevward-report.service.d/50-kevward-paths.conf) adding
/var/lib/kevward,/var/lib/apt/listsand/var/cache/apt, and
schedule statuswarns when they are missing. Runsudo kevward schedule install(or ssh-gateschedule.install) once on existing hosts. - report: a failed
apt-get updateor stale package lists are a MEDIUM
apt finding (#179), with a hint when a repository changed its Release
Label/Origin (kevward never accepts that itself). The header shows when the
lists were last updated;apt_refresh.lists_updated_atin the JSON. - audit: whether
[audit] allowed_forced_commandsmatched (#224). A line
under the audit table per pattern, the loaded patterns on forced-command
findings that are still reported, andaudit_allowed_forcedin the JSON. - report: sshd failures compared with the previous report (#225). The
last-24h line shows the previous value and the change; report.json has
summary.attack.previousandssh_failed_24h_change_pct; an INFO finding
when failures at least double (and rise by 50 or more).
kevward 0.19.1
From the 2026-11-23 morning check: the ssh-gate change log records the
console's address again (#214), forced-command keys added since the previous
report are NEW (#215), and report rows carry untranslated data-* keys (#216).
- Fix: changes made through ssh-gate were logged "from unknown" (#214).
sudo dropsSSH_CONNECTIONfor the operate role.kevward setupnow keeps
it (Defaults!… env_keep += "SSH_CONNECTION"in the sudoers drop-in), and
hosts without that line get the address from the sshd session's process.
When neither works the log says why instead of "unknown". - audit: forced-command keys added since the previous report are NEW
(#215). Reported separately at medium for two days; the ones that are
always there stay one low finding. - report: rows carry the untranslated keys (#216) as
data-severity,
data-serviceanddata-kind, so scripts do not depend on the display
language (report.json remains the way to read the data).
kevward 0.19.0
The report as data for consoles: report.json with a summary (counts, KEV,
attack telemetry), ssh-gate report.get format: "data", and count meta tags
in report.html (#211).
report.json(#211).kevward reportalso writes the run as data
beside report.html: thereport --jsonobject plusschema_version: 1and
asummarycomputed exactly as the HTML header (countsper severity,
act_now,kevwith the applicable CVEs,attackwith fail2ban / sshd
totals, their window and firewall drops). ssh-gatereport.gettakes
format: "data"to return it.- report.html carries the header counts as
kevward-count-*meta tags, and
last-run.jsonhas the samecounts.
kevward 0.18.2
ssh-gate job.get now works with the read role (#208).
- Fix: ssh-gate
job.getwith the read role saidnot_found(#208).
/var/lib/kevward/jobs/was root-only. The directory is now0755and job
files and logs0644(a0750directory from 0.18.0/0.18.1 is corrected
on the next job). A job that exists but cannot be read isforbidden, not
not_found.
kevward 0.18.1
Fixes for problems found with 0.18.0 and FR Security Centre: reboot.* failed
on hosts with nothing scheduled (#203), and setup --fail2ban-ignore wrote a
drop-in that stops fail2ban at its next start (#204). Hosts that ran it should
check sudo fail2ban-client -t (re-running setup rewrites the drop-in). Also
setup --self-update / --allow-reboot (#205).
- Fix:
reboot.status(andreboot.schedule/reboot.cancel) failed with
ValueErrorwhen nothing was scheduled (#203). logind reports "no schedule"
asUSEC_INFINITY(2^64−1) as well as 0; both now mean none, as does any
out-of-range time.scheduled_reboot()never raises: anything unexpected is
{"state": "unknown"}. ssh-gateinternalerrors now carry the first line
of the message, not only the exception type. - Fix:
kevward setup --fail2ban-ignorewrote a drop-in that stops fail2ban
at its next start (#204).%(known/ignoreip)sdoes not work in[DEFAULT].
The drop-in now lists fail2ban's default, theignoreipalready in effect,
and the new addresses. It is checked withfail2ban-client -tand removed
or restored if rejected; reload only runs after the check passes. kevward setup: theauthorized_keyslines are written last, and a
failure reports which steps were already applied (and logs them).kevward setup --self-update/--allow-reboot(#205). Set
[ssh_gate] self_update = true/[policy] allow_reboot = truein the same
validated, backed-up write as--ssh-gate.
kevward 0.18.0
ssh-gate phase 2 for consoles such as FR Security Centre: reviewed updates
(plan → apply.start → job.get, #197), reboot scheduling (#198) and the
report timer (#199). The host's policy still decides what may be applied and
whether it may reboot.
- ssh-gate: reboots (#198).
reboot.status(read) shows the scheduled
reboot, who set it, and whether one is required.reboot.schedule(operate)
schedules one with the host'sshutdown -r, only with[policy] allow_reboot = true, 5 minutes to 7 days ahead, andconflicton an
existing schedule unlessreplace.reboot.cancel(operate) runs
shutdown -c. - ssh-gate: report timer (#199).
schedule.status(read) and
schedule.install(operate) exposekevward schedule status/install. - ssh-gate: plan / apply.start / job.get (#197).
planreturns the
dry-run plan with aplan_hash.apply.startre-plans as root, refuses
withconflictif the hash changed, and runskevward apply --yes --expect-plan <hash> --job <id>in a transient systemd unit, optionally
scheduling a reboot afterwards if one is needed.job.getreturns the job's
state, result and log tail. Apply policy stays host-only. kevward apply --expect-plan <sha256>. Installs only if the plan still
has that hash, from the same apt simulation that was hashed.- Each gate reboot/timer/apply change is logged to syslog and the change log, and the
report shows it as an INFO finding for 7 days.
kevward 0.17.0
Host lifecycle for consoles such as FR Security Centre. ssh-gate self.update
updates or rolls back kevward (#190). kevward setup writes the gate keys,
sudoers, timer and fail2ban ignore in one command (#191). kevward uninstall
removes kevward cleanly without locking out SSH (#192). self.update is
available from this release, so the update to 0.17.0 itself is done by hand.
kevward uninstall(#192). Removes kevward cleanly. Without--yesit
is a dry run, and--jsonprints the ssh-gate envelope.- It removes the systemd units (report, firewall, harden), the ssh-gate
sudoers file, ssh-gate lines in authorized_keys, setup's fail2ban
drop-in, the harden sysctl drop-in, the nft tables and their boot
persistence, the launcher, and finally/opt/kevward. - Config, reports and state stay unless
--purge. Collector keys are
removed only with--remove-collector-keys. - The firewall is checked first. If a kevward table contains anything
kevward did not write (any rule other than its own set drops/accepts, a
policy drop, a jump), or/etc/nftables.confmentions kevward, it
returnsconflictand changes nothing. - Persistence is removed before the tables, so no rule comes back after a
reboot (the 2026-11-08 class of accident). - It is logged to syslog and the change log.
- It removes the systemd units (report, firewall, harden), the ssh-gate
kevward setup(#191). One root command that makes a host console-ready.
It replaces the authorized_keys line that was pasted by hand, which went wrong
on 2026-11-22 and got the operator banned by fail2ban.--read-key/--operate-key(with--console-user) write the
ssh-gate lines:- Each key is validated. An existing line for the same key, or an older
gate line with the same comment, is replaced instead of duplicated. - A symlinked or group/world-writable
.sshorauthorized_keysis
refused, and the file is written atomically.
- Each key is validated. An existing line for the same key, or an older
--operate-keyalso writes the exact-match sudoers file, checked with
visudo -cfand installed 0440.--ssh-gateenables the gate in config.toml. The config is validated
(#186) and backed up first.--timerinstalls the daily report timer.--fail2ban-ignoreadds anignoreipdrop-in that keeps earlier
settings.--refreshis reserved for the post-update steps of self.update.- Running it twice changes nothing.
--dry-runlists the changes,
--jsonprints the ssh-gate envelope, and every change is logged and
shown in the report for 7 days. It never enables the firewall.
- ssh-gate
self.update(#190). A console can now update kevward on a host,
or roll it back, with{"op":"self.update","args":{"version":"X.Y.Z"}}
(operate role).- Only a validated
X.Y.Zis accepted. The package name is fixed. - pip runs as
--isolatedwith a clean environment and PyPI as the only
index, under a lock and a 300 s limit. Afterwards the new
kevward --versionis checked. - It is refused unless kevward runs from the
/opt/kevwardvenv, the host
opts in with[ssh_gate] self_update = true, and the version is at or
above[ssh_gate] min_version(default: the first release with the op). - The response carries
old,new,downgrade,duration_sand
pip_tail. An unknown version returnsnot_found, and a concurrent run
returnsconflict. - Each update is logged and shown in the report for 7 days.
- The
versionop now reportsinstall,self_updateandmin_version. util.rungainedclean_env.
- Only a validated
kevward 0.16.0
kevward ssh-gate, a restricted forced command for collection and console
SSH keys (#185), and config validation that reports settings kevward would
otherwise silently ignore (#186).
-
kevward ssh-gate(#185). A forced command for collection and console
SSH keys, using the same one-request JSON envelope as stille-pro
dispatch.- It is off unless
[ssh_gate] enabled = true. - The
readrole (no sudo) offersversion,report.get(HTML or JSON),
config.getandconfig.schema(every key, type, default, help text and
whether it is writable). - The
operaterole (sudo -n, exact-match sudoers) addsconfig.set. config.setonly writes an allowlist of keys that cannot weaken
detection or protection and are not paths.- It refuses a write if the file changed since
config.get(conflict),
or if kevward's own loader or the #186 validation rejects the result. - It keeps the last 10 backups, replaces the file atomically, and logs each
change to syslog and/var/lib/kevward/ssh-gate-changes.jsonl. - The report shows each change for 7 days.
auditrecognises the gate's own forced commands.
- It is off unless
-
Config: ignored settings are reported (#186). On 2026-11-22
allowed_outboundwritten below a new[report]table became
report.allowed_outboundand was dropped without a word, so expected tor
connections were listed as "unexpected outbound". Unknown tables, unknown
keys and known keys in the wrong table now produce a warning ("unknown
settingallowed_outboundin [report]; ignored — did you mean [audit]?") on
stderr for every command, a MEDIUM finding and a note on the config line in
the report, andconfig_warningsin the JSON. Loading still continues. The
audit section shows how manyallowed_outbound/allowed_forced_commands
rules were loaded (audit_rulesin the JSON).
kevward 0.15.0
The HTML report can now be read in Japanese, and its layout follows the
stille-hunter weekly report: logo, a one-line summary of what needs action,
and colour-coded categories (#180). Set [report] lang = "ja" in
config.toml, or pass kevward report --lang ja; English stays the default.
- Report layout aligned with the stille-hunter weekly report (#180). The
kevward logo (inlined, inverted in dark mode) sits top-left; a summary card
says in one line whether anything critical/high or an applicable KEV needs
action, with a matching "to act on" chip; cards are grouped under coloured
category headers (this host — mustard, attacks on this host — magenta, signs of
intrusion — red); tables scroll inside their card on narrow screens, and
labels and table headers no longer wrap mid-word. - Japanese report (#180).
[report] lang = "ja"in config.toml, or
kevward report --lang jafor one run, renders the HTML report's frame in
Japanese: headings, explanations, table headers, severity / kind / KEV
status labels, the header line, firewall / fail2ban / sshd summaries, the
audit intro and helper lines such as "still old" and "advisories". Finding
titles and details from plugins, JSON and CLI output stay English (phase
2). English remains the default. No new dependency: an in-tree catalog keyed by the English
text, with a test that every message has a Japanese entry. An unknown
langis a config error.
kevward 0.14.3
Clearer apply and report output from the week's patching: whether the apt
plan is current and why a reboot is mentioned (#171), which packages of an
apt finding are still old (#174), and the allowed_outbound line at 0 hits
(#175).
applysays what happened (#171). The dry run on www printed only
DRY RUN, blank lines andreboot required (not scheduled; …). Now:- the first line says whether apt lists were refreshed
(apt lists refreshed (apt-get update ok, 3.2s)); a failed
apt-get updatewas silently ignored and now printsWARNING: apt-get update failed (…); the plan below may be staleand exits 1; nothing to apply (0 packages)when there is nothing to do, and
N minor upgrades not included (use --minor);- the reboot line says why:
already required (libc6),will be required after these updates (linux-generic), orwill be required once pending updates not in this plan are installed; nothing when neither applies.
The apt plan (andapt-get update) is now computed once per run and
shared by every apt plugin instead of once per plugin. JSON adds
apt_refresh.
- the first line says whether apt lists were refreshed
- Laravel: one EOL finding per major (#171). Two copies of the same app
gave two identical MEDIUM "past end of security fixes" rows; they are now
one row listing the paths. - Report: which packages of an apt finding are still old (#174). A
finding such asphp8.3 8.3.36 → 8.3.37did not say whether it meant the
whole php8.3 source or only thephp8.3metapackage (left behind by
apt-get install --only-upgrade 'php8.3-*'). The HTML row now lists
still old: <package> <installed version>and how many other installed
packages of the same source are already at the new version. JSON adds
source_package,package_versionsandupdated_packagesto apt
findings (one extradpkg-query -Wper run). - audit: the
allowed_outboundsummary stays when nothing matched
(#175). With rules configured but no matching connection at scan time,
the line disappeared, so "tor was not connected right now" looked the same
as "the rule is not configured". Nowallowed outbound: 0 (rules: tor:9001; no matching connection at scan time), and
audit_allowed_outboundin JSON lists every rule, at 0 when idle.