Skip to content

Commit

Permalink
Merge pull request #321 from snyk/fix/oci-archive-labels
Browse files Browse the repository at this point in the history
fix: Don't return empty labels for oci-archive images
  • Loading branch information
hisenb3rg committed Feb 10, 2021
2 parents a284081 + 1230b1a commit 29eadb6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion lib/extractor/index.ts
Expand Up @@ -31,7 +31,6 @@ export async function extractImageContent(
imageId: ociExtractor.getImageIdFromManifest(ociArchive.manifest),
manifestLayers: ociExtractor.getManifestLayers(ociArchive.manifest),
extractedLayers: layersWithLatestFileModifications(ociArchive.layers),
imageLabels: {},
};
default:
const dockerArchive = await dockerExtractor.extractArchive(
Expand Down
2 changes: 1 addition & 1 deletion lib/extractor/types.ts
Expand Up @@ -18,7 +18,7 @@ export interface ExtractionResult {
rootFsLayers?: string[];
autoDetectedUserInstructions?: DockerFileAnalysis;
platform?: string;
imageLabels: { [key: string]: string };
imageLabels?: { [key: string]: string };
}

export interface ExtractedLayers {
Expand Down
Expand Up @@ -390,10 +390,6 @@ Object {
],
"type": "imageLayers",
},
Object {
"data": Object {},
"type": "imageLabels",
},
Object {
"data": "Alpine Linux v3.12",
"type": "imageOsReleasePrettyName",
Expand Down
4 changes: 0 additions & 4 deletions test/system/image-type/__snapshots__/oci-archive.spec.ts.snap
Expand Up @@ -368,10 +368,6 @@ Object {
],
"type": "imageLayers",
},
Object {
"data": Object {},
"type": "imageLabels",
},
Object {
"data": "Alpine Linux v3.12",
"type": "imageOsReleasePrettyName",
Expand Down

0 comments on commit 29eadb6

Please sign in to comment.