Converge security.alerts on a running machine #36
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel!36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/converge-security-alerts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Brief section 4, principle 1:
applyconverges and is safe to re-run.security.alertswas written once by the85secalertshook at first boot, andkeel diffcompared it from then on, so an alias changed behind the spec was drift that nothing could correct. First field of keel#35.Fix
spec apply --systemconverges the two traces the hook leaves andinspectreads back:root:line of/etc/aliases, replaced in place or appended, other lines kept, thennewaliaseson the live system;MAILON="output"andMAILTO="root"in/etc/cron-apt/config, in place, comments kept; a machine without cron-apt gets the alias only.skipremoves a root alias that mails off the machine and nothing else. An/etc/aliasesthat exists but cannot be read is refused. The planner reads throughkeel.inspect.security.root_alias, the readerinspectuses, so the two sides cannot disagree.Not done, on purpose: registering the address with hub.turnkeylinux.org, which the hook does (brief 5.6).
Evidence
tests/test_system_security.py: 15 planner tests.tests/test_apply_system_cli.py: on the fixture machine, an alias changed behind the spec is drift,apply --system-only --rootconverges it,diffis same at exit 0, and a second run makes 0 changes. The full inspect/apply/diff round trip now requiressecurity.alertsto be same too.debian/changelog,pyproject.tomlandkeel/__init__.py.