Skip to content

fix: prevent executable planting during sfw lookup - #190

Merged
fengmk2 merged 5 commits into
mainfrom
fix/sfw-path-lookup
Oct 8, 2026
Merged

fengmk2 merged 5 commits into
mainfrom
fix/sfw-path-lookup

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

When sfw is enabled, command lookup can execute a repository-controlled program. Later lookup of the bare sfw name can also select a rejected workspace binary.

Find native executables directly in fully qualified PATH directories. Exclude empty and relative entries, including Windows paths without a drive or UNC share. Compare filesystem identities to exclude all aliases of the current directory, including case aliases on case-insensitive volumes.

Carry the selected absolute path into dependency installation and retries for GitHub Actions, GitLab CI/CD, and Azure Pipelines. Use the same path handling for downloaded and cached binaries. Keep the decision to prepend the vp argument separate from the executable path.

@fengmk2
fengmk2 force-pushed the fix/sfw-path-lookup branch from e58b235 to 6b4f5ae Compare October 8, 2026 06:02
@fengmk2
fengmk2 merged commit 77e445c into main Oct 8, 2026
82 checks passed
@fengmk2
fengmk2 deleted the fix/sfw-path-lookup branch October 8, 2026 06:50
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