Skip to content

Setup trivy scanner in ci - #527

Merged
jiangpengcheng merged 2 commits into
streamnative:masterfrom
jiangpengcheng:fix_operator_vuln
Nov 22, 2022
Merged

jiangpengcheng merged 2 commits into
streamnative:masterfrom
jiangpengcheng:fix_operator_vuln

Conversation

@jiangpengcheng

Copy link
Copy Markdown
Member

Master Issue: #371

Motivation

Add trivy scanner to avoid import security vulnerabilities

Modifications

Add trivy scanner in ci

Verifying this change

  • Make sure that the change passes the CI checks.

  • This change is a trivial rework / code cleanup without any test coverage.

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    ci change

  • doc

    (If this PR contains doc changes)

@jiangpengcheng
jiangpengcheng requested review from a team, freeznet and nlu90 as code owners November 18, 2022 02:38
@github-actions github-actions Bot added the no-need-doc This pr does not need any document label Nov 18, 2022
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'function-mesh-operator:latest'

@jiangpengcheng jiangpengcheng Nov 18, 2022 •

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.

one thing that may need to a discussion is the severity, the default value is UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL, do we need to ignore some of them, like UNKNOWN, LOW severity vulnerabilities?

@streamnative/serverless @hpvd

@hpvd hpvd Nov 18, 2022 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great to see you are taking action on this!

would vote for suppress nothing. It mostly isn't much work to update a dependency for the benefit of better security.
If there are vulnerabilities with no fix available yet, one could think of suppressing them until a fix is available...
(but one have to take care to not suppress them forever)

One could also think one step further, and not only update dependencies with known security flaws, but directly always when a new version of a dependency is released.

This could be comfortably done, using dependabot and let this tool automatically start a new pull request for update
see: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates

With this, trivy will have less findings and one is often one step ahead of security problems...

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.

make sense to me

@hpvd hpvd mentioned this pull request Nov 18, 2022
2 of 5 tasks
@jiangpengcheng
jiangpengcheng merged commit 520157c into streamnative:master Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-need-doc This pr does not need any document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants