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

Implement a security scanner in the repository #329

Open
Michaelpalacce opened this issue Jul 15, 2024 · 1 comment
Open

Implement a security scanner in the repository #329

Michaelpalacce opened this issue Jul 15, 2024 · 1 comment
Assignees
Labels
area/build Relates to the build process effort/medium kind/build Changes to the build plans or similar priority/high triage/accepted The issue was accepted and will be done

Comments

@Michaelpalacce
Copy link
Collaborator

Description

A suggestion is to use trivy it's free and works pretty well.

Running it locally like so: trivy fs --severity HIGH,CRITICAL --exit-code 1 --ignore-unfixed --skip-dirs "**/target/*" . provides a lot of information about potential issues, most of which are fixed with newer versions of packages.

How To Integrate

Suggestion is to detect changes done in the current PR and fail the build if PR changes have a HIGH or CRITICAL vulnerability (Up for debate, CRITICAL may be enough).

This is how you can generate a report for a specific directory, works with a file too

trivy fs --severity HIGH,CRITICAL --exit-code 1 --ignore-unfixed --skip-dirs "**/target/*" --scanners vuln,secret,misconfig  common/artifact-manager/src/main/java/com/vmware/pscoe/iac/artifact

Trivy supports --format github that can later be published to github "Security" tab, check out: https://docs.github.com/en/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning for more info

Github Action

Potentially this can be used to fullfil the abovementioned requirements

report.log

@Michaelpalacce Michaelpalacce added area/build Relates to the build process priority/high kind/build Changes to the build plans or similar triage/needed Needs to be discussed by project maintainers labels Jul 15, 2024
@Michaelpalacce Michaelpalacce added triage/accepted The issue was accepted and will be done and removed triage/needed Needs to be discussed by project maintainers labels Aug 15, 2024
@Michaelpalacce
Copy link
Collaborator Author

We want to integrate the trivy scanner GitHub action and report security vulnerabilities to GitHub Code Scanning (check this and this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Relates to the build process effort/medium kind/build Changes to the build plans or similar priority/high triage/accepted The issue was accepted and will be done
Projects
None yet
Development

No branches or pull requests

2 participants