Skip to content

Tracking: four command-classification guard defects found in one cook session (#4937 #4938 #4940 #4941) #4946

Description

@Trecek

Tracking issue. No work is done here — this coordinates four command-classification guard defects and records the one hard ordering constraint between them.

Origin

All four were found in a single interactive autoskillit cook session that was trying to do one ordinary thing: push a branch and open a PR. Three of them blocked benign work; the fourth was found while verifying the third and lets genuinely dangerous work through.

None are fixed by upgrading. Every one reproduces identically on installed 0.10.1013 and repo 0.10.1103.

The four

# Defect Direction Label Prod LOC Tests Complexity
#4938 gh api with a \ line-continuation denied as "multiple routes" false positive recipe:implementation ~4 ~30-50 Low
#4940 Any gh inside a shell loop denied, including read-only subcommands false positive recipe:implementation ~10-20 ~40-60 Low-Medium
#4937 Every git push to a named remote denied against all checked-out refs false positive recipe:implementation ~20-40 ~60-100 Medium
#4941 Heredoc body consumer never determined — inert bodies classified as commands, executed bodies invisible both recipe:remediation ~50-90 ~120-200 Medium-High

Ordering

There is only one hard dependency, and it is internal to #4941: consumer recognition must be built and tested before any inert-body carve-out ships, or the carve-out silently removes the only coverage currently catching an executing bash <<EOF heredoc. That constraint is documented in #4941 with a before/after regression table.

The three recipe:implementation issues touch different files and functions and have no technical dependencies on each other or on #4941. The sequence below is by risk and payoff, not by necessity — reorder freely.

#4938  ~4 lines, zero coupling. Unblocks multi-line gh api immediately.
   ↓
#4940  contained conditional. Unblocks the batched gh reads AGENTS.md § 3.3 asks for.
   ↓
#4937  largest day-to-day unblock — git push to a named remote currently always fails.
   ↓
#4941  security boundary, both directions, self-constraining. Land last, alone.

If optimising for user-visible impact rather than risk, #4937 can move first — it is the one that stops work outright.

Why #4941 is the only remediation

#4938, #4940 and #4937 each have a known, localized fix: a missing branch, a too-coarse conditional, and a wrong assumption in one function. Each issue carries the intended fix.

#4941 is a missing concept, not a missing branch. Nothing in command classification models which consumer evaluates a heredoc body, and that single omission produces two opposite defects that constrain each other's fix. It spans several functions, needs new logic in _segment_evaluates_shell_payload (which today returns False for (['bash'], <body>)), needs _HEREDOC_BODY_RE to capture delimiter quoting it currently discards, and sits on a security boundary reached by many guards.

#4938 was originally filed as part of #4941 and split back out once it was confirmed independent of heredocs entirely — that split is what reduced it to a ~4-line change.

Shared context

Verification note

Each issue's claims were reproduced by executing the real classifiers rather than by reading
alone, and were then reviewed adversarially. That process corrected three wrong root causes and
one unsafe fix proposal before these were finalised — notably, an earlier version of #4941's fix
direction would have opened a security hole, and an earlier version of #4937 cited a test gap
that does not exist (the test exists but is vacuous, because it runs against a non-git
tmp_path).

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions