Skip to content

Add Chef Automate Container Scanning and Remove Trivy Integration#40

Merged
brianLoomis merged 52 commits intomainfrom
peter-at-progress/vuln-scan
Mar 27, 2026
Merged

Add Chef Automate Container Scanning and Remove Trivy Integration#40
brianLoomis merged 52 commits intomainfrom
peter-at-progress/vuln-scan

Conversation

@peter-at-progress
Copy link
Copy Markdown
Contributor

Description

This PR introduces two major changes to the vulnerability scanning workflow:

1. New: Chef Automate Container Scanning Mode

Adds a complete GitHub Action for scanning Chef Automate's embedded Habitat packages in containerized environments:

  • New action: automate-container-scan - Deploys Chef Automate in a Docker container with systemd support, then scans embedded Habitat packages from both chef and core origins using Grype
  • Generates structured JSON vulnerability reports compatible with the Chef vulnerability dashboard
  • Supports both stable and current release channels
  • Captures comprehensive metadata including deployment logs, scan results, and installation size metrics
  • Produces organized output structure under out/container/automate/{channel}/{os}/{version}/{arch}/

Key features:

  • Containerized Automate deployment with proper systemd initialization
  • Separate scans for chef and core Habitat origins
  • Integration with download license requirements
  • Comprehensive logging and error capture
  • Size tracking for installed packages

2. Breaking: Complete Removal of Trivy Integration

Permanently removes all Trivy-related functionality from chef-download-grype-snapshot action following the second Trivy security compromise (March 2026):

  • Removed all Trivy installation, scanning, and comparison logic (~211 lines removed from run.py)
  • Removed Trivy-related action inputs: enable_trivytrivy_scannerstrivy_severitytrivy_ignore_unfixedtrivy_timeouttrivy_cache_dir
  • Removed Trivy output files.
  • Updated documentation to reflect Grype-only scanning
  • Added security notice to README explaining removal rationale

All vulnerability scanning is now performed exclusively by Grype for improved security posture and consistency.

3. New: Database Integration for Vulnerability Trends

Adds insert-scan-results action for PostgreSQL-backed vulnerability analytics:

  • Inserts scan results into trend tables (native_scan_resultshabitat_scan_resultscontainer_scan_results)
  • Upserts CVE detail records tracking first/last observed dates per CVE × package × product × channel
  • Supports all scan modes: native, modern, habitat, and container
  • Idempotent operations using ON CONFLICT - safe for workflow retries
  • Non-blocking: DB failures generate warnings but don't fail scan workflows
  • Includes skip_trend_insert option for test/on-demand scans

4. Additional Enhancements

  • Smart version matching: Documented the version-aware scanning logic in README
  • Habitat dependency separation: Enhanced Habitat scans to categorize vulnerabilities by dependency type (build/runtime)
  • Build number capture: Records CLI build numbers for better traceability
  • Download site categorization: Added download_site dimension (commercial/community/cinc) for database tracking
  • Auth token fallback: Improved HAB_AUTH_TOKEN handling for protected Habitat channels
  • Error logging: Enhanced error capture and debugging output
  • Pre-flight checks: Skip Automate CLI version checks to avoid blocking installations

Related Issue

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Breaking changes:

  • Removal of all Trivy-related inputs and outputs from chef-download-grype-snapshot action
  • Workflows using enable_trivy or other Trivy parameters must be updated
  • Output structure no longer includes trivy.latest.json, trivy.metadata.json, or compare.json files

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

Add documentation for the intelligent major version matching feature that
ensures stable and current channel comparisons use the same major version,
providing more meaningful vulnerability trend analysis.

Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
… is failing

Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
peter-at-progress and others added 8 commits March 23, 2026 11:27
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
Signed-off-by: peter-at-progress <parsenau@progress.com>
Signed-off-by: Peter Arsenault <parsenau@progress.com>
updated documentation

removed some options for stub versions

Signed-off-by: Sean Simmons <ssimmons@progress.com>
Signed-off-by: Sean Simmons <ssimmons@progress.com>
sean-sype-simmons and others added 23 commits March 23, 2026 11:27
Signed-off-by: Sean Simmons <ssimmons@progress.com>
Signed-off-by: Sean Simmons <ssimmons@progress.com>
…l edits later

