Skip to content

[HIGH] killTask is fire-and-forget and omits --region → failed cancel silently leaks a billable instance #58

Closed

Description

@scttfrdmn

Severity HIGH (2026-06 audit). SpawnTaskHandler.groovy:217-228. killTask() runs spawn cancel <name> and discards the exit code (only warn-logs); a non-zero cancel is indistinguishable from success → instance bills until TTL (default 2h). It also omits --region (line 221) although this.region is in scope and used by launch/status — so cancel can target the wrong region and never find the instance, directly causing the leak (the nf-<hash> name isn't globally unique). Fix: pass --region this.region; capture+check the exit code; log at error with instanceName+region; consider a bounded retry. Treat a failed cancel as a cost incident. P1.

Activity

  1. added
    bug
    on Jun 15, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions