Repository navigation
Add support for component age policy conditions - #2419
Merged
Merged
Conversation
Signed-off-by: nscuro <[email protected]>
1 of 2 tasks
Member
Author
|
We don't currently display the actual component age anywhere in the UI. I created DependencyTrack/frontend#399 for that. |
Member
|
This PR is now a wee bit more useful than it would have been just 6 months ago:
DT v4.7.0 introduced authentication support for internal repos. So now we have component age for everything from all our own internal projects! 😁 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
This PR implements a policy condition for component age.
The age can be provided in ISO-8601 period format, e.g.:
P1Y: 1 yearP2Y3M: 2 years, 3 monthsP7D: 7 daysLowest allowed time unit is days. Specifying hours, minutes, or seconds is not allowed.
This limitation is enforced by Java's
Periodclass, which is used behind the scenes.The frontend will show a tooltip to let users know about the format.
Addressed Issue
Closes #772
Additional Details
We have to rely on external package repositories to provide the publish date of components.
Not all repositories support this. In particular, for Rubygems and NPM components we currently do not get the publish date.
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR introduces changes to the database model, and I have added corresponding update logicThis PR introduces new or alters existing behavior, and I have updated the documentation accordingly