Signed-off-by: Progress Copyright Bot <copyright@progress.com>
Signed-off-by: cgunasree08 <Chintha.Gunasree@progress.com>
Signed-off-by: cgunasree08 <Chintha.Gunasree@progress.com>
Signed-off-by: Clinton Wolfe <156460+clintoncwolfe@users.noreply.github.com>
Signed-off-by: Clinton Wolfe <156460+clintoncwolfe@users.noreply.github.com>
Signed-off-by: Clinton Wolfe <156460+clintoncwolfe@users.noreply.github.com>
…nstall project deps

Signed-off-by: Clinton Wolfe <156460+clintoncwolfe@users.noreply.github.com>
Signed-off-by: Clinton Wolfe <156460+clintoncwolfe@users.noreply.github.com>
Signed-off-by: Clinton Wolfe <156460+clintoncwolfe@users.noreply.github.com>
Signed-off-by: Clinton Wolfe <156460+clintoncwolfe@users.noreply.github.com>
Signed-off-by: Nandan Hegde <220186393+nandanhegde73@users.noreply.github.com>
Signed-off-by: sandhi <sagarwal@progress.com>
* changes for pipeline for security pipelines

* Fixes for Polaris

Signed-off-by: sandhi <sagarwal@progress.com>

---------

Signed-off-by: sandhi <sagarwal@progress.com>
Co-authored-by: sandhi <sagarwal@progress.com>
Signed-off-by: sandhi <sagarwal@progress.com>
* setting git config to install private gems

Signed-off-by: nikhil2611 <ngupta@progress.com>

* updated with github config in sbom.yml also

Signed-off-by: nikhil2611 <ngupta@progress.com>

* updated the var name

Signed-off-by: nikhil2611 <ngupta@progress.com>

* Security: Replace git config with bundler config for gem credentials

Signed-off-by: nikhil2611 <ngupta@progress.com>

* testing with feature branch

Signed-off-by: nikhil2611 <ngupta@progress.com>

* reverted back to main

Signed-off-by: nikhil2611 <ngupta@progress.com>

* added the condition for PRIVATE_ACCESS_KITCHEN_CHEF_ENTERPRISE

Signed-off-by: nikhil2611 <ngupta@progress.com>

* making logs better

Signed-off-by: nikhil2611 <ngupta@progress.com>

* updating to feature branch to test the changes

Signed-off-by: nikhil2611 <ngupta@progress.com>

* revert back to main

Signed-off-by: nikhil2611 <ngupta@progress.com>

---------

Signed-off-by: nikhil2611 <ngupta@progress.com>
* Added support for ruby-erlang

Signed-off-by: shanmugapriya-tr <shanmugapriya.tiruchengoderamanathan@progress.com>

* Add debug output for language parameter and HEX detector exclusion

* Use ruby-erlang branch for sbom workflow to include HEX detector exclusion

* Fix BlackDuck policy violation count parsing to extract correct numbers

---------

Signed-off-by: shanmugapriya-tr <shanmugapriya.tiruchengoderamanathan@progress.com>
* Revert "Ruby erlang (#36)"

This reverts commit 0531f2a.

* Revert partial

Signed-off-by: sandhi <sagarwal@progress.com>

---------

Signed-off-by: sandhi <sagarwal@progress.com>
…34)

* Add Grype Habitat package scan workflow with build and install modes

* Only fixed vulnerabilities

Signed-off-by: sandhi <sagarwal@progress.com>

* Only fixed vulnerabilities

Signed-off-by: sandhi <sagarwal@progress.com>

---------

Signed-off-by: sandhi <sagarwal@progress.com>
Signed-off-by: sandhi <sagarwal@progress.com>
@peter-at-progress peter-at-progress force-pushed the peter-at-progress/vuln-scan branch from d738c7d to 89f942c Compare March 23, 2026 15:28
Copy link
Copy Markdown
Contributor

@brianLoomis brianLoomis left a comment

Choose a reason for hiding this comment

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

looks good

@brianLoomis brianLoomis merged commit 5649cae into main Mar 27, 2026
5 checks passed
@brianLoomis brianLoomis deleted the peter-at-progress/vuln-scan branch March 27, 2026 11:42
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.

10 participants