Skip to content

fix: make plugin path safety checks cross-platform#272

Merged
ckakgun merged 1 commit into
heymrun:mainfrom
VeraPyuyi:fix/plugin-path-safety-cross-platform
Jul 1, 2026
Merged

fix: make plugin path safety checks cross-platform#272
ckakgun merged 1 commit into
heymrun:mainfrom
VeraPyuyi:fix/plugin-path-safety-cross-platform

Conversation

@VeraPyuyi

Copy link
Copy Markdown
Contributor

Summary

  • replace Windows-fragile plugin path prefix checks with Path.relative_to
  • keep plugin zip-slip and icon traversal protection intact
  • add regression coverage for nested plugin archive members

Root cause

The previous containment checks compared resolved paths as strings with a hard-coded / separator. On Windows, resolved paths use \, so valid plugin members could be reported as unsafe.

Validation

  • python -m pytest tests/test_plugin_store.py tests/test_plugin_loader.py tests/test_plugin_manifest.py tests/test_plugin_dsl_prompt.py tests/test_plugin_node.py -q
  • python -m ruff check app/services/plugin_store.py app/api/plugins.py tests/test_plugin_store.py
  • python -m ruff format --check app/services/plugin_store.py app/api/plugins.py tests/test_plugin_store.py
  • git diff --check
  • bash ./check.sh via Git Bash: 1729 tests, 1729 passed

@VeraPyuyi VeraPyuyi marked this pull request as ready for review July 1, 2026 09:56

@ckakgun ckakgun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, thank you for your contribution. 🎊

@ckakgun ckakgun enabled auto-merge July 1, 2026 10:00
@ckakgun ckakgun merged commit b867be3 into heymrun:main Jul 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants