SYSwarden after a dpkg interruption

What survives an interrupted dpkg removal? Follow PR 452 across Debian, Alpine and RPM, with cold-boot results, public evidence and a hands-on Python demo.

Linux server with a lit amber status indicator beside a shield on its front panel.

What happened between two boots

Engineering update, November 30, 2026, 14:00 Brussels time. Cold-boot recovery passed on Debian and two Alpine scenarios succeeded. PR 452 remains a draft. This report ties each result to the revision and conditions actually tested.

On the Debian test disk, dpkg had already removed the package when the operation was interrupted. The package database alone could not answer the next question. Could SYSwarden finish the authorized removal after the process that started it had disappeared? At the first cold boot, the journal still identified the pending transaction. Recovery rejected an incorrect approval, accepted the original approval once, then rejected a second attempt to use it.

After another cold boot, an independent check verified that active product state was gone. An authorized SSH connection still worked. An independent nftables policy still filtered real traffic, and an unrelated Fail2ban jail still enforced its ban. Those observations answer the two questions an operator faces when retiring security software. Has it finished leaving the machine? What still protects the host? Cold-boot result for Debian candidate 90f589fb.

Installing SYSwarden and choosing protections

Opened on October 24, PR 452 proposes that a fresh installation stage an inactive TOML configuration. Installing the package must leave SSH and firewall settings unchanged, keep detection modules inactive, and schedule no threat-list downloads. The administrator chooses protections, reviews their effects, then approves activation. An upgrade must preserve the choices already in effect. PR scope · Configuration and activation guide.

  • For intrusion detection, a log event can authorize a ban or an external report only after its producer has been authenticated. Temporary BunkerWeb bans must retain their source and expiry. The PR records this criterion as verified. Detection criteria.
  • Since the November 19 revision, the selector offers Standard Data-Shield, custom feeds, or no lists. Debian tests verified that the administrator’s nftables rules still filtered traffic after reload and reboot. For existing WireGuard v1 policies, the PR records checks that prevented an unwanted service start, retired the specific runtime rules, verified authenticated traffic, and exercised recovery. Network checks by scenario · Feed choices and migration.

The fourth completed criterion covers host hardening. Migration to a dedicated SSH file was checked against an independent authenticated connection. To finish recovery, the product also has to establish that the running system actually consumed the policy. Further activation effects remain under review. Hardening and activation criteria.

From installation to removal

The November 14 delivery scope covers Linux AMD64 DEB, RPM and APK packages. The syswarden-base package specifies the base dependencies for fresh installations. The historical syswarden package keeps its dependencies on upgrade. Both contain the product executables. Tests must also confirm that package-manager selections, shared files and independent protections survive. Roles of the two packages · Delivery scope and documentation requirements.

Ten Debian removal cases, three separate decisions

The Linux AMD64 campaign covered both package identities, syswarden and syswarden-base. Each native case started from a separately restored, controlled installation bound to its signed lab archive. Direct purge started with the package installed. Running purge after remove would have exercised a different starting state.

Debian removals on local candidate 90f589fb
Entry pointResultWhat the check established
syswarden uninstall2 of 2The standalone CLI removed active components for each identity. Independent access and filtering survived a reload and a cold boot.
apt remove and dpkg --remove4 of 4Both managers ran against both identities. Checks included package-specific files and the native registration state.
apt purge and dpkg --purge4 of 4Starting from four separate installed states, direct purge cleared registration while preserving independent configuration and protection.

An earlier result explains why this matrix matters. On 08184e80, the four native removals kept independent protection working, yet every stopped disk still contained the package’s executable postrm script. All four therefore failed the complete-removal requirement. The record preserves that failure and attributes the ten later passes to the candidate on which they were observed. Debian results by command and candidate.

On Alpine, who owns the hook directory?

A hook is a program APK calls during an operation. The directory holding these programs may already contain an administrator’s hooks. The new package keeps the signed source of its own hook under /usr/lib/syswarden. This lets it track and retire the individual entry it installed. For each package identity, two build paths produced unsigned archives that matched byte for byte. The native cases then used archives signed with lab keys.

Two Alpine scenarios with a pre-existing shared directory on local candidate 8e998b28
System and packageSequenceObservation after boot
Alpine 3.22.7
syswarden-base
Controlled fresh install followed by apk del.Two cold-boot checks. The original directory retained its identity, the administrator’s hook still ran and active product files were gone.
Alpine 3.24
syswarden
Interruption after APK closed its transaction and before hook publication. Resume, then apk del --purge.Four distinct boots. The original staged file survived the first cold boot. Recovery published that same file, and subsequent purge preserved the administrator’s hook.

The timing matters. The second case interrupted installation before the hook became active. Interrupting its withdrawal is a separate experiment. Six other version, identity and removal combinations remain in this matrix. A shared directory initially absent and transitions from older packages also need native evidence. Alpine validation record.

An upgrade passed. First-install provenance is still open

A controlled install can bind verified bytes to the operation from the outset. During a first apt install by name, APT selects the archive before the installed product can intervene. A direct dpkg -i may also read the file before handing control to the package. Finding a file with the same name and contents later can establish that the bytes match. It takes another observation to establish that the package manager consumed the verified file object in that transaction.

A signed, inert Debian package made it possible to interrupt APT selection and retry after a cold boot. The retry used the original package database and the signed archive. In a separate test, the prerequisite verifier rejected a modified archive. End-to-end origin verification for a first ordinary SYSwarden install through APT or dpkg remains open.

Upgrades answer a different question. On 8b5683e9, the public v4.10.4 package upgraded to the three-script lab target. In a separate case the installed CLI reinstalled that exact signed target. Both ran in inactive mode and preserved administrator choices and independent services after a cold boot. An older four-script development package refused the transition before deconfiguring its source installation. Its original state survived and its migration remains open. Upgrade, reinstall and archive-origin results. Public release used as the starting point.

RPM and SELinux, and the effects of a DNF transaction

On AlmaLinux 10.2 AMD64 with SELinux enforcing, DNF resolved lab replacement transactions while preserving the recorded installation reason for 214 packages. That reason distinguishes a dependency from a package the administrator explicitly selected. Losing it could change the outcome of a later automatic cleanup.

During a real upgrade of a signed, inert RPM, an unrelated service marked for restart changed process identity. An unmarked control service kept its process. Two manager reloads also executed an independent generator. Preparation for the SYSwarden upgrade therefore refuses cases whose side effects still need to be accounted for. Resolving the transaction, observing the refusal and applying the actual product RPM are three different outcomes. The last one remains open. DNF experiments, SELinux checks and RPM delivery scope.

How to read the test counts

On 6fc90399, the complete CLI system suite on Debian AMD64 and ext4 recorded 9,514 passing results, zero failures and 14 explicit skips. On 90f589fb, local review then checked the Go security scans, the structure of the SARIF reports, known vulnerabilities in five modules and two secret scans. On 8e998b28, the latest evidence covers the two Alpine scenarios in the table. Adding the numbers together would make separate campaigns look like one run against a single revision. Public record of results and revisions.

Twenty combinations checked inactive staging with a version-matched CLI on Debian 13, AlmaLinux 10, Fedora 44 and Alpine 3.22 and 3.24, across both package names and both build definitions. That coverage answers “What is staged at the beginning?” The removal matrix answers “What remains at the end?” Inactive configuration staging criterion.

A Python demo of recovery after a filename has been reused

Both runs begin the same way. A worker moves an application rule out of a shared directory and exits before recording completion. A fresh process reads the journal. On the second run, an independent file has appeared at the old name. Its bytes match the original exactly.

Download the Python example. Run the two cases from the download directory with Python 3 on a local filesystem that supports hard links. Each command creates its own temporary directory.

python3 -B recover_one_entry.py
python3 -B recover_one_entry.py --replacement

The first run prints Recovery completed. A second run preserved the same receipt. The second prints Recovery deferred. The same-content replacement remains unchanged. Both check the shared directory and the independent administrator rule, including their permissions.

This excerpt shows the decision that protects the replacement. The private hard link identifies the file originally withdrawn. A new entry at the public name leaves the transaction pending.

require(original.samefile(withdrawn), "Withdrawn file differs from the retained inode")
require(digest(withdrawn) == plan["sha256"], "Withdrawn contents changed")
if os.path.lexists(live):
    raise SystemExit(CONFLICT)

The script runs without administrator privileges and removes its temporary directory at the end. Its successful exit means that the observed outcome matched the selected scenario. The example covers a stopped process and a closed set of synthetic files. Power-loss durability, concurrent writers, package-manager behavior and service operation require separate tests.

Check the public state yourself

With an authenticated GitHub CLI, these two read-only commands show the public revision, review state and latest published release. Compare headRefOid with the revision attached to each test. At the November 30, 2026 checkpoint, 14:00 Brussels time, the public head began with 1ac30f02. GitHub reported a draft with merge conflicts and a required review. The published release was v4.10.4. Your output will change as the project moves forward.

gh pr view 452 --repo duggytuxy/syswarden \
  --json isDraft,headRefOid,mergeable,reviewDecision
gh release view --repo duggytuxy/syswarden \
  --json tagName,isPrerelease,url

Both records are also available in a browser. Test checklist. Published releases.

Inspect a real DEB without installing it

Download the stable package from GitHub, then open a terminal in the download directory. On Debian these commands compare the file with its published SHA-256 digest, read its metadata and list its maintainer scripts without executing them. Public v4.10.4 DEB for AMD64.

deb=syswarden_4.10.4_amd64.deb
expected=228c19d73a9191fc01942c741eb6d6bfb1a90381d096f2fb6d18af8988777cdf
printf '%s  %s\n' "$expected" "$deb" | sha256sum --check &&
  dpkg-deb --field "$deb" Package Version Architecture &&
  dpkg-deb --ctrl-tarfile "$deb" | tar -tf -

Expect Package: syswarden, Version: 4.10.4 and Architecture: amd64. The control archive includes preinst, postinst, prerm and postrm. This check establishes what shipped in the starting package. Determining which script ran and what survived a reboot requires native observation.

What has to happen before merge

The public description marked four of twelve acceptance criteria complete at this checkpoint. One box can represent a single decision or a whole test matrix. The remaining work includes ordinary first-install provenance, recovery of an interrupted native repair, transitions from older packages and validation of activation effects across supported platforms. The operator guide and changelog must describe the delivered scope accurately. The integrated implementation then needs its own local review and fresh hosted checks on the final revision. PR 452 merge criteria. Issue 422 requirements.

Publishing v5.00.0 is a separate decision. The Integration, Verification and Validation (IVV) contract requires traceability from source to archives, production signatures, protected acceptance and verification of the assets actually distributed. That is the point at which operators will have a public v5 release to verify for themselves. v5.00.0 release acceptance. SYSwarden’s IVV policy.