[code sync] Merge code from sonic-net/sonic-utilities:202605 to 202606#405
Merged
Conversation
mssonicbld
commented
Jul 15, 2026
Collaborator
…address S360 vulnerability (#4689) ### Description of PR Summary: Migrate the pre-commit static-analysis step off python3-pip to uv. The CI agent pool **sonic-ubuntu-1c** (VMSS sonic-ubuntu-2ca, Ubuntu 22.04) is flagged by S360 for pip vulnerabilities **USN-8344-1** and **USN-8344-3** (`python3-pip`). The agent is being redeployed without python3-pip. `pre-commit-check.yml` runs directly on that host (no container), so `sudo pip install pre-commit` would break. uv is already installed on the agent and is a drop-in replacement. ### Type of change - [x] Refactor / cleanup ### Approach #### What is the motivation for this PR? Remove python3-pip dependency from sonic-ubuntu-1c to clear S360 USN-8344-1/-3. ##### Work item tracking - Microsoft ADO **(number only)**: 6035751, 6035790 #### How did you do it? Replaced `sudo pip install pre-commit` with `sudo uv pip install --system pre-commit` in .azure-pipelines/pre-commit-check.yml (and the local-instructions text). #### How did you verify/test it? Static Analysis stage runs pre-commit successfully via uv. Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.