Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OpenSourceOM Core is the platform behind [opensourceom.org](https://opensourceom

Traditional scanners flood you with CVEs and misconfigurations. OpenSourceOM connects the dots — showing which findings sit on paths from the internet to your sensitive data and privileged identities.

> **Status:** Phase 3 has shipped. Phase 4 is open: `om scan workload` inventories Linux root volumes, boot images, container layers, and function bundles. Shared filesystems are still open. Phase 5 (secret and malware findings on that storage) is open. Further rule packs stay open for contributors ([#10](https://github.com/OpenSourceOM/core/issues/10)). See the [roadmap](./docs/ROADMAP.md).
> **Status:** Phase 3 has shipped. Phase 4's ordered path has shipped: `om scan workload` inventories Linux root volumes, boot images, container layers, function bundles, and shared filesystems. Phase 5 (secret and malware findings on that storage) is open. Further rule packs stay open for contributors ([#10](https://github.com/OpenSourceOM/core/issues/10)). See the [roadmap](./docs/ROADMAP.md).

## Why this exists

Expand Down Expand Up @@ -109,6 +109,9 @@ export AWS_REGION=us-east-1
# ./om scan workload function aws
# ./om scan workload function azure
# ./om scan workload function gcp
# sudo -E ./om scan workload fs aws
# sudo -E ./om scan workload fs azure
# sudo -E ./om scan workload fs gcp

# Or ingest a custom collector (stdout is a graph batch)
go build -o example-collector ./examples/collector
Expand Down Expand Up @@ -171,6 +174,9 @@ An API token is created only when an admin asks for one, from the console or wit
./om scan workload function aws
./om scan workload function azure
./om scan workload function gcp
./om scan workload fs aws # instance that can already mount the EFS filesystem
./om scan workload fs azure # VM that can already mount the file share
./om scan workload fs gcp # instance on the Filestore VPC
./om scan plugin -- ./my-collector
```

Expand All @@ -197,7 +203,7 @@ Full documentation: [opensourceom.org](https://opensourceom.org) (docs at [opens
| **1** | Attack path queries, CVE enrichment, web UI, Azure/GCP collectors |
| **2** | CSPM rules, blast radius, K8s connector, exports |
| **3** | Plugin SDK, Helm, embedded rule pack, demo graph, inventory-backed CVEs, crown-jewel datastores, attack-path findings, and cloud audit context (CloudTrail, Activity Log, Admin Activity). Shipped. |
| **4** | Package inventory from persistent workload storage. Linux root volumes, boot images, container layers, and function bundles ship with `om scan workload`. Shared filesystems are open. |
| **4** | Package inventory from persistent workload storage. Linux root volumes, boot images, container layers, function bundles, and shared filesystems ship with `om scan workload`. |
| **5** | Secret and malware findings on storage Phase 4 already opens. Kind and path only. Open. |

Details: [docs/ROADMAP.md](./docs/ROADMAP.md)
Expand Down
6 changes: 4 additions & 2 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ Further community rule packs (PCI and additional CIS mappings) stay open for con

Phase 4 writes `packages` (CPE 2.3 names and package URLs) from persistent workload storage onto the workload node that enrichment already matches. The sources, in order, are AWS Linux root volumes, Azure VM and GCE root volumes, boot images, container image layers and function bundles, and shared filesystems (EFS, Azure Files, Filestore). The scan is opt-in. `om scan aws`, `om scan azure`, and `om scan gcp` stay read-only API collectors.

`om scan workload aws` is the AWS root-volume scan. `om scan workload azure` and `om scan workload gcp` are the same walk for Azure OS disks and GCE boot disks. `om scan workload image aws`, `om scan workload image azure`, and `om scan workload image gcp` read each boot image once and add those package identifiers to instances launched from it. A package that exists only on an instance disk stays on that instance. Each of those commands runs as root on a worker in a scanner account, subscription, or project. The production account grants snapshot and share. The worker mounts the copy and stores package identifiers only. A later API scan keeps `packages`. Windows, LVM, and non-root disks are skipped. See [ADR 006](./adr/006-aws-root-volume-packages.md), [ADR 007](./adr/007-azure-gce-root-volume-packages.md), [ADR 008](./adr/008-boot-image-packages.md), and [ADR 009](./adr/009-scanner-account.md). The grants are in [deploy/connect](../deploy/connect/README.md).
`om scan workload aws` is the AWS root-volume scan. `om scan workload azure` and `om scan workload gcp` are the same walk for Azure OS disks and GCE boot disks. `om scan workload image aws`, `om scan workload image azure`, and `om scan workload image gcp` read each boot image once and add those package identifiers to instances launched from it. A package that exists only on an instance disk stays on that instance. Each of those commands runs as root on a worker in a scanner account, subscription, or project. The production account grants snapshot and share. The worker mounts the copy and stores package identifiers, plus shared-filesystem mounts from fstab and systemd units. A later API scan keeps `packages` and `filesystems`. Windows, LVM, and non-root disks are skipped. See [ADR 006](./adr/006-aws-root-volume-packages.md), [ADR 007](./adr/007-azure-gce-root-volume-packages.md), [ADR 008](./adr/008-boot-image-packages.md), and [ADR 009](./adr/009-scanner-account.md). The grants are in [deploy/connect](../deploy/connect/README.md).

`om scan workload container` reads container image layers already stored on Kubernetes workloads. `om scan workload function aws`, `om scan workload function azure`, and `om scan workload function gcp` read Lambda deployment packages, Azure Functions bundles, and Cloud Functions source. Those commands do not attach a volume. The graph stores package identifiers on the workload, beside an existing `images` list for a pod. A repository source, a zstd layer, and a foreign layer are skipped. Shared filesystems are still open. See [ADR 011](./adr/011-container-function-packages.md).
`om scan workload container` reads container image layers already stored on Kubernetes workloads. `om scan workload function aws`, `om scan workload function azure`, and `om scan workload function gcp` read Lambda deployment packages, Azure Functions bundles, and Cloud Functions source. Those commands do not attach a volume. The graph stores package identifiers on the workload, beside an existing `images` list for a pod. A repository source, a zstd layer, and a foreign layer are skipped. See [ADR 011](./adr/011-container-function-packages.md).

`om scan workload fs aws`, `om scan workload fs azure`, and `om scan workload fs gcp` read EFS, Azure Files, and Filestore. The root-volume and boot-image scans record those mounts from fstab and systemd units. The filesystem scan runs as root on a worker that can already reach the filesystem and adds package identifiers to the workloads that list it. It does not create a mount target, a private endpoint, or a VPC authorization. See [ADR 012](./adr/012-shared-filesystem-packages.md).

Phase 5 adds a finding for a secret pattern or a malware signature on storage that Phase 4 reader already opened. The finding stores the kind and the path. Object bodies and database rows are in neither phase.

Expand Down
8 changes: 5 additions & 3 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,28 @@ The ordered path above is complete.

## Phase 4 — Workload inventory

Phase 4 is open. Cloud collectors record the VM, its exposure, and its identity. They do not record the packages installed on it. `om enrich cve` already writes a finding when `packages` on a workload matches. This phase fills that property from persistent workload storage.
The ordered path for Phase 4 is complete. Cloud collectors record the VM, its exposure, and its identity. They do not record the packages installed on it. `om enrich cve` already writes a finding when `packages` on a workload matches. This phase fills that property from persistent workload storage.

The phase ends when a package found in that storage is a CVE finding on the workload the graph already stores. A block volume is the first source. Boot images, container image layers, function bundles, and shared filesystems are the rest.

The scan is opt-in and separate from `om scan aws`, `om scan azure`, and `om scan gcp`. Those commands stay read-only. Root-volume and boot-image scans run a worker in a scanner account, subscription, or project. Snapshots and mounts are removed when the scan finishes, including when it fails. Container layers and function bundles are read without a volume attach. Each scan writes CPE 2.3 names and package URLs onto the workload. File contents stay off the graph.
The scan is opt-in and separate from `om scan aws`, `om scan azure`, and `om scan gcp`. Those commands stay read-only. Root-volume and boot-image scans run a worker in a scanner account, subscription, or project. Snapshots and mounts are removed when the scan finishes, including when it fails. Container layers and function bundles are read without a volume attach. Shared filesystems are mounted read-only from a worker that can already reach them. Each scan writes CPE 2.3 names and package URLs onto the workload. File contents stay off the graph.

The path, in order:

- [x] **AWS Linux root volumes** — [#102](https://github.com/OpenSourceOM/core/issues/102)
- [x] **Azure VM and GCE root volumes** — the same walker, those snapshot APIs — [#103](https://github.com/OpenSourceOM/core/issues/103)
- [x] **Boot images** — an AMI and the Azure and GCE equivalents, scanned once and applied to instances launched from that image — [#104](https://github.com/OpenSourceOM/core/issues/104)
- [x] **Container image layers and function bundles** — layers for images already stored on Kubernetes workloads, plus Lambda deployment packages and the Azure and GCP equivalents. No volume attach — [#105](https://github.com/OpenSourceOM/core/issues/105)
- [ ] **Shared filesystems** — EFS, Azure Files, and Filestore, when the application is installed there and a root-volume scan would miss it — [#106](https://github.com/OpenSourceOM/core/issues/106)
- [x] **Shared filesystems** — EFS, Azure Files, and Filestore, when the application is installed there and a root-volume scan would miss it — [#106](https://github.com/OpenSourceOM/core/issues/106)

`om scan workload aws` reads Linux root volumes in a production account from a worker in a scanner account. It assumes a snapshot role, shares the snapshot, copies it into the scanner account, and mounts that copy read-only. `om scan workload azure` and `om scan workload gcp` do the same from a scanner subscription or project. The grants are in `deploy/connect`. A later `om scan aws`, `om scan azure`, or `om scan gcp` leaves `packages` in place. Windows, LVM, and disks other than the root volume are skipped. See [ADR 009](./adr/009-scanner-account.md).

`om scan workload image aws` reads each AMI once, including an image no instance is running, and adds those package identifiers to every instance launched from it. `om scan workload image azure` and `om scan workload image gcp` do the same for Azure and GCE images. A package found only on an instance's own disk stays on that instance. Marketplace images the account cannot share are skipped. The volume or disk created for the read is deleted. The image's own snapshot is not.

`om scan workload container` reads each container image stored by `om scan k8s` once and adds those package identifiers to every Kubernetes workload that lists the image. The `images` list stays. Registry credentials stay in the operator environment. `om scan workload function aws`, `om scan workload function azure`, and `om scan workload function gcp` write a workload for each function and store package identifiers from its deployment package or container image. A repository source, a zstd layer, and a foreign layer are skipped. No snapshot or volume is attached. Bundle bytes and layer bytes are deleted after the walk. A later API scan leaves these packages in place. See [ADR 011](./adr/011-container-function-packages.md).

The ordered path above is complete. `om scan workload fs aws` reads each EFS filesystem recorded on a workload. `om scan workload fs azure` reads Azure Files, and `om scan workload fs gcp` reads Filestore. The root-volume and boot-image scans record those mounts from fstab and systemd units. The filesystem scan runs as root on a worker that can already reach the filesystem, mounts it read-only, and adds package identifiers to every workload that lists it. A package already stored stays. The command does not create a mount target, a private endpoint, or a VPC authorization. A later root-volume scan replaces `packages`, so the filesystem scan runs again after it. See [ADR 012](./adr/012-shared-filesystem-packages.md).

Object bodies and database rows stay out. They are customer data, not the installed software. A public bucket or database is already an exposure finding from the API scan.

## Phase 5 — Findings on inventoried storage
Expand Down
45 changes: 45 additions & 0 deletions docs/adr/012-shared-filesystem-packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--
Copyright 2026 OpenSourceOM
SPDX-License-Identifier: Apache-2.0
-->

# ADR 012: Shared filesystem package inventory

**Status:** Accepted
**Date:** 2026-12-02
**Phase:** 4

## Context

[ADR 006](./006-aws-root-volume-packages.md) reads a block volume. An application can be installed on a filesystem mounted into the VM instead: EFS, Azure Files, or Filestore. The root-volume scan then reports the packages on the disk and misses the library on the mount.

Those filesystems are not block volumes. A snapshot cannot be shared into the scanner account without a new network path. [Issue #106](https://github.com/OpenSourceOM/core/issues/106) says the scan uses the account's existing mount permissions and does not open the filesystem to a new network.

## Decision

`om scan workload fs aws`, `om scan workload fs azure`, and `om scan workload fs gcp` are subcommands of the same opt-in scan. `om scan aws`, `om scan azure`, and `om scan gcp` stay read-only.

The root-volume scan and the boot-image scan, while the guest is mounted, read `/etc/fstab` and systemd `.mount` units. They store EFS ids, Azure Files hosts and shares, and private NFS exports on the workload as `filesystems`. File contents are not stored. The root-volume scan replaces that list, including with an empty list when the guest no longer mounts one. The boot-image scan adds mounts found on the image and does not remove mounts already stored. An API scan that omits `filesystems` keeps the list.

The filesystem command runs as root on a worker in the account, subscription, or project being scanned, on a network that can already reach the filesystem. It mounts each recorded filesystem once, read-only, and adds the CPE 2.3 names and package URLs to every workload that lists it. Packages already stored stay. The walk reads dpkg, apk, and rpm databases at the mount root, plus Maven jars, Python distributions, and npm `package.json` files. Other file bodies are not read.

An EFS filesystem is mounted only when `DescribeMountTargets` shows an available mount target in the worker's VPC. The command does not call `CreateMountTarget`. An Azure Files share is mounted only when the share exists in the subscription. NFS is mounted without a credential. SMB needs `--cifs-credentials`, a file `mount` reads; the path is not stored. The command does not create a private endpoint. A Filestore export is mounted only when the instance's VPC name is the worker's VPC name. The command does not add a network.

A filesystem the account no longer has is skipped. The mount is removed when the walk finishes, including when it fails. The graph, logs, and exports store package identifiers. They do not store file contents.

The new AWS actions are `elasticfilesystem:DescribeFileSystems`, `elasticfilesystem:DescribeMountTargets`, and `ec2:DescribeInstances`. The new Azure actions are `Microsoft.Storage/storageAccounts/read` and `Microsoft.Storage/storageAccounts/fileServices/shares/read`. The new GCP permission is `file.instances.list`. The API collectors do not gain these permissions.

Object bodies and database rows stay out. LVM roots and data disks stay out. A filesystem that requires the EFS mount helper is not given a new credential.

## Consequences

The filesystem command cannot run in the scanner account. The worker has to be on the network that already mounts the filesystem. The Helm chart does not schedule it.

A later root-volume scan replaces `packages` with what is on the disk. Run the filesystem command again after that. `om enrich cve` is unchanged. It attaches a CVE only when one of these identifiers matches.

## References

- [docs/ROADMAP.md](../ROADMAP.md)
- [ADR 006](./006-aws-root-volume-packages.md)
- [ADR 009](./009-scanner-account.md)
- [Issue #106](https://github.com/OpenSourceOM/core/issues/106)
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources/v3 v3.0.1
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v3 v3.0.0
github.com/anchore/go-rpmdb v0.2.2
github.com/aws/aws-sdk-go-v2 v1.48.2
github.com/aws/aws-sdk-go-v2 v1.49.0
github.com/aws/aws-sdk-go-v2/config v1.33.12
github.com/aws/aws-sdk-go-v2/credentials v1.20.15
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.7
github.com/aws/aws-sdk-go-v2/service/cloudtrail v1.65.13
github.com/aws/aws-sdk-go-v2/service/ec2 v1.350.2
github.com/aws/aws-sdk-go-v2/service/ecr v1.67.0
github.com/aws/aws-sdk-go-v2/service/efs v1.52.1
github.com/aws/aws-sdk-go-v2/service/iam v1.64.6
github.com/aws/aws-sdk-go-v2/service/lambda v1.113.3
github.com/aws/aws-sdk-go-v2/service/rds v1.130.3
Expand Down Expand Up @@ -52,8 +53,8 @@ require (
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.63.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.63.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.25 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.14 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.27 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.9 // indirect
Expand Down
Loading