Skip to content

Inventory packages in container layers and function bundles - #167

Merged
om986 merged 2 commits into
mainfrom
feat/workload-containers-functions
Dec 2, 2026
Merged

om986 merged 2 commits into
mainfrom
feat/workload-containers-functions

Conversation

@om986

@om986 om986 commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • om scan workload container walks image layers already stored by om scan k8s and adds those CPE 2.3 names and package URLs to packages on each Kubernetes workload that lists the image.
  • om scan workload function aws, azure, and gcp write a workload for each Lambda, Azure Functions, or Cloud Functions bundle and store the same identifiers. No volume is attached, and bundle bytes stay off the graph.
  • A later om scan aws, om scan azure, or om scan gcp leaves function workloads in place. Shared filesystems stay on Shared filesystems are not inventoried for packages #106.

Fixes #105

Test plan

  • go test ./internal/workload/... ./internal/cmd/ ./internal/collectors/aws/ ./internal/collectors/azure/ ./internal/collectors/gcp/ ./internal/graph/
  • om scan k8s, then om scan workload container, then om enrich cve against a pod whose image contains a known package
  • om scan workload function aws on a zip Lambda, and confirm the presigned URL is not stored on the node
  • Run om scan aws afterward and confirm the function workload is still in the graph

Made with Cursor

A library inside an image or a function never became a CVE finding, because those bytes were not walked.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Comment thread internal/workload/archive.go Fixed
Comment thread internal/workload/archive.go Fixed
Package databases are written under a temp directory using a fixed path list, so a zip or tar entry cannot escape that directory.

Co-authored-by: Cursor <cursoragent@cursor.com>
@om986
om986 merged commit 8e86c73 into main Dec 2, 2026
7 checks passed
@om986
om986 deleted the feat/workload-containers-functions branch December 2, 2026 23:39
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.

Container images and function bundles are not inventoried for packages

2 participants