Skip to content

Fail the address scan when git cannot list files - #54

Merged
jmjava merged 1 commit into
mainfrom
cursor/fail-closed-git-ls-files
Nov 1, 2026
Merged

jmjava merged 1 commit into
mainfrom
cursor/fail-closed-git-ls-files

Conversation

@jmjava

@jmjava jmjava commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • git ls-files failing, or git missing, returned an empty file list, and the committed-address check treated that as a clean tree.
  • The scan now fails closed when the listing cannot be read. A caller that passes an explicit file list is unchanged, including an empty list.

Test plan

  • Mocked nonzero git ls-files and OSError both fail committed_ips (they passed before this change)
  • tests.test_safety and tests.test_deployment_safety_ci pass with no live Ollama
  • CI unit and mutation checks green

Made with Cursor

A failed git ls-files used to look like an empty tree, so the committed-address check passed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jmjava
jmjava merged commit 41c498d into main Nov 1, 2026
5 checks passed
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.

1 participant