Skip to content

fix: dedup and assemble scan job results based on pod namespace and name too#65

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
ingvagabund:shared-hosted-network-dedup-assemble-fix
May 19, 2026
Merged

fix: dedup and assemble scan job results based on pod namespace and name too#65
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
ingvagabund:shared-hosted-network-dedup-assemble-fix

Conversation

@ingvagabund
Copy link
Copy Markdown
Member

Pods that share the same host network (hostNetwork=true) see the same list of ports. The current dedup and assemle code picks pods with the first unique IP it sees and ignores every other pod. Even though ports on the same host network are owned by different pods. Which makes the final results claim a port owned by a different pod.

Fixes: #62

Comment thread internal/scanner/scanner.go
Comment thread internal/scanner/scanner.go Outdated
Comment thread internal/scanner/scanner.go Outdated
Comment thread internal/scanner/scanner.go Outdated
@ingvagabund
Copy link
Copy Markdown
Member Author

I will squash the commits before the final approval. Keeping it separated to make following the changes easier.

@openshift-ci openshift-ci Bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 19, 2026
@smith-xyz
Copy link
Copy Markdown
Contributor

let me know if you can rebase and can merge this in

…ame too

Pods that share the same host network (hostNetwork=true) see the same
list of ports. The current dedup and assemle code picks pods with the first
unique IP it sees and ignores every other pod. Even though ports on the
same host network are owned by different pods. Which makes the final
results claim a port owned by a different pod.
@ingvagabund ingvagabund force-pushed the shared-hosted-network-dedup-assemble-fix branch from c4cd486 to 311b637 Compare May 19, 2026 16:34
@openshift-ci openshift-ci Bot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 19, 2026
@ingvagabund
Copy link
Copy Markdown
Member Author

Rebased and squashed

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 19, 2026

@ingvagabund: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@smith-xyz
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 19, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund, smith-xyz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot Bot merged commit 96eed4e into openshift:main May 19, 2026
4 checks passed
@ingvagabund ingvagabund deleted the shared-hosted-network-dedup-assemble-fix branch May 19, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Containers of different pods within the same host network (hostNetwork=true) may get incorrectly mapped

2 participants