T06 · System Persistence
- Location
install.sh:45- Finding
Persistent LaunchAgent with Automatic Restart
- Content
View full analysis
"$PLIST_PATH" << PLIST Label com.screen-life.daemon ProgramArguments $PYTHON $SCRIPTS_DIR/activity_daemon.py RunAtLoad KeepAlive StandardOutPath $MONITOR_HOME/daemon.log StandardErrorPath $MONITOR_HOME/daemon.err PLIST launchctl load "$PLIST_PATH" 2>/dev/null || launchctl bootstrap gui/$UID "$PLIST_PATH" 2>/dev/null || true ``` ### Technical Analysis The installer creates a macOS LaunchAgent in `~/Library/LaunchAgents`, configures it to run automatically at login through `RunAtLoad`, and instructs launchd to restart it continuously through `KeepAlive`. A user-level LaunchAgent is related to the Skill's advertised always-on monitoring functionality and does not require root privileges. However, `KeepAlive` creates stronger persistence than is necessary for on-demand or periodically scheduled report generation. The service survives the original Skill invocation and subsequent login sessions. The command also suppresses all launchctl errors and ends with `|| true`. Consequently, the installer always reports that the daemon started successfully, even if service registration failed. This prevents users from accurately determining whether persistent monitoring is active. ### At ...[truncated 950 chars]- Remediation
View remediation
