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

Split codeql from trivy #2449

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Split codeql from trivy #2449

merged 1 commit into from
Nov 10, 2022

Conversation

carolynvs
Copy link
Member

After we upgraded from CodeQL v1 to v2, the performance of our "security scan" workflow went from 15m to over an hour, usually timing out. When CodeQL is initialized it replaces the go binary with their own custom one, and any builds done with it are included in the analysis.

I have moved everything that doesn't need to be analyzed to before initializing CodeQL, and also split out the cross-compilation required by Trivy (which scans our porter agent image) into a separate workflow. This way only the native builds for the porter client, runtime, exec mixin and agent are scanned by CodeQL.

This has brought performance back to a tolerable level, about 12m again.

After we upgraded from CodeQL v1 to v2, the performance of our "security scan" workflow went from 15m to over an hour, usually timing out. When CodeQL is initalized it replaces the go binary with their own custom one, and any builds done with it are included in the analysis.

I have moved everything that doesn't need to be analyized to before initializing CodeQL, and also split out the cross-compilation required by Trivy (which scans our porter agent image) into a separate workflow. This way only the native builds for the porter client, runtime, exec mixin and agent are scanned by CodeQL.

This has brought performance back to a tolerable level, about 12m again.

Signed-off-by: Carolyn Van Slyck <[email protected]>
@carolynvs
Copy link
Member Author

Trivy found existing alerts about the version of the docker cli we are using. We can't upgrade until Buildx works with recent versions of Docker, so we are pinned to a compatible version.

@carolynvs carolynvs marked this pull request as ready for review November 10, 2022 00:06
@carolynvs carolynvs merged commit 7759b83 into main Nov 10, 2022
@carolynvs carolynvs deleted the troubleshoot-security-scan branch November 10, 2022 00:06
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.

1 participant