Skip to content

✨ add remediation guidance for unpinned pip installs#4946

Open
D9mond wants to merge 1 commit intoossf:mainfrom
D9mond:pip-remediation-tip
Open

✨ add remediation guidance for unpinned pip installs#4946
D9mond wants to merge 1 commit intoossf:mainfrom
D9mond:pip-remediation-tip

Conversation

@D9mond
Copy link

@D9mond D9mond commented Feb 25, 2026

What kind of change does this PR introduce?

Feature improvement (adds remediation guidance for unpinned pip installs).

What is the current behavior?

Unpinned pip install commands are detected by the Pinned-Dependencies check, but no remediation guidance is provided to users.

What is the new behavior (if this is a feature change)?

When an unpinned pip install command is detected, the result now includes a remediation message suggesting:

  • Using --require-hashes

  • Using hashed lockfiles

  • Generating hashed requirements with pip-tools

  • Following pip secure install best practices

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

NONE

Special notes for your reviewer

This change mirrors the remediation pattern already implemented for NuGet, providing more actionable guidance for Python users.

Does this PR introduce a user-facing change?

Yes. It adds remediation guidance for unpinned pip install commands in the Pinned-Dependencies check output.

Adds remediation guidance for unpinned `pip install` commands in the Pinned-Dependencies check output.

@D9mond D9mond requested a review from a team as a code owner February 25, 2026 02:00
@D9mond D9mond requested review from AdamKorcz and jeffmendoza and removed request for a team February 25, 2026 02:00
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 25, 2026
@D9mond D9mond changed the title Add remediation guidance for unpinned pip installs feat: add remediation guidance for unpinned pip installs Feb 25, 2026
@D9mond D9mond changed the title feat: add remediation guidance for unpinned pip installs ✨ add remediation guidance for unpinned pip installs Feb 25, 2026
@D9mond
Copy link
Author

D9mond commented Feb 25, 2026

Please let me know if any adjustments or additional tests are required.
Happy to iterate on this.

@D9mond D9mond deployed to integration-test February 25, 2026 21:25 — with GitHub Actions Active
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.70%. Comparing base (353ed60) to head (c67d739).
⚠️ Report is 320 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4946      +/-   ##
==========================================
+ Coverage   66.80%   69.70%   +2.89%     
==========================================
  Files         230      251      +21     
  Lines       16602    15668     -934     
==========================================
- Hits        11091    10921     -170     
+ Misses       4808     3873     -935     
- Partials      703      874     +171     
🚀 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.

@spencerschrock
Copy link
Member

/scdiff generate Pinned-Dependencies

@github-actions
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants