Skip to content

[Bug bounty] capsule.schedule.update: invalid schedule inputs are not validated and the approval dialog hides silently-dropped values #262

Description

@mobster31

Eligibility

  • Found by using the Monk product through the MCP tool surface (not by reading source).
  • Reproducible with tools only.
  • Cross-verified across independent sources.
  • Not a duplicate of an existing issue (dedup check below).

Stage: deployment / capsule scheduling configuration.
Coding agent: Claude Code (Opus 4.8), Monk plugin monk-agent v0.1.54.
Tool: monk.capsule.schedule.update (+ monk.capsule.schedule.get).


Summary

monk.capsule.schedule.update performs no validation of rule inputs before rendering the
security-approval prompt
, and the prompt shown to the user is a sanitized view that no longer
matches what was submitted:

  1. An invalid weekday (funday) is silently dropped. The approval dialog shows only the
    surviving day ([mon]) — the approver has no way to see that part of their submitted rule was
    discarded. A typo therefore silently narrows a schedule rule, and the security-approval dialog
    misrepresents the request being approved.
  2. An impossible time (25:99) and a nonexistent IANA timezone (Mars/Phobos) are passed
    into the approval prompt verbatim, unvalidated.
  3. After the user approves the change, monk.capsule.schedule.get still returns
    Not configured — the approved change does not persist and no error is surfaced to either
    the user (the approval simply vanishes) or the caller (the MCP call returned The operation timed out.).

So the tool both (a) accepts structurally-invalid schedule data without rejecting it, and (b)
misrepresents that data in the very dialog meant to let a human authorize the change.


Reproduction (tools only)

Bound workspace: monk.scope.status → personal / project monk-test-app (no capsules required;
project-scope schedule works with zero capsules).

  1. Confirm no schedule exists:
    monk.capsule.schedule.get { scope: "project" }
    → { schedule: null, summary: ["Not configured."] }
    
  2. Submit a schedule containing invalid values:
    monk.capsule.schedule.update {
      scope: "project",
      enabled: true,
      defaultState: "down",
      timezone: "Mars/Phobos",
      rules: [{ type: "weekly_window", days: ["funday","mon"],
                start: "25:99", end: "08:00", state: "up" }]
    }
    
  3. Observe the approval prompt the tool generates (rendered plan):
    Proposed:
      Enabled: true
      Timezone: Mars/Phobos
      1. up weekly [mon] 25:99-08:00
    
    funday is gone (silently dropped to [mon]); 25:99 and Mars/Phobos are kept verbatim.
    No validation error is returned; instead a destructive-config approval is queued.
  4. Approve the change in the dashboard.
  5. Read the result back:
    monk.capsule.schedule.get { scope: "project" }
    → { schedule: null, summary: ["Not configured."] }
    
    → The approved change did not persist, and no error was surfaced anywhere.

Cross-verification (3 independent sources)

  1. MCP tool output — the schedule.update rendered plan (approval preview) shows
    weekly [mon] 25:99-08:00 and Timezone: Mars/Phobos: proof that funday was dropped while the
    impossible time and fake timezone survived unvalidated.
  2. On-disk approval record~/.monk/agent/store/global/requests/approvals.json, entry
    aae62ed2 (monk.capsule.schedule.update), independently persists the same sanitized body and
    records status: approved, createdAt 2026-08-05T21:09:23.005Z, resolvedAt 2026-08-05T21:10:25.597Z. A prior identical attempt (0c67d192) shows the same drop.
  3. Post-approval platform readmonk.capsule.schedule.get { scope: "project" } returns
    Not configured after the approval resolved, confirming the approved change was never applied
    and no validation/apply error was surfaced.

Root cause

Two distinct defects on the same tool:


Impact

  • Approval integrity (security): a security-approval dialog must show exactly what is being
    authorized. Here it shows [mon] after silently discarding funday — the human approver cannot
    detect that their submitted request was altered before approval.
  • Correctness / availability: a mistyped weekday silently changes which days a capsule is
    scheduled up/down; an impossible time (25:99) and nonexistent timezone (Mars/Phobos) are
    accepted into the plan with undefined downstream scheduling behavior.
  • Broken lifecycle: an approved configuration change is silently a no-op — the user believes
    they configured a schedule, but nothing was stored and no error was raised.

Expected vs actual

  • Expected: invalid days/timezone/time values are rejected with a clear error before any
    approval prompt; the approval dialog shows exactly the submitted rule; an approved change either
    persists or surfaces an explicit failure.
  • Actual: invalid weekday silently dropped, impossible time and fake timezone accepted verbatim
    into the approval prompt, and the approved change neither persists nor reports an error.

Environment

  • OS: Windows 11 Pro (native monk-agent v0.1.54; runtime in WSL Ubuntu-Monk).
  • Monk CLI/daemon: v3.21.1, build: 0ecb47b4.
  • Scope: personal / monk-test-app, project-scope capsule schedule, zero capsules.

Dedup check

gh search issues -R monk-io/monk-plugin "schedule" → only #96 (audit-log growth, unrelated).
gh search issues -R monk-io/monk-plugin "capsule"#252 (capsule.setup GitHub-secret write,
different tool/bug). No existing issue covers capsule.schedule.update validation or the
schedule approval lifecycle. Related-but-distinct: #260 (secret.remove approval lifecycle) shares
the timeout root cause but is a different tool and a different (data-loss vs no-op + validation)
manifestation.

Payout

N/A — reported for the Monk bug bounty; no payout expected for this report itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:claude-codebug-bountyFiled during the July 2026 Monk plugin bug bountydeepDeep-dive bonus: +2pts for testing deploy/CI-CD/cluster/secrets features, not install/scriptingeffort:mediumimpact:highkind:bugos:allver:v0.1.54Reported against Monk plugin v0.1.54

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions