[Security] Harden installer shell hook execution and command trust boundary #237

Closed
opened 2026-07-11 12:51:01 +02:00 by zemion · 1 comment
Owner

Bandit and Semgrep both flag shell execution in the module installer. This is the highest-severity finding in the full GovOPlaN audit.

Classification: structural security work.

Report evidence:

  • govoplan-core/src/govoplan_core/core/module_installer.py:2614 restart command uses subprocess.run(..., shell=True).
  • govoplan-core/src/govoplan_core/core/module_installer.py:3224 database backup/restore hook uses subprocess.run(..., shell=True).
  • Bandit: B602 high; Semgrep: subprocess-shell-true.

Suggested next steps:

  • Define a structured argv contract for restart/database hooks or a tightly validated command allowlist.
  • Preserve operator flexibility without passing arbitrary strings to a shell.
  • Keep secret redaction already implemented for records/stdout/stderr.

Baseline report directory: audit-reports/govoplan-full-20260711-1238

<!-- codex-audit-full-2026-07-11:core-installer-shell-hooks --> Bandit and Semgrep both flag shell execution in the module installer. This is the highest-severity finding in the full GovOPlaN audit. Classification: **structural security work**. Report evidence: - `govoplan-core/src/govoplan_core/core/module_installer.py:2614` restart command uses `subprocess.run(..., shell=True)`. - `govoplan-core/src/govoplan_core/core/module_installer.py:3224` database backup/restore hook uses `subprocess.run(..., shell=True)`. - Bandit: `B602` high; Semgrep: `subprocess-shell-true`. Suggested next steps: - Define a structured argv contract for restart/database hooks or a tightly validated command allowlist. - Preserve operator flexibility without passing arbitrary strings to a shell. - Keep secret redaction already implemented for records/stdout/stderr. Baseline report directory: `audit-reports/govoplan-full-20260711-1238`
zemion added the
type
bug
priority
p1
status
ready
module/core
codex/ready
labels 2026-07-11 12:51:01 +02:00
Author
Owner

Closing as duplicate of existing govoplan-core#232. Full-audit evidence has been posted there.

Closing as duplicate of existing `govoplan-core#232`. Full-audit evidence has been posted there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-core#237
No description provided.