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(alpine): support apk repositories #1987

Merged
merged 9 commits into from
Apr 14, 2022
Merged

feat(alpine): support apk repositories #1987

merged 9 commits into from
Apr 14, 2022

Conversation

knqyf263
Copy link
Collaborator

@knqyf263 knqyf263 commented Apr 13, 2022

Description

Try to take the Alpine version from /etc/apk/repositories. It allows to scan distroless images based on Alpine.

$ trivy image ghcr.io/distroless/git
2022-04-13T18:43:16.352+0300    INFO    Detected OS: alpine
2022-04-13T18:43:16.352+0300    INFO    Detecting Alpine vulnerabilities...
2022-04-13T18:43:16.354+0300    INFO    Number of language-specific files: 1
2022-04-13T18:43:16.354+0300    INFO    Detecting gobinary vulnerabilities...

ghcr.io/distroless/git (alpine edge)
====================================
Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)

+---------+------------------+----------+-------------------+---------------+---------------------------------------+
| LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION |                 TITLE                 |
+---------+------------------+----------+-------------------+---------------+---------------------------------------+
| git     | CVE-2022-24765   | MEDIUM   | 2.35.1-r2         | 2.35.2-r0     | Git for Windows is a                  |
|         |                  |          |                   |               | fork of Git containing                |
|         |                  |          |                   |               | Windows-specific patches. ...         |
|         |                  |          |                   |               | -->avd.aquasec.com/nvd/cve-2022-24765 |
+---------+------------------+----------+-------------------+---------------+---------------------------------------+

...

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).

@knqyf263 knqyf263 self-assigned this Apr 13, 2022
@knqyf263 knqyf263 requested a review from DmitriyLewen April 13, 2022 15:46
@knqyf263 knqyf263 merged commit 6fdb554 into main Apr 14, 2022
@knqyf263 knqyf263 deleted the apk_repos branch April 14, 2022 06:52
liamg pushed a commit that referenced this pull request Jun 7, 2022
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.

trivy fails to scan apk-based containers without /etc/os-release matching alpine
2 participants