Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion cmd/datadog-sbom-generator/__snapshots__/main_test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2641,6 +2641,10 @@ Scanned <rootdir>/fixtures/integration-npm/with-workspace/yarn.lock file and fou
{
"name": "datadog:package-manager",
"value": "uv"
},
{
"name": "datadog:requires-transitive-enrichment",
"value": "true"
}
],
"evidence": {
Expand All @@ -2651,6 +2655,37 @@ Scanned <rootdir>/fixtures/integration-npm/with-workspace/yarn.lock file and fou
]
}
},
{
"bom-ref": "pkg:pypi/numpy",
"type": "library",
"name": "numpy",
"purl": "pkg:pypi/numpy",
"properties": [
{
"name": "datadog:is-direct",
"value": "true"
},
{
"name": "datadog:package-manager",
"value": "uv"
},
{
"name": "datadog:requires-transitive-enrichment",
"value": "true"
},
{
"name": "datadog:version-range",
"value": "/u003e=1.24"
}
],
"evidence": {
"occurrences": [
{
"location": "{/"block/":{/"file_name/":/"pyproject.toml/",/"line_start/":8,/"line_end/":8,/"column_start/":5,/"column_end/":19,/"role/":/"manifest/"},/"name/":{/"file_name/":/"pyproject.toml/",/"line_start/":8,/"line_end/":8,/"column_start/":6,/"column_end/":11,/"role/":/"manifest/"},/"version/":{/"file_name/":/"pyproject.toml/",/"line_start/":8,/"line_end/":8,/"column_start/":11,/"column_end/":17,/"role/":/"manifest/"}}"
}
]
}
},
{
"bom-ref": "pkg:pypi/pytest@8.2.0",
"type": "library",
Expand All @@ -2669,6 +2704,10 @@ Scanned <rootdir>/fixtures/integration-npm/with-workspace/yarn.lock file and fou
{
"name": "datadog:package-manager",
"value": "uv"
},
{
"name": "datadog:requires-transitive-enrichment",
"value": "true"
}
],
"evidence": {
Expand All @@ -2693,6 +2732,10 @@ Scanned <rootdir>/fixtures/integration-npm/with-workspace/yarn.lock file and fou
{
"name": "datadog:package-manager",
"value": "uv"
},
{
"name": "datadog:requires-transitive-enrichment",
"value": "true"
}
],
"evidence": {
Expand All @@ -2710,7 +2753,7 @@ Scanned <rootdir>/fixtures/integration-npm/with-workspace/yarn.lock file and fou

[TestRun/Scan_pyproject.toml_without_lock_file - 2]
Scanning directory './fixtures/integration-pyproject', resolved absolute path '<rootdir>/fixtures/integration-pyproject'
Scanned <rootdir>/fixtures/integration-pyproject/pyproject.toml file and found 3 packages
Scanned <rootdir>/fixtures/integration-pyproject/pyproject.toml file and found 4 packages
[reachability] Reachability analysis is disabled
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ requests = "==2.28.0"
flask = "==2.3.2"
boto3 = "1.26.0"
numpy = "^1.24"
scipy = "1.*"
4 changes: 3 additions & 1 deletion pkg/lockfile/internal/testutil/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ func PackageToString(pkg lockfile.PackageDetails) string {
}

return fmt.Sprintf(
"%s@%s {ecosystem=%q targetVersions=%v packageManager=%q commit=%q depGroups=%v exclusions=%v targetFrameworks=%v isDirect=%t blockLocation=%s nameLocation=%s versionLocation=%s}",
"%s@%s {versionRange=%q ecosystem=%q targetVersions=%v packageManager=%q commit=%q depGroups=%v exclusions=%v targetFrameworks=%v isDirect=%t requiresTransitiveEnrichment=%t blockLocation=%s nameLocation=%s versionLocation=%s}",
pkg.Name,
pkg.Version,
pkg.VersionRange,
pkg.Ecosystem,
pkg.TargetVersions,
pkg.PackageManager,
Expand All @@ -58,6 +59,7 @@ func PackageToString(pkg lockfile.PackageDetails) string {
pkg.Exclusions,
pkg.TargetFrameworks,
pkg.IsDirect,
pkg.RequiresTransitiveEnrichment,
formatLoc(pkg.BlockLocation),
formatLocPtr(pkg.NameLocation),
formatLocPtr(pkg.VersionLocation),
Expand Down
Loading
Loading