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

Update runner version, dependencies and .trivyignore #99

Merged
merged 2 commits into from
Sep 21, 2022

Conversation

ben-harvey
Copy link
Contributor

@ben-harvey ben-harvey commented Sep 21, 2022

This change bundles together a bunch of updates and fixes to CI failures.

Runner version and dependencies

I copied these from the PRs that Dependabot has opened. I'll close those PRs after this change is approved and merged

Trivy vulnerability filter (.trivyignore):

We had already added some CVEs to the filter list since we are willing to accept the risk of internal dependencies of the runner. Trivy recently added scanning for .NET dependencies so we were seeing more Trivy failures in CI due to this. This change adds a few CVEs to the list and removes many that were no longer needed since the issues have been resolved by updates.

Other changes

Github is deprecating the --once flag for the run script and replacing it with the --ephemeral flag for the configure script. Runners that are configured as ephemeral are automatically de-registered by GitHub, so we can safely remove the cleanup step from our entrypoint script (I also didn't think it was necessary to clean up any folders upon exit since the whole container is torn down at this point)

I also added the --disableupdate flag to the configure script, which GitHub recommends for ephemeral runners in containers (more info)

Testing:

I ran the runner container locally, registered the runner with a repo, and ran a job on it. I also ran Trivy locally to make sure the filter was working before pushing it.

@ben-harvey ben-harvey changed the title Update Actions version, dependencies and .trivyignore Update runner version, dependencies and .trivyignore Sep 21, 2022
Copy link
Contributor

@crbudzeak crbudzeak left a comment

Choose a reason for hiding this comment

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

Thanks for digesting and updating all this. Just one question!


cleanup() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the --ephemeral flag replace the need for this old cleanup code, or was there something else that deprecated this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep!

Github is deprecating the --once flag for the run script and replacing it with the --ephemeral flag for the configure script. Runners that are configured as ephemeral are automatically de-registered by GitHub, so we can safely remove the cleanup step from our entrypoint script (I also didn't think it was necessary to clean up any folders upon exit since the whole container is torn down at this point)

Copy link
Contributor

@crbudzeak crbudzeak left a comment

Choose a reason for hiding this comment

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

LGTM!

@ben-harvey ben-harvey merged commit 2ecd555 into main Sep 21, 2022
@ben-harvey ben-harvey deleted the bharvey-updates branch September 21, 2022 20:30
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.

2 participants