Skip to content

fix: Accept uv duration words#577

Merged
dz0ny merged 1 commit into
mainfrom
fix/package-manager-uv-duration-words
May 22, 2026
Merged

fix: Accept uv duration words#577
dz0ny merged 1 commit into
mainfrom
fix/package-manager-uv-duration-words

Conversation

@dz0ny
Copy link
Copy Markdown
Member

@dz0ny dz0ny commented May 22, 2026

Refs:

Copilot AI review requested due to automatic review settings May 22, 2026 08:40
@github-actions
Copy link
Copy Markdown

🚀 Dev Builds Available

Development builds for this PR are available in the workflow artifacts.

Available builds:

  • Windows (agent, installer, tray)
  • Linux (agent)
  • macOS (agent)

Download the build artifact to test the latest changes.

@dz0ny dz0ny requested a review from zupo May 22, 2026 08:41
Copy link
Copy Markdown
Contributor

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 updates the UV exclude-newer duration parser to accept word-based units (e.g. 7 days) in addition to short suffixes (e.g. 7d), aligning the supply-chain check with UV’s config formats.

Changes:

  • Extend durationSeconds to recognize second(s), minute(s), hour(s), day(s), week(s) and tolerate whitespace between the number and unit.
  • Update UV-related test fixtures to use exclude-newer = "7 days" instead of exclude-newer = "7d".

Reviewed changes

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

File Description
checks/shared/package_manager_supply_chain.go Expands duration parsing logic to accept word-based units and whitespace.
checks/shared/package_manager_supply_chain_test.go Adjusts UV config test inputs to cover the word-based duration format.

Comment thread checks/shared/package_manager_supply_chain.go
@github-actions
Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ParetoSecurity/agent/checks/shared 70.23% (ø)
Total 52.88%

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ParetoSecurity/agent/checks/shared/package_manager_supply_chain.go 85.71% (ø) 203 174 29

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/ParetoSecurity/agent/checks/shared/package_manager_supply_chain_test.go

@dz0ny dz0ny merged commit 488de9f into main May 22, 2026
43 checks passed
@dz0ny dz0ny deleted the fix/package-manager-uv-duration-words branch May 22, 2026 14:14
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.

3 participants