-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Time since last SBoM analysis in Dependency-Track.
Allow for measuring the time since the last analysis date of an SBoM in Dependency-Track using the 'source up-to-dateness' metric. This can be configured using the new 'event type' parameter. Possible values are 'last SBOM upload', 'last SBOM analysis', or 'both (oldest of last SBOM analysis and last SBOM upload)'. Closes #9764.
- Loading branch information
Showing
10 changed files
with
182 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
23 changes: 23 additions & 0 deletions
23
components/collector/tests/source_collectors/dependency_track/base_test.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Base classes for Dependency-Track collector unit tests.""" | ||
|
||
from source_collectors.dependency_track.base import DependencyTrackMetrics, DependencyTrackProject | ||
|
||
from tests.source_collectors.source_collector_test_case import SourceCollectorTestCase | ||
|
||
|
||
class DependencyTrackTestCase(SourceCollectorTestCase): | ||
"""Base class for Dependency-Track collector Unit tests.""" | ||
|
||
SOURCE_TYPE = "dependency_track" | ||
|
||
def projects(self) -> list[DependencyTrackProject]: | ||
"""Create the Dependency-Track projects fixture.""" | ||
return [ | ||
DependencyTrackProject( | ||
name="project name", | ||
uuid="project uuid", | ||
version="1.4", | ||
lastBomImport=0, | ||
metrics=DependencyTrackMetrics(), | ||
), | ||
] |
10 changes: 2 additions & 8 deletions
10
components/collector/tests/source_collectors/dependency_track/test_dependencies.py
This file contains 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
This file contains 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
This file contains 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
5 changes: 2 additions & 3 deletions
5
components/collector/tests/source_collectors/dependency_track/test_source_version.py
This file contains 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
This file contains 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
Oops, something went wrong.