You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(safeoutputs): trim() mode-line check and differentiate NotFound metadata errors
Two minor review fixes on PR #549.
1. validate_patch_paths now compares mode lines after a full trim() rather
than trim_end(). trim_end() leaves leading whitespace intact, so a line
like ' new file mode 120000' would silently bypass the check. Git's own
format-patch never produces leading-indented mode lines so this was not a
realistic attack path, but trim() costs nothing and closes the gap. The
existing test now also covers the leading-whitespace and CRLF cases.
2. push_file_change_skipping_symlinks now distinguishes io::ErrorKind::NotFound
from other metadata errors. NotFound is a normal transient condition
(worktree mid-rebase, file pruned by git apply, etc.) and is logged at
debug level. PermissionDenied and other unusual kinds remain at warn so
triage isn't drowned by alert fatigue from benign races.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments