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

[CI] Add Trivy workflow #16840

Merged
merged 6 commits into from
Feb 4, 2025
Merged

[CI] Add Trivy workflow #16840

merged 6 commits into from
Feb 4, 2025

Conversation

KornevNikita
Copy link
Contributor

This patch adds a workflow to perform trivy check as required by our public release policy.

This patch adds a workflow to perform trivy check as required by our
public release policy.
@KornevNikita KornevNikita requested a review from a team as a code owner January 30, 2025 08:28
@KornevNikita
Copy link
Contributor Author

@intel/dpcpp-devops-reviewers (especially @uditagarwal97 @sarnex) could you please take one more look and also check this discussion please?

Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

lgtm just minor comments

.github/workflows/trivy.yml Outdated Show resolved Hide resolved
on:
pull_request:
paths:
- 'devops/containers/**'
Copy link
Contributor

Choose a reason for hiding this comment

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

@aelovikov-intel might have an opinon here :P

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should add the files from this PR too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aelovikov-intel could you please clarify what do you mean? Just trigger on every PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Changes to this workflow and this trivy configuration should trigger CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, got it 28a701e

with:
name: trivy-report
path: trivy-report.json
retention-days: 3
Copy link
Contributor

Choose a reason for hiding this comment

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

is 3 days enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this check takes like ~10s, I think 3 days is even too much :) you can just re-run it if needed. Anyway, what it should be in your opinion?

Copy link
Contributor

Choose a reason for hiding this comment

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

i guess it depends on how do we expect the results to be used? is it just checking it when the workflow fails and not really after that? if so this is fine

Copy link
Contributor

Choose a reason for hiding this comment

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

i guess it depends on how do we expect the results to be used? is it just checking it when the workflow fails and not really after that? if so this is fine

The main use case is to upload them as an evidence of the scan.

@KornevNikita, is it correct to assume that any new issue will fail this workflow? If so, then 3 days is more than enough to grab results which are expected to be always good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's good that Nick asked, turned out we need to set "exit-code" arg to get a non-zero result in case of fail - updated 0fdba39

Copy link
Contributor

Choose a reason for hiding this comment

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

😎

Copy link
Contributor

Choose a reason for hiding this comment

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

I bet he found it out a day or two ago when hunting zombies :D

Copy link
Contributor

@uditagarwal97 uditagarwal97 left a comment

Choose a reason for hiding this comment

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

LGTM

@KornevNikita
Copy link
Contributor Author

@intel/dpcpp-devops-reviewers thanks for the feedback, could you please merge? I guess there is no need to wait for the pre-commit

@uditagarwal97 uditagarwal97 merged commit 0129333 into intel:sycl Feb 4, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants