Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ne-tools into feature/new_info_container
  • Loading branch information
sarbole committed Dec 19, 2024
2 parents d3cc087 + e7aad69 commit a064ca6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_base_image(self, matching_image):
client = docker.from_env()
image_details = client.api.inspect_image(matching_image.id)
labels = image_details.get("Config", {}).get("Labels", {})
source_image = labels.get("source-image")
source_image = labels.get("x86.image.name")
if source_image:
logger.info(f"Base image for '{matching_image}' from source-image label: {source_image}")
return source_image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _write_image_base(self, result_file, base_image, exclusions_data):
for exclusion in prisma_exclusions:
if (
vulnerability.get("id") == exclusion.get("id") and
any(image.startswith(base_image) for image in exclusion.get("source_images", []))
any(image.startswith(base_image) for image in exclusion.get("x86.image.name", []))
):
vulnerability["baseImage"] = base_image
modified = True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_get_base_image_source_label(mock_docker_client):
matching_image.id = "image_id"

mock_client.api.inspect_image.return_value = {
"Config": {"Labels": {"source-image": "source_image:1.0"}},
"Config": {"Labels": {"x86.image.name": "source_image:1.0"}},
}

result = docker_images.get_base_image(matching_image)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def test_write_image_base_success():
"PRISMA": [
{
"id": "CVE-1234-5678",
"source_images": ["python:3.9"]
"x86.image.name": ["python:3.9"]
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(

def process(self, args):
pipeline_name = self.devops_platform_gateway.get_variable("pipeline_name")
branch = self.devops_platform_gateway.get_variable("branch_name")
branch = self.devops_platform_gateway.get_variable("branch_tag").replace("refs/heads/", "")
input_core = InputCore(
[],
{},
Expand Down
2 changes: 1 addition & 1 deletion tools/devsecops_engine_tools/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '1.26.0'
version = '1.26.3'

0 comments on commit a064ca6

Please sign in to comment.