T06 · System Persistence
- Location
scripts/install.py:63- Finding
Persistent Auto-Restarting Docker Service
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install.py, lines 63-69
Vulnerability Type: Persistent background service
Risk Level: MediumVulnerable Code
python run( "docker run -d --name searxng-local " "-p 127.0.0.1:8080:8080 " f"-v {SETTINGS_FILE}:/etc/searxng/settings.yml " "--restart unless-stopped " "searxng/searxng" )Technical Analysis
The installer starts the container in detached mode with
-dand applies the Docker restart policyunless-stopped. Consequently, the container continues running after the invoking process or agent session ends and may restart automatically when the Docker daemon or host restarts.This persistence is disclosed in
SKILL.md, and the container only publishes its port on127.0.0.1. Nevertheless, it creates a cross-session system service rather than a process limited to the current skill invocation.Attack Path
- A user or agent executes
scripts/install.py. - The script creates the detached
searxng-localcontainer. - Docker records the
unless-stoppedrestart policy. - The skill invocation ends, but the container remains active.
- After a host or Docker daemon restart, Docker starts the container again unless it was explicitly stopped.
Impact Assessment
The persistent container can consume processor, memory, network, and storage resources outside the initiating session. It continues executing the selected container image with access to the mounted settings file. The service is restricted to localhost at the host-port level, reducing remote exposure, but any local process can potentially interact with it. Creation of the service requires access to the local Docker daemon.
- A user or agent executes
- Remediation
View remediation
Remediation Suggestions
- Remove
--restart unless-stoppedfrom the default installation path. - Run the container in the foreground or use
--rmwhen the service only needs to exist for the current session. - If persistence is required, require an explicit option such as
--persistentand obtain informed user consent before creating the service. - Display the exact container lifetime and removal command before installation.
- Add a supported uninstall routine that stops and removes the container and verifies that no persistent resources remain.
- Consider applying resource limits such as
--memory,--cpus, and--pids-limit.
- Remove
