Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add image scanning on pull_request #4384

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zhzhuang-zju
Copy link
Contributor

@zhzhuang-zju zhzhuang-zju commented Dec 6, 2023

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
add image scanning on pull_request to protect against security vulnerabilities
Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Refer to https://github.com/karmada-io/karmada/actions/runs/7112047275/job/19361222115
image

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Dec 6, 2023
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign garrybest after the PR has been reviewed.
You can assign the PR to them by writing /assign @garrybest in a comment when ready.

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

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

@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 6, 2023
@karmada-bot karmada-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 6, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e501b6) 51.82% compared to head (29d3790) 51.89%.
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4384      +/-   ##
==========================================
+ Coverage   51.82%   51.89%   +0.07%     
==========================================
  Files         244      246       +2     
  Lines       24234    24328      +94     
==========================================
+ Hits        12560    12626      +66     
- Misses      10993    11016      +23     
- Partials      681      686       +5     
Flag Coverage Δ
unittests 51.89% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RainbowMango
Copy link
Member

@liangyuanpeng Can you help to take a look?

@zhzhuang-zju
Copy link
Contributor Author

@liangyuanpeng Can you help to take a look?

Hi~If interested, you can also review pr #4184 together, which also integrates trivy to ci, but for security scanning of older images.

Copy link
Contributor Author

@zhzhuang-zju zhzhuang-zju left a comment

Choose a reason for hiding this comment

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

image

.github/workflows/ci-image-scanning.yaml Outdated Show resolved Hide resolved
@liangyuanpeng
Copy link
Contributor

Interesting,I will add this to my list ASAP :)

Copy link
Contributor

@liangyuanpeng liangyuanpeng left a comment

Choose a reason for hiding this comment

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

I can understand what this PR hopes to do, but I think scheduled execution may be enough, and I think the value added by scanning container images on the PR may be very small, even if it does not hinder the PR but does take up some github action CI time.

Could you please add that scheduled scan image is not sufficient? Remind me if i missed something,Thanks.
@zhzhuang-zju

@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 4, 2024
@zhzhuang-zju zhzhuang-zju force-pushed the ci-trivy branch 4 times, most recently from af5026a to 8a260df Compare January 10, 2024 01:41
@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 10, 2024
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 20, 2024
@zhzhuang-zju
Copy link
Contributor Author

@liangyuanpeng @RainbowMango
Hi~ On the basis of the original image scanning, I tried to add some vulnerability analysis. By comparing the vulnerabilities scanned in the PR with those scanned in the Baseline branch, the following content can be analyzed:

The CI failure is because a merge of #4567 is required first.

@XiShanYongYe-Chang
Copy link
Member

This effect looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants