Skip to content

KAFKA-19881: change CVE scanner workflow to run on active branches (wip)#20927

Open
FrankYang0529 wants to merge 1 commit intoapache:trunkfrom
FrankYang0529:KAFKA-19881
Open

KAFKA-19881: change CVE scanner workflow to run on active branches (wip)#20927
FrankYang0529 wants to merge 1 commit intoapache:trunkfrom
FrankYang0529:KAFKA-19881

Conversation

@FrankYang0529
Copy link
Copy Markdown
Member

@FrankYang0529 FrankYang0529 commented Nov 19, 2025

Change CVE scanner workflow to run on active branches. A released image
cannot be replaced, so it doesn't make sense to run CVE on it. We should
run on active branches to find CVE and fix it.

Reviewers: Mickael Maison mimaison@users.noreply.github.com

@github-actions github-actions Bot added build Gradle build or GitHub Actions docker Official Docker image small Small PRs labels Nov 19, 2025
@github-actions
Copy link
Copy Markdown

This PR is being marked as stale since it has not had any activity in 90 days. If you
would like to keep this PR alive, please leave a comment asking for a review. If the PR has
merge conflicts, update it with the latest from the base branch.

If you are having difficulty finding a reviewer, please reach out on the [mailing list](https://kafka.apache.org/contact).

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions Bot added the stale Stale PRs label Feb 18, 2026
@github-actions
Copy link
Copy Markdown

This PR has been closed since it has not had any activity in 120 days. If you feel like this
was a mistake, or you would like to continue working on it, please feel free to re-open the
PR and ask for a review.

@github-actions github-actions Bot added the closed-stale PRs that were closed due to inactivity label Mar 21, 2026
@github-actions github-actions Bot closed this Mar 21, 2026
@FrankYang0529 FrankYang0529 reopened this Apr 1, 2026
@FrankYang0529 FrankYang0529 removed stale Stale PRs closed-stale PRs that were closed due to inactivity labels Apr 1, 2026
@FrankYang0529 FrankYang0529 force-pushed the KAFKA-19881 branch 5 times, most recently from c1dcebf to 7a058a0 Compare April 2, 2026 11:15
Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529
Copy link
Copy Markdown
Member Author

Sample run: https://github.com/apache/kafka/actions/runs/23897721438/job/69686380260?pr=20927

The CI failure is not error. It's trivy find the CVE.

@FrankYang0529 FrankYang0529 requested a review from mimaison April 4, 2026 00:22
Copy link
Copy Markdown
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of comments but to be honest I'm not sure what we should do.

I think there's some value in scanning the latest images too. So for example if you are using the recently released 4.1.2 image you know if there's a CVE in it. Scanning the current branch is helpful when doing a release.

working-directory: ./docker
run: |
python docker_build_test.py kafka/branch-scan -tag=test -type=native --kafka-archive=../${{ steps.tarball.outputs.path }} -b
- name: Install Trivy
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we're allowed to install Trivy like this. We should probably use the action directly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like trivy-action cannot use now.

image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create another PR to fix this in all workflow.

#22024

- name: Build Docker image from current branch
working-directory: ./docker
run: |
python docker_build_test.py kafka/branch-scan -tag=test -type=native --kafka-archive=../${{ steps.tarball.outputs.path }} -b
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since our native image are not for production usage [0], maybe scan the jvm image

0: https://kafka.apache.org/42/getting-started/docker/#graalvm-based-native-apache-kafka-docker-image

@chia7712
Copy link
Copy Markdown
Member

@FrankYang0529 would you mind testing apache/infrastructure-actions#582 ? It works for other project apache/pulsar#25480

@chia7712
Copy link
Copy Markdown
Member

would you mind testing apache/infrastructure-actions#582 ? It works for other project apache/pulsar#25480

ugh, you have opened #22024 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions docker Official Docker image small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants