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

Implementation of kernel vmlinuz extractor. #360

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
18 changes: 18 additions & 0 deletions binary/proto/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
"github.com/google/osv-scalibr/extractor/filesystem/os/cos"
"github.com/google/osv-scalibr/extractor/filesystem/os/dpkg"
"github.com/google/osv-scalibr/extractor/filesystem/os/flatpak"
"github.com/google/osv-scalibr/extractor/filesystem/os/kernel/vmlinuz"
"github.com/google/osv-scalibr/extractor/filesystem/os/macapps"
"github.com/google/osv-scalibr/extractor/filesystem/os/pacman"
"github.com/google/osv-scalibr/extractor/filesystem/os/rpm"
Expand Down Expand Up @@ -350,6 +351,23 @@ func setProtoMetadata(meta any, i *spb.Inventory) {
UpdateUrl: m.KSUpdateURL,
},
}
case *vmlinuz.Metadata:
i.Metadata = &spb.Inventory_VmlinuzMetadata{
VmlinuzMetadata: &spb.VMLINUZPackageMetadata{
Name: m.Name,
Version: m.Version,
Architecture: m.Architecture,
ExtendedVersion: m.ExtendedVersion,
Format: m.Format,
SwapDevice: m.SwapDevice,
RootDevice: m.RootDevice,
VideoMode: m.VideoMode,
OsId: m.OSID,
OsVersionCodename: m.OSVersionCodename,
OsVersionId: m.OSVersionID,
RwRootFs: m.RwRootFs,
},
}
case *ctrdfs.Metadata:
i.Metadata = &spb.Inventory_ContainerdContainerMetadata{
ContainerdContainerMetadata: &spb.ContainerdContainerMetadata{
Expand Down
19 changes: 18 additions & 1 deletion binary/proto/scan_result.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ message Inventory {
JavaArchiveMetadata java_archive_metadata = 15;
JavaLockfileMetadata java_lockfile_metadata = 31;
PACMANPackageMetadata pacman_metadata = 36;
VMLINUZPackageMetadata vmlinuz_metadata = 39;
OSVPackageMetadata osv_metadata = 16;
PythonRequirementsMetadata python_requirements_metadata = 21;
ContainerdContainerMetadata containerd_container_metadata = 22;
Expand Down Expand Up @@ -315,6 +316,22 @@ message FlatpakPackageMetadata {
string developer = 9;
}

// The additional data found in VMLINUZ packages.
message VMLINUZPackageMetadata {
string name = 1;
string version = 2;
string architecture = 3;
string extended_version = 4;
string format = 5;
int32 swap_device = 6;
int32 root_device = 7;
string video_mode = 8;
string os_id = 9;
string os_version_codename = 10;
string os_version_id = 11;
bool rw_root_fs = 12;
}

// The additional data found in Mac Applications.
message MacAppsMetadata {
string bundle_display_name = 1;
Expand Down Expand Up @@ -395,4 +412,4 @@ message ContainerdRuntimeContainerMetadata {
message WindowsOSVersion {
string product = 1;
string full_version = 2;
}
}
Loading