Skip to content

fix(formatters): PATH probe notices + monorepo markdownlint walk (#2732) - #2801

Merged
kyle-sexton merged 2 commits into
mainfrom
cursor/2732-formatter-path-8f91
Aug 16, 2026
Merged

fix(formatters): PATH probe notices + monorepo markdownlint walk (#2732)#2801
kyle-sexton merged 2 commits into
mainfrom
cursor/2732-formatter-path-8f91

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Summary

Fleet inventory of formatter/lint command -v probes (docs/formatter-path-probes.md). Sibling hooks now emit accurate degraded notices (this-edit / notice-only latch / environment inheritance / PATH probed:) without nvm layout guessing. markdown-format walks from the edited file up to $REPO_ROOT for workspace node_modules/.bin installs.

Test plan

  • plugins/markdown-format/hooks/markdown-format.test.sh — 149/149 (includes monorepo walk)
  • plugins/bash-format/hooks/bash-format.test.sh — PATH diagnostic assert
  • plugins/actionlint/hooks/actionlint-check.test.sh — minimal-PATH absent notice

Related

Closes #2732

… walk (#2732)

Inventory fleet hook probes, align degraded notices with notice-only latch +
PATH probed diagnostics (no nvm layout guesses), and resolve markdownlint from
workspace node_modules/.bin by walking from the edited file.

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@claude

claude Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 4m 33s —— View job


Security review (/review:security-review)

Reviewed the diff against origin/main (git diff origin/main...HEAD, HEAD ce5f44a). Scope: 25 changed files — 24 are notice-text/version-bump/test-only changes (the new PATH probed: ${PATH} diagnostic lines echo the hook's own inherited PATH back into its own advisory notice; not attacker-influenced input and not a meaningful disclosure). The one file with real logic changes is plugins/markdown-format/hooks/markdown-format.sh's resolve_repo_markdownlint(), rewritten to walk from the edited file up to $REPO_ROOT for monorepo node_modules/.bin installs.

1 finding posted inline (severity: IMPORTANT):

  • plugins/markdown-format/hooks/markdown-format.sh#L466-L492permalink. The refactor changed the symlink-follow loop's three failure branches (depth-limit exceeded, readlink failure, missing cygpath for a Windows-style link target) from return 1 to break. Because the function always returns the original unresolved $candidate path (not the manually-walked $target), and the kernel independently fully resolves symlinks at exec time (Linux ELOOP ≈ 40, past this loop's 32-hop cap), a 33-hop relative symlink chain planted under node_modules/.bin/ can pass this function's own trust-boundary validation while its final, unread hop actually resolves outside the repository — defeating the exact protection the function's header comment (L448-453) describes ("rejects a checked-in or replaced .bin symlink that escapes the repository trust boundary"). No test in markdown-format.test.sh covers resolve_repo_markdownlint's own binary-resolution symlink chain (only the edited-file-escape case and the new monorepo happy path are tested). Full exploit chain and a suggested fix (restore return 1 for these three branches) are in the inline comment.

No other security-relevant findings — no injection, auth/access-control, secrets handling, or GitHub Actions permission/trigger issues in this diff (the .claude-plugin/plugin.json and CHANGELOG.md changes are version-bump/doc only).
· branch cursor/2732-formatter-path-8f91

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce5f44ad2d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/markdown-format/hooks/markdown-format.sh Outdated
Comment thread plugins/markdown-format/hooks/markdown-format.sh
@github-actions

Copy link
Copy Markdown
Contributor

Last security-reviewed head: ce5f44ad2d6ffdb5c8fbedf50da178f0785c9357. On the next push, the relevance gate compares only the commits since this SHA; delete this comment to force a full re-review.

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
@kyle-sexton
kyle-sexton merged commit 3715b10 into main Aug 16, 2026
43 checks passed
@kyle-sexton
kyle-sexton deleted the cursor/2732-formatter-path-8f91 branch August 16, 2026 00:27
@claude

claude Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Claude finished @cursor[bot]'s task in 2m 38s —— View job


Code review (/review:code-review)

  • Gather context (PR 2801, head da8cd42e)
  • Determine actual PR diff scope
  • Review changed files
  • Post findings

Skip gate hit: PR is already merged.

PR 2801 is in the MERGED state, which is condition 1 of the code-review skill's skip gate ("PR is closed or not open") — per the skill, deep review stops here and nothing further is posted.

For context on what I verified before stopping: I diffed head da8cd42e against origin/main and confirmed every file this PR touches (docs/formatter-path-probes.md, and the markdown-format/actionlint/bash-format/biome-format/go-format/ruff-format/typos-format plugin files) is byte-identical to what's already on main — including resolve_repo_markdownlint() in plugins/markdown-format/hooks/markdown-format.sh, where the three symlink-follow failure branches already use return 1 (not the break that the earlier Codex and Claude reviews on this PR flagged as a trust-boundary bypass). That fix is present on origin/main already, so there's nothing outstanding to re-review or re-flag.

@github-actions

Copy link
Copy Markdown
Contributor

Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

formatter fleet: hook binary probes are blind to profile-managed PATH layers in managed/cloud sessions

2 participants