Skip to content

Releases

kevward 0.19.2

Choose a tag to compare

@github-actions github-actions released this 24 Nov 03:50
e35333c

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 with ProtectSystem=strict and only
    /var/log/kevward and /var/cache/kevward were writable, so apt-get update failed ("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 install now writes
    a managed drop-in (kevward-report.service.d/50-kevward-paths.conf) adding
    /var/lib/kevward, /var/lib/apt/lists and /var/cache/apt, and
    schedule status warns when they are missing. Run sudo kevward schedule install (or ssh-gate schedule.install) once on existing hosts.
  • report: a failed apt-get update or 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_at in the JSON.
  • audit: whether [audit] allowed_forced_commands matched (#224). A line
    under the audit table per pattern, the loaded patterns on forced-command
    findings that are still reported, and audit_allowed_forced in 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.previous and ssh_failed_24h_change_pct; an INFO finding
    when failures at least double (and rise by 50 or more).

kevward 0.19.1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 18:56
3c057f5

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 drops SSH_CONNECTION for the operate role. kevward setup now 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-service and data-kind, so scripts do not depend on the display
    language (report.json remains the way to read the data).

kevward 0.19.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 20:43
4fcfb0e

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 report also writes the run as data
    beside report.html: the report --json object plus schema_version: 1 and
    a summary computed exactly as the HTML header (counts per severity,
    act_now, kev with the applicable CVEs, attack with fail2ban / sshd
    totals, their window and firewall drops). ssh-gate report.get takes
    format: "data" to return it.
  • report.html carries the header counts as kevward-count-* meta tags, and
    last-run.json has the same counts.

kevward 0.18.2

Choose a tag to compare

@github-actions github-actions released this 22 Nov 09:39
38504e4

ssh-gate job.get now works with the read role (#208).

  • Fix: ssh-gate job.get with the read role said not_found (#208).
    /var/lib/kevward/jobs/ was root-only. The directory is now 0755 and job
    files and logs 0644 (a 0750 directory from 0.18.0/0.18.1 is corrected
    on the next job). A job that exists but cannot be read is forbidden, not
    not_found.

kevward 0.18.1

Choose a tag to compare

@github-actions github-actions released this 22 Nov 08:33
2b558b1

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 (and reboot.schedule / reboot.cancel) failed with
    ValueError when nothing was scheduled (#203).
    logind reports "no schedule"
    as USEC_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-gate internal errors now carry the first line
    of the message, not only the exception type.
  • Fix: kevward setup --fail2ban-ignore wrote a drop-in that stops fail2ban
    at its next start (#204).
    %(known/ignoreip)s does not work in [DEFAULT].
    The drop-in now lists fail2ban's default, the ignoreip already in effect,
    and the new addresses. It is checked with fail2ban-client -t and removed
    or restored if rejected; reload only runs after the check passes.
  • kevward setup: the authorized_keys lines 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 = true in the same
    validated, backed-up write as --ssh-gate.

kevward 0.18.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 07:33
6b0db7c

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's shutdown -r, only with [policy] allow_reboot = true, 5 minutes to 7 days ahead, and conflict on an
    existing schedule unless replace. reboot.cancel (operate) runs
    shutdown -c.
  • ssh-gate: report timer (#199). schedule.status (read) and
    schedule.install (operate) expose kevward schedule status / install.
  • ssh-gate: plan / apply.start / job.get (#197). plan returns the
    dry-run plan with a plan_hash. apply.start re-plans as root, refuses
    with conflict if the hash changed, and runs kevward apply --yes --expect-plan <hash> --job <id> in a transient systemd unit, optionally
    scheduling a reboot afterwards if one is needed. job.get returns 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

Choose a tag to compare

@github-actions github-actions released this 22 Nov 06:46
d4b9072

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 --yes it
    is a dry run, and --json prints 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.conf mentions kevward, it
      returns conflict and 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.
  • 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 .ssh or authorized_keys is
        refused, and the file is written atomically.
    • --operate-key also writes the exact-match sudoers file, checked with
      visudo -cf and installed 0440.
    • --ssh-gate enables the gate in config.toml. The config is validated
      (#186) and backed up first.
    • --timer installs the daily report timer.
    • --fail2ban-ignore adds an ignoreip drop-in that keeps earlier
      settings.
    • --refresh is reserved for the post-update steps of self.update.
    • Running it twice changes nothing. --dry-run lists the changes,
      --json prints 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.Z is accepted. The package name is fixed.
    • pip runs as --isolated with a clean environment and PyPI as the only
      index, under a lock and a 300 s limit. Afterwards the new
      kevward --version is checked.
    • It is refused unless kevward runs from the /opt/kevward venv, 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_s and
      pip_tail. An unknown version returns not_found, and a concurrent run
      returns conflict.
    • Each update is logged and shown in the report for 7 days.
    • The version op now reports install, self_update and min_version.
    • util.run gained clean_env.

kevward 0.16.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 00:13
263c056

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 read role (no sudo) offers version, report.get (HTML or JSON),
      config.get and config.schema (every key, type, default, help text and
      whether it is writable).
    • The operate role (sudo -n, exact-match sudoers) adds config.set.
    • config.set only 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.
    • audit recognises the gate's own forced commands.
  • Config: ignored settings are reported (#186). On 2026-11-22
    allowed_outbound written below a new [report] table became
    report.allowed_outbound and 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
    setting allowed_outbound in [report]; ignored — did you mean [audit]?") on
    stderr for every command, a MEDIUM finding and a note on the config line in
    the report, and config_warnings in the JSON. Loading still continues. The
    audit section shows how many allowed_outbound / allowed_forced_commands
    rules were loaded (audit_rules in the JSON).

kevward 0.15.0

Choose a tag to compare

@github-actions github-actions released this 21 Nov 16:05
88de5ec

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 ja for 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
    lang is a config error.

kevward 0.14.3

Choose a tag to compare

@github-actions github-actions released this 21 Nov 08:00
bb5c37a

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).

  • apply says what happened (#171). The dry run on www printed only
    DRY RUN, blank lines and reboot 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 update was silently ignored and now prints WARNING: apt-get update failed (…); the plan below may be stale and 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), or will be required once pending updates not in this plan are installed; nothing when neither applies.
      The apt plan (and apt-get update) is now computed once per run and
      shared by every apt plugin instead of once per plugin. JSON adds
      apt_refresh.
  • 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 as php8.3 8.3.36 → 8.3.37 did not say whether it meant the
    whole php8.3 source or only the php8.3 metapackage (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_versions and updated_packages to apt
    findings (one extra dpkg-query -W per run).
  • audit: the allowed_outbound summary 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". Now allowed outbound: 0 (rules: tor:9001; no matching connection at scan time), and
    audit_allowed_outbound in JSON lists every rule, at 0 when idle.