Skip to content

fix: address CodeQL code scanning alerts#85

Merged
bellini666 merged 1 commit intomasterfrom
fix/codeql-alerts
Feb 14, 2026
Merged

fix: address CodeQL code scanning alerts#85
bellini666 merged 1 commit intomasterfrom
fix/codeql-alerts

Conversation

@bellini666
Copy link
Copy Markdown
Owner

Summary

  • Add explicit permissions: contents: read to CI workflow (principle of least privilege)
  • Add path traversal validation in resolve_entry_point_module_to_path — rejects .., null bytes, empty segments, and verifies resolved paths stay within the base directory via canonicalization
  • Dismiss 41 false-positive rust/path-injection alerts via GitHub API (local LSP with trusted inputs: CLI args, editor workspace roots, test code)

Test plan

  • cargo clippy --all-targets --all-features -- -D warnings passes
  • cargo test passes (all 54 unit + 50 integration + 1 doc test)
  • Verify CodeQL re-scan clears the remaining 10 open alerts after merge

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 14, 2026

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.04%. Comparing base (a30fa62) to head (ce317b8).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   54.91%   55.04%   +0.13%     
==========================================
  Files          26       26              
  Lines        2992     3001       +9     
==========================================
+ Hits         1643     1652       +9     
  Misses       1349     1349              

☔ 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.

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 addresses CodeQL code scanning alerts by implementing security hardening measures and following the principle of least privilege in CI workflows.

Changes:

  • Added explicit permissions: contents: read to the CI workflow to follow the principle of least privilege
  • Implemented path traversal validation in resolve_entry_point_module_to_path to prevent directory escape attacks
  • Updated existing tests to accommodate the new canonicalized path return values

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/ci.yml Added explicit read-only permissions declaration following security best practices
src/fixtures/scanner.rs Added path traversal protection (rejects .., null bytes, empty segments) and canonicalization checks to ensure resolved paths stay within base directory; updated test assertions to expect canonicalized paths

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

Add explicit `permissions: contents: read` to CI workflow for least
privilege. Add path traversal validation in resolve_entry_point_module_to_path
to reject `..`, null bytes, and paths escaping site-packages. Remaining
false-positive alerts dismissed via GitHub API.
@bellini666 bellini666 merged commit afe735d into master Feb 14, 2026
14 of 17 checks passed
@bellini666 bellini666 deleted the fix/codeql-alerts branch February 14, 2026 15:52
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