steampipe plugin install trivy

Table: trivy_data_source - Query Container Registry Images using SQL

A Container Registry Image is a versioned instance of an application, service, or system component, or a set of related services packaged together. These images are stored in the Container Registry, a Docker v2 compliant, private container registry service. The Container Registry supports private Docker namespace creation, image push and pull, and Docker manifest queries.

Table Usage Guide

The trivy_data_source table provides insights into Container Registry Images, specifically their vulnerability data. As a security analyst, explore image-specific details through this table, including the type and severity of vulnerabilities, and associated metadata. Utilize it to uncover information about potential security risks and exposures, such as those with high severity vulnerabilities, the distribution of vulnerabilities, and the verification of security policies.

Examples

List all data sources

Explore all the data sources within your system in a structured order for a comprehensive view and better management. This aids in identifying the data origin, ensuring data accuracy, and enhancing overall data governance.

select
*
from
trivy_data_source
order by
system;
select
*
from
trivy_data_source
order by
system;

Get a specific data source

Pinpoint the specific locations where a particular data source, such as 'Oracle Linux 6', is being used. This can be beneficial in understanding the scope and impact of that data source within your system.

select
system,
name,
url
from
trivy_data_source
where
name = 'Oracle Linux 6';
select
system,
name,
url
from
trivy_data_source
where
name = 'Oracle Linux 6';

List all Alpine Linux data sources

Explore the various data sources related to Alpine Linux in order to understand their systems and associated URLs. This could be beneficial in identifying and managing these resources effectively.

select
name,
system,
url
from
trivy_data_source
where
id = 'alpine'
order by
name,
system;
select
name,
system,
url
from
trivy_data_source
where
id = 'alpine'
order by
name,
system;

Schema for trivy_data_source

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
idtextIdentifier of the data source, e.g. alpine.
nametextName of the data source, e.g. Alpine Secdb.
systemtext=System the data source represents, e.g. alpine 3.11.
urltextURL location of the data source.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- trivy

You can pass the configuration to the command with the --config argument:

steampipe_export_trivy --config '<your_config>' trivy_data_source