audit: add Nix-specific rules#1344
Conversation
dbe924b to
a320ec8
Compare
a320ec8 to
60d8d33
Compare
|
Tested on Lenovo-X1
There is a bug about prolonged start of zathura-vm and gala-vm. I suspect that it might be related. Captured journalctl logs: |
Signed-off-by: Everton de Matos <everton.dematos@tii.ae>
60d8d33 to
0d5455a
Compare
Fix applied. I updated modules/reference/appvms/zathura.nix to adjust the Regarding logs: the missing prior-boot logs on zathura-vm are intentional. This VM is configured to be stateless ( Also rebased the branch. |
|
Checked after the fix that now the audit feature works in every VM as described. Status of |
Description of Changes
Enhances NixOS audit coverage, aligns with Anduril NixOS STIG guidance, removes overlapping/erroring rules, and adds opt-in verbose toggles.
Key Updates
nix-daemonandnix(execve/execveat).nix,nix-store,nix-shell,nix-build,nix-collect-garbage, andnixos-rebuild./etc/nix,/etc/nixos, andnix-daemonunit/socket paths.ghaf.security.audit.enableVerboseCommonghaf.security.audit.enableVerboseOsppPerformance Insights
Storage
audit.logfiles.Memory and CPU
auditd.serviceduring idle (~10 min).MemoryCurrentand peak fromMemoryPeak.cpu_pct).Type of Change
Related Issues / Tickets
Checklist
make-checksand it passesTesting Instructions
Applicable Targets
aarch64aarch64x86_64x86_64x86_64Installation Method
nixos-rebuild ... switchTest Steps To Verify:
extras(#lenovo-x1-extras-debug) - audit will be enabled by default - or set this flag to true (https://github.com/everton-dematos/ghaf/blob/pr_audit_logging/modules/reference/profiles/mvp-user-trial.nix#L102)ghaf-hostwill have a few more rules, as it has specific rules for host (https://github.com/everton-dematos/ghaf/blob/pr_audit_logging/modules/common/security/audit/rules/host.nix)enableVerboseCommon,enableStig,enableOspp,enableVerboseOspp), it is mandatory to set it astrue, as follows:auditd.serviceandaudit-rules.serviceare up and running bysystemctl status <service>sudo auditctl -l/var/log/audit/files