You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/blackduck/integration/blackduck/imageinspector/image/oci/OciImageDirectoryExtractor.java
+86-27Lines changed: 86 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
/*
2
2
* hub-imageinspector-lib
3
3
*
4
-
* Copyright (c) 2024 Black Duck Software, Inc.
4
+
* Copyright (c) 2025 Black Duck Software, Inc.
5
5
*
6
6
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
//TODO- what do we do with archives "nondistributable" media types? https://github.com/opencontainers/image-spec/blob/main/layer.md#non-distributable-layers
134
163
// ac- based on the linked doc, I think we should just treat them normally (as if they were their "distributable" counterparts)
@@ -140,36 +169,59 @@ private ArchiveFileType parseArchiveTypeFromLayerDescriptorMediaType(String medi
thrownewIntegrationException(String.format("Unrecognized layer media type: %s", mediaType));
172
+
thrownewIntegrationException(String.format("Possible unsupported input archive file type. Please refer to the relevant Docker Inspector documentation at https://documentation.blackduck.com/bundle/detect/page/packagemgrs/docker/formats.html. Unrecognized media type %s of layer %s.", mediaType, digest));
Copy file name to clipboardExpand all lines: src/main/java/com/blackduck/integration/blackduck/imageinspector/image/oci/OciImageLayerSorter.java
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
/*
2
2
* hub-imageinspector-lib
3
3
*
4
-
* Copyright (c) 2024 Black Duck Software, Inc.
4
+
* Copyright (c) 2025 Black Duck Software, Inc.
5
5
*
6
6
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
7
7
*/
@@ -21,8 +21,14 @@ public class OciImageLayerSorter extends ImageLayerSorter {
Copy file name to clipboardExpand all lines: src/main/java/com/blackduck/integration/blackduck/imageinspector/image/oci/OciManifestDescriptorParser.java
+14-10Lines changed: 14 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
/*
2
2
* hub-imageinspector-lib
3
3
*
4
-
* Copyright (c) 2024 Black Duck Software, Inc.
4
+
* Copyright (c) 2025 Black Duck Software, Inc.
5
5
*
6
6
* Use subject to the terms and conditions of the Black Duck Software End User Software License and Maintenance Agreement. All rights reserved worldwide.
for (OciDescriptorociDescriptor : ociImageIndex.getManifests()) {
38
+
logger.debug("Found a media type in manifest: {}", ociDescriptor.getMediaType());
39
+
if (MANIFEST_FILE_MEDIA_TYPE.equals(ociDescriptor.getMediaType()) || INDEX_FILE_MEDIA_TYPE.equals(ociDescriptor.getMediaType())) {
40
+
trueManifests.add(ociDescriptor);
41
+
}
42
+
}
43
+
if (trueManifests.isEmpty()) {
44
+
thrownewIntegrationException(String.format("No manifest descriptor with either media type {} or {} was found in OCI image index", INDEX_FILE_MEDIA_TYPE, MANIFEST_FILE_MEDIA_TYPE));
41
45
}
42
46
if ((trueManifests.size() == 1)) {
43
-
logger.debug(String.format("There is only one manifest; inspecting that one; digest=%s", trueManifests.get(0).getDigest()));
47
+
logger.debug(String.format("There is only one manifest; inspecting that one; digest={}", trueManifests.get(0).getDigest()));
44
48
returntrueManifests.get(0);
45
49
}
46
50
if ((trueManifests.size() > 1) && StringUtils.isBlank(givenRepo)) {
@@ -59,7 +63,7 @@ public OciDescriptor getManifestDescriptor(OciImageIndex ociImageIndex,
0 commit comments