Skip to content

homelab_aptUpdate upgrade:true runs apt-get upgrade without the confirm gate #91

Closed

Description

@TMHSDigital

Summary

homelab_aptUpdate with upgrade: true runs sudo apt-get upgrade -y without the confirm=true gate. The project's own policy is that tools which change running state must require confirmation.

Where

  • mcp-server/src/tools/aptUpdate.ts:6-24
  • CLAUDE.md, Security section (list of confirm-gated tools)
  • skills/os-update-management/SKILL.md:52,114, which tells the agent to call it with upgrade: true
  • README.md:170 (described as "Run apt update, list upgradable packages")

Details

upgrade: true appends sudo apt-get upgrade -y, which upgrades packages and can upgrade Docker, the kernel, or firmware. Less disruptive tools are gated: composeUp, serviceRestart, and backupRun all require confirm.

Impact

A single tool call upgrades every package on the host with no confirmation step. That is inconsistent with the documented safety model.

Suggested fix

  • Use confirmParam and confirmCancelled from utils/confirm-param.ts when upgrade is true. Alternatively, split the upgrade into a separate gated homelab_aptUpgrade tool.
  • Update CLAUDE.md, README.md, and the os-update-management skill to match.

Acceptance criteria

  • upgrade: true without confirm: true returns the cancelled message and runs nothing
  • The gate is covered by an integration test
  • The docs list the tool as gated

Getting started

  • Relevant files: mcp-server/src/tools/aptUpdate.ts, mcp-server/src/utils/confirm-param.ts, mcp-server/src/tools/__tests__/integration.test.ts
  • How to run tests: cd mcp-server && npm test

Filed by repo-audit/full-audit at 9cfe5e3. Severity: medium. Effort: S. audit-key: security|mcp-server/src/tools/aptUpdate.ts|upgrade

Activity

  1. added
    bug
    good first issue
    severity: medium
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issueseverity: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions