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

VEX Autodiscovery! #1619

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

VEX Autodiscovery! #1619

wants to merge 7 commits into from

Conversation

puerco
Copy link
Contributor

@puerco puerco commented Nov 29, 2023

This PR adds autodiscovery capabilities to the VEX processor when scanning container images.

The discovery feature is disabled by default, this PR proposes a new --vex-autodiscover flag that starts the autodiscover flow when set.

The whole autodiscover logic is performed by the openvex/discovery module. It looks for OpenVEX attestations attached using the sigstore attestation spec to the container image being scanned. If any are found, they are retrieved from the image registry and any applicable OpenVEX statements are added to the VEX history computation. In other words, any documents found attached to the image are mixed with those specified via the command line with --vex.

This implements most of 3 & 4 of our plan outlined in #1365

At this time we are not performing any signature verification or lookups in other registries.

Signed-off-by: Adolfo Garcia Veytia (puerco) puerco@chainguard.dev

@puerco
Copy link
Contributor Author

puerco commented Nov 29, 2023

@wagoodman : please let me know what you think about the approach I'm taking. Let's also discuss adding the audit trail to the raw json scan results.

@puerco puerco force-pushed the vex-discovery branch 6 times, most recently from f485f18 to 180c951 Compare November 29, 2023 06:08
This commit imports the openvex autodiscovery module

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
This commits adds a new vex-autodiscover option that enables
the VEX discovery mechanism. It is exposed as a flag, in the
config file or via an environment variable.

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
This commit replaces the internal logic that computes
software identifiers from images and delegates it
to the OpenVEX OCI module.

Signed-off-by: Adolfo Garcia Veytia (puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo Garcia Veytia (puerco) <puerco@chainguard.dev>
The generation of identifiers is now handled by the openvex discovery module so we
drop it from the vex processor implementation and also delete the test file.

Signed-off-by: Adolfo Garcia Veytia (puerco) <puerco@chainguard.dev>
As we now delegate the generation of identifiers to the openvex libraries,
we pass the user input string verbatim instead of using the stereoscope
reference in the tests.

Signed-off-by: Adolfo Garcia Veytia (puerco) <puerco@chainguard.dev>
@kzantow
Copy link
Contributor

kzantow commented Feb 14, 2024

Hi @puerco, I had a look through this and I think it looks pretty good. Is there a possibility of adding some sort of test for this, though?

@wagoodman wagoodman self-assigned this Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants