Skip to main content

Module dotfile_protection

Module dotfile_protection 

Source
Expand description

Comprehensive dotfile protection system.

This module implements protection for hidden configuration files (dotfiles) to prevent automatic or implicit modifications by AI agents or automated tools.

Features:

  • Explicit user confirmation with clear disclosure
  • Immutable audit logging of all access attempts
  • Whitelist mechanism with secondary authentication
  • Cascade prevention (blocking chain reactions)
  • Backup and restore functionality
  • Permission preservation

Structs§

AccessContext
Context for a dotfile access request.
AuditEntry
A single audit log entry.
AuditLog
Immutable audit log for dotfile access.
BackupManager
Manager for dotfile backups.
ConfirmationRequest
Request for user confirmation.
DotfileBackup
Metadata for a dotfile backup.
DotfileGuardian
The Dotfile Guardian.
ProtectionViolation
A protection violation.

Enums§

AccessType
Type of access being attempted.
AuditOutcome
Outcome of a dotfile access attempt.
ProtectionDecision
Decision from the dotfile guardian.

Functions§

get_global_guardian
Get the global dotfile guardian.
init_global_guardian
Initialize the global dotfile guardian.
is_protected_dotfile
Check if a path is a protected dotfile using the global guardian.