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

Feat: Github Workflow Action for Scanning vulnerabilities using Trivy. #19710

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

tarunpandey23
Copy link
Contributor

@tarunpandey23 tarunpandey23 commented Feb 7, 2025

Describe your changes:

Created Github Action Workflows for scanning Vulnerabilities of the Docker Images and posting the output of scan in the PR comment.

Fixes

We are already using Snyk as a vulnerability scanning solution, but incorporating Aqua Security's Trivy into our workflow provides several key advantages, making it beneficial to use both tools side by side.
Advantages of Using Trivy Over Snyk:

  • Faster Scanning Performance:
    Trivy is known for its lightweight and fast scanning capabilities. Unlike Snyk, which may take longer to analyze
    dependencies and images, Trivy provides results within seconds, making it ideal for CI/CD pipelines.

  • No Need for a Separate Account or API Key:
    Trivy runs locally without requiring an API key, making it easier to integrate into workflows with minimal setup.

  • Broader Security Coverage:
    Trivy scans operating system (OS) vulnerabilities and application dependencies in a single scan.

  • Cost Efficiency:
    Trivy is completely open-source and free to use, whereas Snyk has limitations on free-tier usage and may require a paid plan for full functionality.

  • Local Scanning Without External Calls:
    Trivy scans locally without sending data to an external service, ensuring better data privacy.

Why Use Trivy Alongside Snyk?

Why Use Trivy Alongside Snyk?

Feature Snyk Trivy Benefit of Using Both
OS Vulnerabilities ❌ Limited ✅ Full Support Trivy ensures full container security
Infrastructure as Code (IaC) Scanning ❌ No ✅ Yes Trivy secures Terraform & Kubernetes
SBOM Generation ❌ No ✅ Yes Helps with software supply chain security
Speed & Performance ❌ Slower ✅ Fast Trivy is optimized for CI/CD workflows
API Key Required ✅ Yes ❌ No Trivy works out-of-the-box
Cost 💰 Paid Plans 🆓 Free & Open-Source Reduces security costs

By using Trivy alongside Snyk, we get faster scans, deeper OS security insights, and better cost-effectiveness while still leveraging Snyk's strengths in application security.

  • Here are some screenshots showing how the scan output will appear in a pull request (PR) Comment:
    Screenshot 2025-02-05 at 5 54 43 PM
    Screenshot 2025-02-06 at 12 30 06 PM

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@safayavatsal
Copy link
Contributor

Added the required path for ingestion.

Copy link
Contributor

github-actions bot commented Feb 7, 2025

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

2 similar comments
Copy link
Contributor

github-actions bot commented Feb 7, 2025

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copy link
Contributor

github-actions bot commented Feb 7, 2025

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copy link
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copy link
Collaborator

@akash-jain-10 akash-jain-10 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. LGTM 🚀

@ulixius9 ulixius9 added the safe to test Add this label to run secure Github workflows on PRs label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants