Skip to content

Initial github actions for automated build & security scans #10

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

Merged
merged 7 commits into from
Jun 20, 2025

Conversation

byron-marohn
Copy link
Contributor

@byron-marohn byron-marohn commented Jun 18, 2025

device-plugins:

  • Improve build.sh to take proper --ver, --repo, and --push arguments
  • Add a workflow which runs build.sh, Trivy which scans both the source code and resulting docker image for vulnerable dependencies, and ClamAV to scan for malware.
  • Add a workflow to scan for static analysis problems with Coverity. Requires COVERITY_TOKEN secret to be present in the repository.

qemu:

  • Add a workflow which builds the patched QEMU, based on kubevirt-patch/README.md. Also enable Trivy & ClamAV scans.

Kubevirt:

  • Builds kubevirt with qemu, runs Trivy scans.

device-plugins:
- Improve build.sh to take proper --ver, --repo, and --push arguments
- Add a workflow which runs build.sh, Trivy which scans
  both the source code and resulting docker image for vulnerable
  dependencies, and ClamAV to scan for malware.
- Add a workflow to scan for static analysis problems with Coverity.
  Requires COVERITY_TOKEN secret to be present in the repository.

qemu:
- Add a workflow which builds the patched QEMU, based on
  kubevirt-patch/README.md. Also enable Trivy & ClamAV scans.

This does not yet build or scan the full kubevirt environment.

Signed-off-by: Byron Marohn <byron.marohn@intel.com>
Signed-off-by: Byron Marohn <byron.marohn@intel.com>
@vinayg-intel
Copy link

Please check to have Coverity Scan

@byron-marohn
Copy link
Contributor Author

Coverity scan is enabled but not on pull request - it'll run every day on main and update the coverity dashboard, which will send out notifications. In the future I'd like to enhance this to provide immediate feedback on pull requests but won't be able to do that for this initial implementation.

@smitesh-sutaria
Copy link
Contributor

smitesh-sutaria commented Jun 18, 2025

Coverity scan is enabled but not on pull request - it'll run every day on main and update the coverity dashboard, which will send out notifications. In the future I'd like to enhance this to provide immediate feedback on pull requests but won't be able to do that for this initial implementation.

@byron-marohn : Can you please put the link of coverity dashboard

@byron-marohn
Copy link
Contributor Author

- kubevirt components should work, but currently run out of space on the
github actions runner

Additional improvements:
- Add release tarball artifact for device-plugins-for-kubernetes
- Add EDV_VERSION environment variable to all jobs for consistent
  Versioning
- Add EDV_HOME environment variable to easily reference top-level code
  directory
- Improve device-plugins-for-kubernetes/build.sh to update the version
  in the deployment manifest

Signed-off-by: Byron Marohn <byron.marohn@intel.com>
@byron-marohn byron-marohn force-pushed the byron_initial_githubactions branch from 5f549ac to d04c799 Compare June 19, 2025 03:57
@smitesh-sutaria
Copy link
Contributor

@byron-marohn : Updated the device plugin docker base image from alpine to debian:stable-slim
And build went thru 👍
image

Hopefully no functional impact. @dmkarthi : Do confirm from your side as well.

@dmkarthi
Copy link
Contributor

@byron-marohn : Updated the device plugin docker base image from alpine to debian:stable-slim And build went thru 👍 image

Hopefully no functional impact. @dmkarthi : Do confirm from your side as well.

Build succeeded functional testing is yet to complete, also @byron-marohn can you update the name mf-device-plugin to device-plugin and increment the version as v1.1

@byron-marohn byron-marohn force-pushed the byron_initial_githubactions branch from a8ebf48 to 675ca9f Compare June 20, 2025 03:32
- Improved shared actions file with some limited settings
- Cleaned up disk space on runner to make room for kubevirt build
- Caching to make kubevirt not have to build for 30m every time
- Misc cleanup to other working actions

Signed-off-by: Byron Marohn <byron.marohn@intel.com>
@byron-marohn byron-marohn force-pushed the byron_initial_githubactions branch from 675ca9f to 3430568 Compare June 20, 2025 04:05

# Build the Docker image
echo "Building the Docker image..."
docker build --no-cache -t "$DOCKER_REPO/mf-device-plugin:$VER" .
Copy link
Contributor

Choose a reason for hiding this comment

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

@byron-marohn : This still has mf-device-plugin

# Push the Docker image if --push is specified
if [[ $PUSH == "true" ]]; then
echo "Pushing the Docker image to the repository..."
! docker push "$DOCKER_REPO/mf-device-plugin:$VER"
Copy link
Contributor

Choose a reason for hiding this comment

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

mf has to be removed from everywhere as Maverick Flats (MF) was internal code name

Copy link
Contributor

Choose a reason for hiding this comment

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

This can be taken care in subsequent ongoing PR. So merging this.

@smitesh-sutaria smitesh-sutaria merged commit a08728d into main Jun 20, 2025
5 checks passed
@byron-marohn byron-marohn deleted the byron_initial_githubactions branch June 20, 2025 04:57
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.

4 participants