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

feat(vex): retrieve VEX attestations from OCI registries #7249

Merged
merged 8 commits into from
Jul 30, 2024

Conversation

knqyf263
Copy link
Collaborator

@knqyf263 knqyf263 commented Jul 29, 2024

Description

Auto-discover VEX attestations in OCI registries.

$ docker run -d -p 10000:5000 --name registry registry:2 # macOS uses port 5000
$ crane copy ghcr.io/aquasecurity/trivy:0.50.0 localhost:10000/trivy:0.50.0 --platform linux/amd64
$ cosign attest --predicate oci.openvex.json --type openvex localhost:10000/trivy:0.50.0
$ trivy image --vex oci localhost:10000/trivy:0.50.0 --show-suppressed --pkg-types os -d
...
2024-07-29T17:54:44+04:00       DEBUG   [vex] VEX attestation found, taking the first one  type="oci" purl="pkg:oci/trivy@sha256%3A04204075ff274c3aa33108d7853b264540bb1036bfdde6eb78e76f6e2d0a7d7d?arch=amd64&repository_url=localhost%3A10000%2Ftrivy"


Suppressed Vulnerabilities (Total: 3)

┌───────────────┬────────────────┬──────────┬──────────────┬───────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────┐
│    Library    │ Vulnerability  │ Severity │    Status    │                     Statement                     │                            Source                            │
├───────────────┼────────────────┼──────────┼──────────────┼───────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ busybox       │ CVE-2023-42363 │ MEDIUM   │ not_affected │ vulnerable_code_cannot_be_controlled_by_adversary │ VEX in OCI registry                                          │
│               │                │          │              │                                                   │ (pkg:oci/trivy@sha256%3A04204075ff274c3aa33108d7853b264540b- │
│               │                │          │              │                                                   │ b1036bfdde6eb78e76f6e2d0a7d7d?arch=amd64&repository_url=loc- │
│               │                │          │              │                                                   │ alhost%3A10000%2Ftrivy)                                      │
├───────────────┤                │          │              │                                                   │                                                              │
│ busybox-binsh │                │          │              │                                                   │                                                              │
│               │                │          │              │                                                   │                                                              │
│               │                │          │              │                                                   │                                                              │
│               │                │          │              │                                                   │                                                              │
├───────────────┤                │          │              │                                                   │                                                              │
│ ssl_client    │                │          │              │                                                   │                                                              │
│               │                │          │              │                                                   │                                                              │
│               │                │          │              │                                                   │                                                              │
│               │                │          │              │                                                   │                                                              │
└───────────────┴────────────────┴──────────┴──────────────┴───────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────┘

Related issues

Related PRs

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

Signed-off-by: knqyf263 <knqyf263@gmail.com>
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Signed-off-by: knqyf263 <knqyf263@gmail.com>
@knqyf263 knqyf263 self-assigned this Jul 29, 2024
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Signed-off-by: knqyf263 <knqyf263@gmail.com>
@knqyf263 knqyf263 marked this pull request as ready for review July 30, 2024 04:28
@knqyf263 knqyf263 marked this pull request as draft July 30, 2024 04:28
Signed-off-by: knqyf263 <knqyf263@gmail.com>
@knqyf263 knqyf263 marked this pull request as ready for review July 30, 2024 06:31
Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@knqyf263 knqyf263 added this pull request to the merge queue Jul 30, 2024
Merged via the queue into aquasecurity:main with commit c2fd2e0 Jul 30, 2024
20 checks passed
@knqyf263 knqyf263 deleted the feat/vex_oci branch July 30, 2024 08:24
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.

feat(vex): retrieve VEX attestations from OCI registries
2 participants