Skip to content

fix: gate symlink test with #[cfg(unix)] to fix Windows clippy#86

Merged
bellini666 merged 1 commit intomasterfrom
fix/windows-clippy-symlink-test
Feb 14, 2026
Merged

fix: gate symlink test with #[cfg(unix)] to fix Windows clippy#86
bellini666 merged 1 commit intomasterfrom
fix/windows-clippy-symlink-test

Conversation

@bellini666
Copy link
Copy Markdown
Owner

Summary

  • Move #[cfg(unix)] from the inner block to the test function level so that on Windows the entire test (including variable declarations) is excluded, fixing the unused variable: site_packages clippy error

Test plan

  • cargo clippy passes locally
  • Windows CI passes

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds path traversal protection to the pytest plugin entry point resolution logic and fixes a Windows clippy warning for a Unix-specific symlink test.

Changes:

  • Added input validation to reject malicious module paths (path traversal attempts with "..", null bytes, or empty segments)
  • Added canonicalization checks with boundary validation to prevent symlink-based escapes
  • Updated existing test assertions to expect canonicalized paths
  • Added comprehensive security tests for path traversal, null bytes, empty segments, and symlink escape attempts
  • Properly gated the symlink escape test with #[cfg(unix)] at the function level to fix Windows clippy errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bellini666 bellini666 force-pushed the fix/windows-clippy-symlink-test branch from 76f6146 to 541058a Compare February 14, 2026 16:05
@bellini666 bellini666 force-pushed the fix/windows-clippy-symlink-test branch from 541058a to e6212b9 Compare February 14, 2026 16:06
@github-actions
Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.08%. Comparing base (afe735d) to head (e6212b9).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #86   +/-   ##
=======================================
  Coverage   55.08%   55.08%           
=======================================
  Files          26       26           
  Lines        3001     3001           
=======================================
  Hits         1653     1653           
  Misses       1348     1348           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bellini666 bellini666 merged commit bf33f85 into master Feb 14, 2026
20 checks passed
@bellini666 bellini666 deleted the fix/windows-clippy-symlink-test branch February 14, 2026 16:11
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.

2 participants