mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-06 12:51:17 -08:00
Compare commits
135 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bdbeaba66 | ||
|
|
d85cb77123 | ||
|
|
1bee83ccc4 | ||
|
|
4d1894327e | ||
|
|
1391b3bf47 | ||
|
|
b6d5b82c48 | ||
|
|
9dfb0fe3a9 | ||
|
|
455546975c | ||
|
|
c189aa6a0a | ||
|
|
8442528fa7 | ||
|
|
d09787e150 | ||
|
|
0285a89c7c | ||
|
|
7d7784fecb | ||
|
|
ca6f196001 | ||
|
|
e621cf2bc1 | ||
|
|
906ab5483e | ||
|
|
1549c25709 | ||
|
|
fe1d07e58c | ||
|
|
793a1aa3c8 | ||
|
|
4a94477532 | ||
|
|
9bc2b1949c | ||
|
|
49691ba85e | ||
|
|
87ff0c1bbc | ||
|
|
de30c3f8d6 | ||
|
|
4c3bfb89a4 | ||
|
|
8b21cfe7eb | ||
|
|
46700f7b74 | ||
|
|
014be7e143 | ||
|
|
b3ff2c35ea | ||
|
|
9c786de8f9 | ||
|
|
188e108d7c | ||
|
|
7d7842f2f3 | ||
|
|
901a3715cb | ||
|
|
095b5ce97c | ||
|
|
1d3f70e07f | ||
|
|
5e308da81a | ||
|
|
2231e4068d | ||
|
|
b3680f0016 | ||
|
|
89527796f6 | ||
|
|
165d593fdb | ||
|
|
d8b09628f0 | ||
|
|
d35e8ec351 | ||
|
|
f50b0ce8af | ||
|
|
ed8607b710 | ||
|
|
ea28d3b6f3 | ||
|
|
827cea3245 | ||
|
|
b2a0d83518 | ||
|
|
85e0139f32 | ||
|
|
80d5df0ceb | ||
|
|
3a54e5b644 | ||
|
|
acc6a9bd01 | ||
|
|
96af6dc499 | ||
|
|
675e1b4118 | ||
|
|
8ca484f538 | ||
|
|
9a25f4fbe4 | ||
|
|
467ec46cd3 | ||
|
|
52feff2213 | ||
|
|
add65f2f0c | ||
|
|
20f2bae49b | ||
|
|
8eb9df8447 | ||
|
|
88aaffa957 | ||
|
|
469c0b41df | ||
|
|
4a34f72f22 | ||
|
|
4d721e1410 | ||
|
|
9c91da8a2b | ||
|
|
5b9d942313 | ||
|
|
d6b37cb87e | ||
|
|
9c6f077818 | ||
|
|
0b5d936dbe | ||
|
|
6eebed33b2 | ||
|
|
43085a80bc | ||
|
|
4f90b114ea | ||
|
|
d9fa353a06 | ||
|
|
9a1d7460f6 | ||
|
|
d18d17b861 | ||
|
|
4b57c0d4e6 | ||
|
|
ccd9b2d2c5 | ||
|
|
ec770cd819 | ||
|
|
b7ec633fb2 | ||
|
|
7aabff1236 | ||
|
|
9dc1bdffb1 | ||
|
|
2ac672a663 | ||
|
|
11ae6b29d5 | ||
|
|
f201f59e27 | ||
|
|
25d45e1ac5 | ||
|
|
298ba99b8f | ||
|
|
65cbe3cac3 | ||
|
|
f94e8dcf04 | ||
|
|
9629303a0f | ||
|
|
020c4a3b14 | ||
|
|
2f2d1a908b | ||
|
|
03ad8a3cd0 | ||
|
|
1218e111ef | ||
|
|
78b7529172 | ||
|
|
e2bcb44687 | ||
|
|
a57c27eeec | ||
|
|
926f323a72 | ||
|
|
aa20adb22b | ||
|
|
3e0779a78d | ||
|
|
09442d65f2 | ||
|
|
415b99dab3 | ||
|
|
35b038edd3 | ||
|
|
34a95c1556 | ||
|
|
b2821420fd | ||
|
|
216a33b4cd | ||
|
|
ad0bb7ce23 | ||
|
|
17b84f6c09 | ||
|
|
7629f7f0d6 | ||
|
|
ac5f313129 | ||
|
|
329f245283 | ||
|
|
d6595ad7c9 | ||
|
|
114df7a345 | ||
|
|
e5ff5ec895 | ||
|
|
1bc02f9f6a | ||
|
|
05fa7791dc | ||
|
|
6fbdec6e83 | ||
|
|
94eb7cc592 | ||
|
|
b847e57991 | ||
|
|
07a731c4bb | ||
|
|
4ee7a1e173 | ||
|
|
ede778fb7d | ||
|
|
64a07dad38 | ||
|
|
623eb79080 | ||
|
|
51b8fd8393 | ||
|
|
6f7776e5ec | ||
|
|
a70cee9651 | ||
|
|
5e36cb91de | ||
|
|
74bf99b828 | ||
|
|
3ed0cfbd5f | ||
|
|
aca31dffb3 | ||
|
|
18b80e3781 | ||
|
|
b83174f32d | ||
|
|
80bbe47774 | ||
|
|
7726963e86 | ||
|
|
db2136b17c |
@@ -1,4 +1,6 @@
|
||||
version: 2.1
|
||||
orbs:
|
||||
codecov: codecov/codecov@1.1.0
|
||||
|
||||
defaults: &defaults
|
||||
docker :
|
||||
@@ -24,27 +26,21 @@ jobs:
|
||||
- run:
|
||||
name: Test
|
||||
command: make test
|
||||
integration-test:
|
||||
<<: *defaults
|
||||
parameters:
|
||||
docker_version:
|
||||
type: string
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker:
|
||||
version: << parameters.docker_version >>
|
||||
- run:
|
||||
name: Integration Test
|
||||
command: make test-integration
|
||||
- codecov/upload:
|
||||
file: ./coverage.txt
|
||||
|
||||
release:
|
||||
<<: *defaults
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker:
|
||||
version: 18.06.0-ce
|
||||
version: 19.03.13
|
||||
- run:
|
||||
name: setup docker
|
||||
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
name: login to Docker Hub
|
||||
command: echo $DOCKER_PASS | docker login --username $DOCKER_USER --password-stdin
|
||||
- run:
|
||||
name: login to GitHub Container Registry
|
||||
command: echo $GITHUB_TOKEN | docker login ghcr.io -u $GITHUB_USER --password-stdin
|
||||
- run:
|
||||
name: Release
|
||||
command: goreleaser --rm-dist
|
||||
@@ -71,8 +67,6 @@ workflows:
|
||||
release:
|
||||
jobs:
|
||||
- unit-test
|
||||
- integration-test:
|
||||
docker_version: 18.09.3
|
||||
- release:
|
||||
filters:
|
||||
branches:
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
.git
|
||||
.github
|
||||
.cache
|
||||
.circleci
|
||||
integration
|
||||
imgs
|
||||
|
||||
14
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
14
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
@@ -1,31 +1,31 @@
|
||||
---
|
||||
name: Bug Report
|
||||
labels: bug
|
||||
labels: kind/bug
|
||||
about: If something isn't working as expected.
|
||||
---
|
||||
|
||||
**Description**
|
||||
## Description
|
||||
|
||||
<!--
|
||||
Briefly describe the problem you are having in a few paragraphs.
|
||||
-->
|
||||
|
||||
**What did you expect to happen?**
|
||||
## What did you expect to happen?
|
||||
|
||||
|
||||
**What happened instead?**
|
||||
## What happened instead?
|
||||
|
||||
|
||||
**Output of run with `-debug`:**
|
||||
## Output of run with `-debug`:
|
||||
|
||||
```
|
||||
(paste your output here)
|
||||
```
|
||||
|
||||
**Output of `trivy -v`:**
|
||||
## Output of `trivy -v`:
|
||||
|
||||
```
|
||||
(paste your output here)
|
||||
```
|
||||
|
||||
**Additional details (base image name, container registry info...):**
|
||||
## Additional details (base image name, container registry info...):
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
2
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Feature Request
|
||||
labels: enhancement
|
||||
labels: kind/feature
|
||||
about: I have a suggestion (and might want to implement myself)!
|
||||
---
|
||||
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
vendored
2
.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
vendored
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Support Question
|
||||
labels: question
|
||||
labels: triage/support
|
||||
about: If you have a question about Trivy.
|
||||
---
|
||||
|
||||
|
||||
48
.github/workflows/test.yaml
vendored
Normal file
48
.github/workflows/test.yaml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Test
|
||||
on: pull_request
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
version: v1.31
|
||||
args: --deadline=30m
|
||||
|
||||
integration:
|
||||
name: Integration Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15.x
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run integration tests
|
||||
run: make test-integration
|
||||
|
||||
build-test:
|
||||
name: Build Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15.x
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v1
|
||||
with:
|
||||
version: latest
|
||||
args: release --snapshot --rm-dist --skip-publish
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -18,4 +18,5 @@
|
||||
thumbs.db
|
||||
|
||||
# test fixtures
|
||||
coverage.txt
|
||||
integration/testdata/fixtures/
|
||||
|
||||
71
.golangci.yaml
Normal file
71
.golangci.yaml
Normal file
@@ -0,0 +1,71 @@
|
||||
linters-settings:
|
||||
errcheck:
|
||||
check-type-assertions: true
|
||||
check-blank: true
|
||||
govet:
|
||||
check-shadowing: false
|
||||
gofmt:
|
||||
simplify: false
|
||||
golint:
|
||||
min-confidence: 0
|
||||
gocyclo:
|
||||
min-complexity: 10
|
||||
maligned:
|
||||
suggest-new: true
|
||||
dupl:
|
||||
threshold: 100
|
||||
goconst:
|
||||
min-len: 3
|
||||
min-occurrences: 3
|
||||
misspell:
|
||||
locale: US
|
||||
goimports:
|
||||
local-prefixes: github.com/aquasecurity
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- structcheck
|
||||
- ineffassign
|
||||
- typecheck
|
||||
- govet
|
||||
- errcheck
|
||||
- varcheck
|
||||
- deadcode
|
||||
- golint
|
||||
- gosec
|
||||
- unconvert
|
||||
- goconst
|
||||
- gocyclo
|
||||
- gofmt
|
||||
- goimports
|
||||
- maligned
|
||||
- misspell
|
||||
|
||||
run:
|
||||
skip-files:
|
||||
- ".*._mock.go$"
|
||||
- ".*._test.go$"
|
||||
- "integration/*"
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- gosec
|
||||
text: "G304: Potential file inclusion"
|
||||
- linters:
|
||||
- gosec
|
||||
text: "Deferring unsafe method"
|
||||
- linters:
|
||||
- errcheck
|
||||
text: "Close` is not checked"
|
||||
- linters:
|
||||
- errcheck
|
||||
text: "os.*` is not checked"
|
||||
- linters:
|
||||
- golint
|
||||
text: "a blank import should be only in a main or test package"
|
||||
exclude:
|
||||
- "should have a package comment, unless it's in another file for this package"
|
||||
exclude-use-default: false
|
||||
max-same-issues: 0
|
||||
@@ -1,5 +1,5 @@
|
||||
FROM alpine:3.11
|
||||
RUN apk --no-cache add ca-certificates git rpm
|
||||
FROM alpine:3.12
|
||||
RUN apk --no-cache add ca-certificates git
|
||||
COPY trivy /usr/local/bin/trivy
|
||||
COPY contrib/gitlab.tpl contrib/gitlab.tpl
|
||||
COPY contrib/*.tpl contrib/
|
||||
ENTRYPOINT ["trivy"]
|
||||
|
||||
862
LICENSE
862
LICENSE
@@ -1,661 +1,201 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
17
Makefile
17
Makefile
@@ -12,7 +12,11 @@ $(GOBIN)/wire:
|
||||
|
||||
.PHONY: wire
|
||||
wire: $(GOBIN)/wire
|
||||
wire gen ./...
|
||||
wire gen ./pkg/... ./internal/...
|
||||
|
||||
.PHONY: mock
|
||||
mock: $(GOBIN)/mockery
|
||||
mockery -all -inpkg -case=snake -dir $(DIR)
|
||||
|
||||
.PHONY: deps
|
||||
deps:
|
||||
@@ -24,7 +28,7 @@ $(GOBIN)/golangci-lint:
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
go test -v -short ./...
|
||||
go test -v -short -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
||||
integration/testdata/fixtures/*.tar.gz:
|
||||
git clone https://github.com/aquasecurity/trivy-test-images.git integration/testdata/fixtures
|
||||
@@ -47,7 +51,7 @@ build:
|
||||
|
||||
.PHONY: protoc
|
||||
protoc:
|
||||
protoc --proto_path=$(GOSRC):. --twirp_out=. --go_out=. ./rpc/detector/service.proto
|
||||
find ./rpc/ -name "*.proto" -type f -exec protoc --proto_path=$(GOSRC):. --twirp_out=. --go_out=. {} \;
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
@@ -56,3 +60,10 @@ install:
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf integration/testdata/fixtures/
|
||||
|
||||
$(GOBIN)/labeler:
|
||||
GO111MODULE=off go get github.com/knqyf263/labeler
|
||||
|
||||
.PHONY: label
|
||||
label: $(GOBIN)/labeler
|
||||
labeler apply misc/triage/labels.yaml -r aquasecurity/trivy -l 5
|
||||
|
||||
4
NOTICE
Normal file
4
NOTICE
Normal file
@@ -0,0 +1,4 @@
|
||||
Trivy
|
||||
Copyright 2019-2020 Aqua Security Software Ltd.
|
||||
|
||||
This product includes software developed by Aqua Security (https://aquasec.com).
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM circleci/golang:1.13-buster
|
||||
FROM circleci/golang:1.15-buster
|
||||
|
||||
RUN sudo apt-get -y update \
|
||||
&& sudo apt-get -y install rpm reprepro createrepo
|
||||
&& sudo apt-get -y install rpm reprepro createrepo distro-info
|
||||
|
||||
ARG GORELEASER_VERSION=0.124.1
|
||||
ARG GORELEASER_ARTIFACT=goreleaser_Linux_x86_64.tar.gz
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
RELEASES=(wheezy jessie stretch buster trusty xenial bionic)
|
||||
DEBIAN_RELEASES=$(debian-distro-info --supported)
|
||||
UBUNTU_RELEASES=$(ubuntu-distro-info --supported)
|
||||
|
||||
cd trivy-repo/deb
|
||||
|
||||
for release in ${RELEASES[@]}; do
|
||||
echo "Adding deb package to $release"
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Removing deb package of $release"
|
||||
reprepro -A i386 remove $release trivy
|
||||
reprepro -A amd64 remove $release trivy
|
||||
done
|
||||
|
||||
for release in ${DEBIAN_RELEASES[@]} ${UBUNTU_RELEASES[@]}; do
|
||||
echo "Adding deb package to $release"
|
||||
reprepro includedeb $release ../../dist/*Linux-64bit.deb
|
||||
reprepro includedeb $release ../../dist/*Linux-32bit.deb
|
||||
done
|
||||
|
||||
12
codecov.yml
Normal file
12
codecov.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
informational: true
|
||||
target: auto
|
||||
threshold: 100%
|
||||
patch:
|
||||
default:
|
||||
informational: true
|
||||
target: auto
|
||||
threshold: 100%
|
||||
78
contrib/asff.tpl
Normal file
78
contrib/asff.tpl
Normal file
@@ -0,0 +1,78 @@
|
||||
[
|
||||
{{- $t_first := true -}}
|
||||
{{- range . -}}
|
||||
{{- $target := .Target -}}
|
||||
{{- range .Vulnerabilities -}}
|
||||
{{- if $t_first -}}
|
||||
{{- $t_first = false -}}
|
||||
{{- else -}}
|
||||
,
|
||||
{{- end -}}
|
||||
{{- $trivyProductSev := 0 -}}
|
||||
{{- $trivyNormalizedSev := 0 -}}
|
||||
{{- if eq .Severity "LOW" -}}
|
||||
{{- $trivyProductSev = 1 -}}
|
||||
{{- $trivyNormalizedSev = 10 -}}
|
||||
{{- else if eq .Severity "MEDIUM" -}}
|
||||
{{- $trivyProductSev = 4 -}}
|
||||
{{- $trivyNormalizedSev = 40 -}}
|
||||
{{- else if eq .Severity "HIGH" -}}
|
||||
{{- $trivyProductSev = 7 -}}
|
||||
{{- $trivyNormalizedSev = 70 -}}
|
||||
{{- else if eq .Severity "CRITICAL" -}}
|
||||
{{- $trivyProductSev = 9 -}}
|
||||
{{- $trivyNormalizedSev = 90 -}}
|
||||
{{- end }}
|
||||
{{- $description := .Description -}}
|
||||
{{- if gt (len $description ) 1021 -}}
|
||||
{{- $description = (slice $description 0 1021) | printf "%v .." -}}
|
||||
{{- end}}
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "{{ $target }}/{{ .VulnerabilityID }}",
|
||||
"ProductArn": "arn:aws:securityhub:{{ getEnv "AWS_REGION" }}::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "{{ getEnv "AWS_ACCOUNT_ID" }}",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "{{ getCurrentTime }}",
|
||||
"UpdatedAt": "{{ getCurrentTime }}",
|
||||
"Severity": {
|
||||
"Product": {{ $trivyProductSev }},
|
||||
"Normalized": {{ $trivyNormalizedSev }}
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to {{ .VulnerabilityID }} in container {{ $target }}",
|
||||
"Description": {{ escapeString $description | printf "%q" }},
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "{{ .PrimaryURL }}"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "{{ $target }}",
|
||||
"Partition": "aws",
|
||||
"Region": "{{ getEnv "AWS_REGION" }}",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "{{ $target }}" },
|
||||
"Other": {
|
||||
"CVE ID": "{{ .VulnerabilityID }}",
|
||||
"CVE Title": {{ .Title | printf "%q" }},
|
||||
"PkgName": "{{ .PkgName }}",
|
||||
"Installed Package": "{{ .InstalledVersion }}",
|
||||
"Patched Package": "{{ .FixedVersion }}",
|
||||
"NvdCvssScoreV3": "{{ (index .CVSS "nvd").V3Score }}",
|
||||
"NvdCvssVectorV3": "{{ (index .CVSS "nvd").V3Vector }}",
|
||||
"NvdCvssScoreV2": "{{ (index .CVSS "nvd").V2Score }}",
|
||||
"NvdCvssVectorV2": "{{ (index .CVSS "nvd").V2Vector }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
]
|
||||
94
contrib/example_policy/advanced.rego
Normal file
94
contrib/example_policy/advanced.rego
Normal file
@@ -0,0 +1,94 @@
|
||||
package trivy
|
||||
|
||||
import data.lib.trivy
|
||||
|
||||
default ignore = false
|
||||
|
||||
nvd_v3_vector = v {
|
||||
v := input.CVSS.nvd.v3
|
||||
}
|
||||
|
||||
# Ignore a vulnerability which requires high privilege
|
||||
ignore {
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
cvss_vector.PrivilegesRequired == "High"
|
||||
}
|
||||
|
||||
# Ignore a vulnerability which requires user interaction
|
||||
ignore {
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
cvss_vector.UserInteraction == "Required"
|
||||
}
|
||||
|
||||
ignore {
|
||||
input.PkgName == "openssl"
|
||||
|
||||
# Split CVSSv3 vector
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
|
||||
# Evaluate Attack Vector
|
||||
ignore_attack_vectors := {"Physical", "Local"}
|
||||
cvss_vector.AttackVector == ignore_attack_vectors[_]
|
||||
}
|
||||
|
||||
ignore {
|
||||
input.PkgName == "openssl"
|
||||
|
||||
# Evaluate severity
|
||||
input.Severity == {"LOW", "MEDIUM", "HIGH"}[_]
|
||||
|
||||
# Evaluate CWE-ID
|
||||
deny_cwe_ids := {
|
||||
"CWE-119", # Improper Restriction of Operations within the Bounds of a Memory Buffer
|
||||
"CWE-200", # Exposure of Sensitive Information to an Unauthorized Actor
|
||||
}
|
||||
|
||||
count({x | x := input.CweIDs[_]; x == deny_cwe_ids[_]}) == 0
|
||||
}
|
||||
|
||||
ignore {
|
||||
input.PkgName == "bash"
|
||||
|
||||
# Split CVSSv3 vector
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
|
||||
# Evaluate Attack Vector
|
||||
ignore_attack_vectors := {"Physical", "Local", "Adjacent"}
|
||||
cvss_vector.AttackVector == ignore_attack_vectors[_]
|
||||
|
||||
# Evaluate severity
|
||||
input.Severity == {"LOW", "MEDIUM", "HIGH"}[_]
|
||||
}
|
||||
|
||||
ignore {
|
||||
input.PkgName == "django"
|
||||
|
||||
# Split CVSSv3 vector
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
|
||||
# Evaluate Attack Vector
|
||||
ignore_attack_vectors := {"Physical", "Local"}
|
||||
cvss_vector.AttackVector == ignore_attack_vectors[_]
|
||||
|
||||
# Evaluate severity
|
||||
input.Severity == {"LOW", "MEDIUM"}[_]
|
||||
|
||||
# Evaluate CWE-ID
|
||||
deny_cwe_ids := {
|
||||
"CWE-89", # SQL Injection
|
||||
"CWE-78", # OS Command Injection
|
||||
}
|
||||
|
||||
count({x | x := input.CweIDs[_]; x == deny_cwe_ids[_]}) == 0
|
||||
}
|
||||
|
||||
ignore {
|
||||
input.PkgName == "jquery"
|
||||
|
||||
# Split CVSSv3 vector
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
|
||||
# Evaluate CWE-ID
|
||||
deny_cwe_ids := {"CWE-79"} # XSS
|
||||
count({x | x := input.CweIDs[_]; x == deny_cwe_ids[_]}) == 0
|
||||
}
|
||||
45
contrib/example_policy/basic.rego
Normal file
45
contrib/example_policy/basic.rego
Normal file
@@ -0,0 +1,45 @@
|
||||
package trivy
|
||||
|
||||
import data.lib.trivy
|
||||
|
||||
default ignore = false
|
||||
|
||||
ignore_pkgs := {"bash", "bind-license", "rpm", "vim", "vim-minimal"}
|
||||
|
||||
ignore_severities := {"LOW", "MEDIUM"}
|
||||
|
||||
nvd_v3_vector = v {
|
||||
v := input.CVSS.nvd.v3
|
||||
}
|
||||
|
||||
ignore {
|
||||
input.PkgName == ignore_pkgs[_]
|
||||
}
|
||||
|
||||
ignore {
|
||||
input.Severity == ignore_severities[_]
|
||||
}
|
||||
|
||||
# Ignore a vulnerability which is not remotely exploitable
|
||||
ignore {
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
cvss_vector.AttackVector != "Network"
|
||||
}
|
||||
|
||||
# Ignore a vulnerability which requires high privilege
|
||||
ignore {
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
cvss_vector.PrivilegesRequired == "High"
|
||||
}
|
||||
|
||||
# Ignore a vulnerability which requires user interaction
|
||||
ignore {
|
||||
cvss_vector := trivy.parse_cvss_vector_v3(nvd_v3_vector)
|
||||
cvss_vector.UserInteraction == "Required"
|
||||
}
|
||||
|
||||
# Ignore CSRF
|
||||
ignore {
|
||||
# https://cwe.mitre.org/data/definitions/352.html
|
||||
input.CweIDs[_] == "CWE-352"
|
||||
}
|
||||
@@ -2,19 +2,21 @@
|
||||
{
|
||||
"version": "2.3",
|
||||
"vulnerabilities": [
|
||||
{{- $first := true }}
|
||||
{{- $t_first := true }}
|
||||
{{- range . }}
|
||||
{{- $target := .Target }}
|
||||
{{- range .Vulnerabilities -}}
|
||||
{{- if $first -}}
|
||||
{{- $first = false -}}
|
||||
{{- if $t_first -}}
|
||||
{{- $t_first = false -}}
|
||||
{{ else -}}
|
||||
,
|
||||
{{- end }}
|
||||
{
|
||||
"id": "{{ .VulnerabilityID }}",
|
||||
"category": "container_scanning",
|
||||
"message": {{ .Title | printf "%q" }},
|
||||
"description": {{ .Description | printf "%q" }},
|
||||
{{- /* cve is a deprecated key, use id instead */}}
|
||||
"cve": "{{ .VulnerabilityID }}",
|
||||
"severity": {{ if eq .Severity "UNKNOWN" -}}
|
||||
"Unknown"
|
||||
@@ -29,6 +31,7 @@
|
||||
{{- else -}}
|
||||
"{{ .Severity }}"
|
||||
{{- end }},
|
||||
{{- /* TODO: Define confidence */}}
|
||||
"confidence": "Unknown",
|
||||
"solution": {{ if .FixedVersion -}}
|
||||
"Upgrade {{ .PkgName }} to {{ .FixedVersion }}"
|
||||
@@ -56,14 +59,14 @@
|
||||
"type": "cve",
|
||||
"name": "{{ .VulnerabilityID }}",
|
||||
"value": "{{ .VulnerabilityID }}",
|
||||
"url": ""
|
||||
"url": "{{ .PrimaryURL }}"
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{{- $first := true -}}
|
||||
{{- $l_first := true -}}
|
||||
{{- range .References -}}
|
||||
{{- if $first -}}
|
||||
{{- $first = false }}
|
||||
{{- if $l_first -}}
|
||||
{{- $l_first = false }}
|
||||
{{- else -}}
|
||||
,
|
||||
{{- end -}}
|
||||
|
||||
@@ -72,6 +72,7 @@ get_binaries() {
|
||||
freebsd/armv7) BINARIES="trivy" ;;
|
||||
linux/386) BINARIES="trivy" ;;
|
||||
linux/amd64) BINARIES="trivy" ;;
|
||||
linux/ppc64le) BINARIES="trivy" ;;
|
||||
linux/arm64) BINARIES="trivy" ;;
|
||||
linux/armv7) BINARIES="trivy" ;;
|
||||
openbsd/386) BINARIES="trivy" ;;
|
||||
@@ -110,6 +111,7 @@ adjust_os() {
|
||||
amd64) OS=64bit ;;
|
||||
arm) OS=ARM ;;
|
||||
arm64) OS=ARM64 ;;
|
||||
ppc64le) OS=PPC64LE ;;
|
||||
darwin) OS=macOS ;;
|
||||
dragonfly) OS=DragonFlyBSD ;;
|
||||
freebsd) OS=FreeBSD ;;
|
||||
@@ -126,6 +128,7 @@ adjust_arch() {
|
||||
amd64) ARCH=64bit ;;
|
||||
arm) ARCH=ARM ;;
|
||||
arm64) ARCH=ARM64 ;;
|
||||
ppc64le) OS=PPC64LE ;;
|
||||
darwin) ARCH=macOS ;;
|
||||
dragonfly) ARCH=DragonFlyBSD ;;
|
||||
freebsd) ARCH=FreeBSD ;;
|
||||
@@ -209,6 +212,7 @@ uname_arch() {
|
||||
x86) arch="386" ;;
|
||||
i686) arch="386" ;;
|
||||
i386) arch="386" ;;
|
||||
ppc64le) arch="ppc64le" ;;
|
||||
aarch64) arch="arm64" ;;
|
||||
armv5*) arch="armv5" ;;
|
||||
armv6*) arch="armv6" ;;
|
||||
|
||||
18
contrib/junit.tpl
Normal file
18
contrib/junit.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" ?>
|
||||
<testsuites>
|
||||
{{- range . -}}
|
||||
{{- $failures := len .Vulnerabilities }}
|
||||
<testsuite tests="1" failures="{{ $failures }}" time="" name="{{ .Target }}">
|
||||
{{- if not (eq .Type "") }}
|
||||
<properties>
|
||||
<property name="type" value="{{ .Type }}"></property>
|
||||
</properties>
|
||||
{{- end -}}
|
||||
{{ range .Vulnerabilities }}
|
||||
<testcase classname="{{ .PkgName }}-{{ .InstalledVersion }}" name="[{{ .Vulnerability.Severity }}] {{ .VulnerabilityID }}" time="">
|
||||
<failure message={{escapeXML .Title | printf "%q" }} type="description">{{escapeXML .Description | printf "%q" }}</failure>
|
||||
</testcase>
|
||||
{{- end }}
|
||||
</testsuite>
|
||||
{{- end }}
|
||||
</testsuites>
|
||||
81
contrib/sarif.tpl
Normal file
81
contrib/sarif.tpl
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.4.json",
|
||||
"version": "2.1.0",
|
||||
"runs": [
|
||||
{
|
||||
"tool": {
|
||||
"driver": {
|
||||
"name": "Trivy",
|
||||
"fullName": "Trivy Vulnerability Scanner",
|
||||
"rules": [
|
||||
{{- $t_first := true }}
|
||||
{{- range . }}
|
||||
{{- range .Vulnerabilities -}}
|
||||
{{- if $t_first -}}
|
||||
{{- $t_first = false -}}
|
||||
{{ else -}}
|
||||
,
|
||||
{{- end }}
|
||||
{
|
||||
"id": "[{{ .Vulnerability.Severity }}] {{ .VulnerabilityID }}",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": {{ printf "%v Package: %v" .VulnerabilityID .PkgName | printf "%q" }}
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": {{ endWithPeriod (escapeString .Title) | printf "%q" }}
|
||||
},
|
||||
"help": {
|
||||
"text": {{ printf "Vulnerability %v\nSeverity: %v\nPackage: %v\nInstalled Version: %v\nFixed Version: %v\nLink: [%v](%v)" .VulnerabilityID .Vulnerability.Severity .PkgName .InstalledVersion .FixedVersion .VulnerabilityID .PrimaryURL | printf "%q"}},
|
||||
"markdown": {{ printf "**Vulnerability %v**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|%v|%v|%v|%v|[%v](%v)|\n" .VulnerabilityID .Vulnerability.Severity .PkgName .InstalledVersion .FixedVersion .VulnerabilityID .PrimaryURL | printf "%q"}}
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"{{ .Vulnerability.Severity }}",
|
||||
{{ .PkgName | printf "%q" }}
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{{- $t_first := true }}
|
||||
{{- range . }}
|
||||
{{- range $index, $vulnerability := .Vulnerabilities -}}
|
||||
{{- if $t_first -}}
|
||||
{{- $t_first = false -}}
|
||||
{{ else -}}
|
||||
,
|
||||
{{- end }}
|
||||
{
|
||||
"ruleId": "[{{ $vulnerability.Vulnerability.Severity }}] {{ $vulnerability.VulnerabilityID }}",
|
||||
"ruleIndex": {{ $index }},
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": {{ endWithPeriod (escapeString $vulnerability.Description) | printf "%q" }}
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
],
|
||||
"columnKind": "utf16CodeUnits"
|
||||
}
|
||||
]
|
||||
}
|
||||
55
docs/air-gap.md
Normal file
55
docs/air-gap.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Air-gapped environment
|
||||
Trivy can be used in air-gapped environments.
|
||||
|
||||
## Download the vulnerability database
|
||||
At first, you need to download the vulnerability database for use in air-gapped environments.
|
||||
Go to [trivy-db](https://github.com/aquasecurity/trivy-db/releases) and download `trivy-offline.db.tgz` in the latest release.
|
||||
If you download `trivy-light-offline.db.tgz`, you have to run Trivy with `--light` option.
|
||||
|
||||
```
|
||||
$ wget https://github.com/aquasecurity/trivy-db/releases/latest/download/trivy-offline.db.tgz
|
||||
```
|
||||
|
||||
|
||||
## Transfer the DB file into the air-gapped environment
|
||||
The way of transfer depends on the environment.
|
||||
|
||||
```
|
||||
$ rsync -av -e ssh /path/to/trivy-offline.db.tgz [user]@[host]:dst
|
||||
```
|
||||
|
||||
## Put the DB file in Trivy's cache directory
|
||||
You have to know where to put the DB file. The following command shows the default cache directory.
|
||||
|
||||
```
|
||||
$ ssh user@host
|
||||
$ trivy -h | grep cache
|
||||
--cache-dir value cache directory (default: "/home/myuser/.cache/trivy") [$TRIVY_CACHE_DIR]
|
||||
```
|
||||
|
||||
Put the DB file in the cache directory + `/db`.
|
||||
|
||||
```
|
||||
$ mkdir -p /home/myuser/.cache/trivy/db
|
||||
$ cd /home/myuser/.cache/trivy/db
|
||||
$ mv /path/to/trivy-offline.db.tgz .
|
||||
```
|
||||
|
||||
Then, decompress it.
|
||||
`trivy-offline.db.tgz` file includes two files, `trivy.db` and `metadata.json`.
|
||||
|
||||
```
|
||||
$ tar xvf trivy-offline.db.tgz
|
||||
x trivy.db
|
||||
x metadata.json
|
||||
$ rm trivy-offline.db.tgz
|
||||
```
|
||||
|
||||
In an air-gapped environment it is your responsibility to update the Trivy database on a regular basis, so that the scanner can detect recently-identified vulnerabilities.
|
||||
|
||||
## Run Trivy with --skip-update option
|
||||
In an air-gapped environment, specify `--skip-update` so that Trivy doesn't attempt to download the latest database file.
|
||||
|
||||
```
|
||||
$ trivy image --skip-update alpine:3.12
|
||||
```
|
||||
78
docs/contrib/help-wanted.md
Normal file
78
docs/contrib/help-wanted.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# Overview
|
||||
|
||||
We use two labels [help wanted](#help-wanted) and [good first
|
||||
issue](#good-first-issue) to identify issues that have been specially groomed
|
||||
for new contributors. The `good first issue` label is a subset of `help wanted`
|
||||
label, indicating that members have committed to providing extra assistance for
|
||||
new contributors. All `good first issue` items also have the `help wanted`
|
||||
label.
|
||||
|
||||
## Help Wanted
|
||||
|
||||
Items marked with the `help wanted` label need to ensure that they are:
|
||||
|
||||
- **Low Barrier to Entry**
|
||||
|
||||
It should be tractable for new contributors. Documentation on how that type of
|
||||
change should be made should already exist.
|
||||
|
||||
- **Clear Task**
|
||||
|
||||
The task is agreed upon and does not require further discussions in the
|
||||
community. Call out if that area of code is untested and requires new
|
||||
fixtures.
|
||||
|
||||
API / CLI behavior is decided and included in the OP issue, for example: "The
|
||||
new command syntax is `trivy --format yaml IMAGE_NAME`"_ with
|
||||
expected validations called out.
|
||||
|
||||
- **Goldilocks priority**
|
||||
|
||||
Not too high that a core contributor should do it, but not too low that it
|
||||
isn't useful enough for a core contributor to spend time to review it, answer
|
||||
questions, help get it into a release, etc.
|
||||
|
||||
- **Up-To-Date**
|
||||
|
||||
Often these issues become obsolete and have already been done, are no longer
|
||||
desired, no longer make sense, have changed priority or difficulty , etc.
|
||||
|
||||
|
||||
## Good First Issue
|
||||
|
||||
Items marked with the `good first issue` label are intended for _first-time
|
||||
contributors_. It indicates that members will keep an eye out for these pull
|
||||
requests and shepherd it through our processes.
|
||||
|
||||
These items need to ensure that they follow the guidelines for `help wanted`
|
||||
labels (above) in addition to meeting the following criteria:
|
||||
|
||||
- **No Barrier to Entry**
|
||||
|
||||
The task is something that a new contributor can tackle without advanced
|
||||
setup, or domain knowledge.
|
||||
|
||||
- **Solution Explained**
|
||||
|
||||
The recommended solution is clearly described in the issue.
|
||||
|
||||
- **Provides Context**
|
||||
|
||||
If background knowledge is required, this should be explicitly mentioned and a
|
||||
list of suggested readings included.
|
||||
|
||||
- **Gives Examples**
|
||||
|
||||
Link to examples of similar implementations so new contributors have a
|
||||
reference guide for their changes.
|
||||
|
||||
- **Identifies Relevant Code**
|
||||
|
||||
The relevant code and tests to be changed should be linked in the issue.
|
||||
|
||||
- **Ready to Test**
|
||||
|
||||
There should be existing tests that can be modified, or existing test cases
|
||||
fit to be copied. If the area of code doesn't have tests, before labeling the
|
||||
issue, add a test fixture. This prep often makes a great `help wanted` task!
|
||||
|
||||
195
docs/contrib/triage.md
Normal file
195
docs/contrib/triage.md
Normal file
@@ -0,0 +1,195 @@
|
||||
Triage is an important part of maintaining the health of the trivy repo.
|
||||
A well organized repo allows maintainers to prioritize feature requests, fix bugs, and respond to users facing difficulty with the tool as quickly as possible.
|
||||
|
||||
Triage includes:
|
||||
- Labeling issues
|
||||
- Responding to issues
|
||||
- Closing issues
|
||||
|
||||
# Daily Triage
|
||||
Daily triage has two goals:
|
||||
|
||||
1. Responsiveness for new issues
|
||||
1. Responsiveness when explicitly requested information was provided
|
||||
|
||||
It covers:
|
||||
|
||||
1. Issues without a `kind/` or `triage/` label
|
||||
1. Issues without a `priority/` label
|
||||
1. `triage/needs-information` issues which the user has followed up on, and now require a response.
|
||||
|
||||
## Categorization
|
||||
|
||||
The most important level of categorizing the issue is defining what type it is.
|
||||
We typically want at least one of the following labels on every issue, and some issues may fall into multiple categories:
|
||||
|
||||
- `triage/support` - The default for most incoming issues
|
||||
- `kind/bug` - When it’s a bug or we aren’t delivering the best user experience
|
||||
|
||||
Other possibilities:
|
||||
- `kind/feature`- Identify new feature requests
|
||||
- `kind/testing` - Update or fix unit/integration tests
|
||||
- `kind/cleanup` - Cleaning up/refactoring the codebase
|
||||
- `kind/documentation` - Updates or additions to trivy documentation
|
||||
|
||||
If the issue is specific to a driver for OS packages or libraries:
|
||||
|
||||
**co/[driver for OS packages]**
|
||||
|
||||
- `co/alpine`
|
||||
- `co/amazon`
|
||||
- `co/debian`
|
||||
- `co/oracle`
|
||||
- `co/photon`
|
||||
- `co/redhat`
|
||||
- `co/suse`
|
||||
- `co/ubuntu`
|
||||
|
||||
**co/[driver for libraries of programming languages]**
|
||||
|
||||
- `co/bundler`
|
||||
- `co/cargo`
|
||||
- `co/composer`
|
||||
- `co/npm`
|
||||
- `co/yarn`
|
||||
- `co/pipenv`
|
||||
- `co/poetry`
|
||||
|
||||
|
||||
**Help wanted?**
|
||||
|
||||
`Good First Issue` - bug has a proposed solution, can be implemented w/o further discussion.
|
||||
|
||||
`Help wanted` - if the bug could use help from a contributor
|
||||
|
||||
|
||||
## Prioritization
|
||||
If the issue is not `triage/support`, it needs a priority label.
|
||||
|
||||
`priority/critical-urgent` - someones top priority ASAP, such as security issue, user-visible bug, or build breakage. Rarely used.
|
||||
|
||||
`priority/important-soon`: in time for the next two releases. It should be attached to a milestone.
|
||||
|
||||
`priority/important-longterm`: 2-4 releases from now
|
||||
|
||||
`priority/backlog`: agreed that this would be good to have, but no one is available at the moment. Consider tagging as `help wanted`
|
||||
|
||||
`priority/awaiting-more-evidence`: may be useful, but there is not yet enough support.
|
||||
|
||||
|
||||
# Weekly Triage
|
||||
|
||||
Weekly triage has three goals:
|
||||
|
||||
1. Catching up on unresponded issues
|
||||
1. Reviewing and closing PR’s
|
||||
1. Closing stale issues
|
||||
|
||||
|
||||
## Post-Release Triage
|
||||
|
||||
Post-release triage occurs after a major release (around every 4-6 weeks).
|
||||
It focuses on:
|
||||
|
||||
1. Closing bugs that have been resolved by the release
|
||||
1. Reprioritizing bugs that have not been resolved by the release
|
||||
1. Letting users know if we believe that there is still an issue
|
||||
|
||||
This includes reviewing:
|
||||
|
||||
1. Every issue that hasn’t been touched in the last 2 days
|
||||
1. Re-evaluation of long-term issues
|
||||
1. Re-evaluation of short-term issues
|
||||
|
||||
|
||||
## Responding to Issues
|
||||
|
||||
### Needs More Information
|
||||
A sample response to ask for more info:
|
||||
|
||||
> I don’t yet have a clear way to replicate this issue. Do you mind adding some additional details. Here is additional information that would be helpful:
|
||||
>
|
||||
> \* The exact `trivy` command line used
|
||||
>
|
||||
> \* The exact image you want to scan
|
||||
>
|
||||
> \* The full output of the `trivy` command, preferably with `--debug` for extra logging.
|
||||
>
|
||||
>
|
||||
> Thank you for sharing your experience!
|
||||
|
||||
|
||||
Then: Label with `triage/needs-information`.
|
||||
|
||||
### Issue might be resolved
|
||||
If you think a release may have resolved an issue, ask the author to see if their issue has been resolved:
|
||||
|
||||
> Could you please check to see if trivy <x> addresses this issue? We've made some changes with how this is handled, and improved the trivy logs output to help us debug tricky cases like this.
|
||||
|
||||
Then: Label with `triage/needs-information`.
|
||||
|
||||
|
||||
## Closing with Care
|
||||
|
||||
Issues typically need to be closed for the following reasons:
|
||||
|
||||
- The issue has been addressed
|
||||
- The issue is a duplicate of an existing issue
|
||||
- There has been a lack of information over a long period of time
|
||||
|
||||
In any of these situations, we aim to be kind when closing the issue, and offer the author action items should they need to reopen their issue or still require a solution.
|
||||
|
||||
Samples responses for these situations include:
|
||||
|
||||
### Issue has been addressed
|
||||
|
||||
>@author: I believe this issue is now addressed by trivy v1.0.0, as it <reason>. If you still see this issue with trivy v1.0 or higher, please reopen this issue.
|
||||
>
|
||||
>Thank you for reporting this issue!
|
||||
|
||||
Then: Close the issue
|
||||
|
||||
### Duplicate Issue
|
||||
|
||||
>This issue appears to be a duplicate of #X, do you mind if we move the conversation there?
|
||||
>
|
||||
>This way we can centralize the content relating to the issue. If you feel that this issue is not in fact a duplicate, please re-open it. If you have additional information to share, please add it to the new issue.
|
||||
>
|
||||
>Thank you for reporting this!
|
||||
|
||||
Then: Label with `triage/duplicate` and close the issue.
|
||||
|
||||
### Lack of Information
|
||||
If an issue hasn't been active for more than four weeks, and the author has been pinged at least once, then the issue can be closed.
|
||||
|
||||
>Hey @author -- hopefully it's OK if I close this - there wasn't enough information to make it actionable, and some time has already passed. If you are able to provide additional details, you may reopen it at any point.
|
||||
>
|
||||
>Here is additional information that may be helpful to us:
|
||||
>
|
||||
>\* Whether the issue occurs with the latest trivy release
|
||||
>
|
||||
>\* The exact `trivy` command line used
|
||||
>
|
||||
>\* The exact image you want to scan
|
||||
>
|
||||
>\* The full output of the `trivy` command, preferably with `--debug` for extra logging.
|
||||
>
|
||||
>
|
||||
>Thank you for sharing your experience!
|
||||
|
||||
Then: Close the issue.
|
||||
|
||||
## Help Wanted issues
|
||||
|
||||
We use two labels [help wanted](https://github.com/aquasecurity/trivy/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
|
||||
and [good first issue](https://github.com/aquasecurity/trivy/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
|
||||
to identify issues that have been specially groomed for new contributors.
|
||||
|
||||
We have specific [guidelines](/docs/contrib/help-wanted.md)
|
||||
for how to use these labels. If you see an issue that satisfies these
|
||||
guidelines, you can add the `help wanted` label and the `good first issue` label.
|
||||
Please note that adding the `good first issue` label must also
|
||||
add the `help wanted` label.
|
||||
|
||||
If an issue has these labels but does not satisfy the guidelines, please
|
||||
ask for more details to be added to the issue or remove the labels.
|
||||
29
docs/integration/security-hub.md
Normal file
29
docs/integration/security-hub.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# AWS Security Hub
|
||||
|
||||
## Upload findings to Security Hub
|
||||
|
||||
In the following example using the template `asff.tpl`, [ASFF](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-findings-format.html) file can be generated.
|
||||
|
||||
```
|
||||
$ AWS_REGION=us-west-1 AWS_ACCOUNT_ID=123456789012 trivy image --format template --template "@contrib/asff.tpl" -o report.asff golang:1.12-alpine
|
||||
```
|
||||
|
||||
ASFF template needs AWS_REGION and AWS_ACCOUNT_ID from environment variables.
|
||||
|
||||
Then, you can upload it with AWS CLI.
|
||||
|
||||
```
|
||||
$ aws securityhub batch-import-findings --findings file://report.asff
|
||||
```
|
||||
|
||||
## Customize
|
||||
You can customize [asff.tpl](../../contrib/asff.tpl).
|
||||
|
||||
```
|
||||
$ export AWS_REGION=us-west-1
|
||||
$ export AWS_ACCOUNT_ID=123456789012
|
||||
$ trivy image --format template --template "@your-asff.tpl" -o report.asff golang:1.12-alpine
|
||||
```
|
||||
|
||||
## Reference
|
||||
https://aws.amazon.com/blogs/security/how-to-build-ci-cd-pipeline-container-vulnerability-scanning-trivy-and-aws-security-hub/
|
||||
42
go.mod
42
go.mod
@@ -1,39 +1,39 @@
|
||||
module github.com/aquasecurity/trivy
|
||||
|
||||
go 1.13
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect
|
||||
github.com/aquasecurity/fanal v0.0.0-20200112144021-9a35ce3bd793
|
||||
github.com/aquasecurity/go-dep-parser v0.0.0-20190819075924-ea223f0ef24b
|
||||
github.com/aquasecurity/trivy-db v0.0.0-20191226181755-d6cabf5bc5d1
|
||||
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986
|
||||
github.com/aquasecurity/fanal v0.0.0-20201129085323-d57dde147ddc
|
||||
github.com/aquasecurity/go-dep-parser v0.0.0-20201028043324-889d4a92b8e0
|
||||
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce
|
||||
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798
|
||||
github.com/aquasecurity/go-version v0.0.0-20201115065329-578079e4ab05
|
||||
github.com/aquasecurity/trivy-db v0.0.0-20201117092632-b09c30858fc2
|
||||
github.com/caarlos0/env/v6 v6.0.0
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/cheggaaa/pb/v3 v3.0.3
|
||||
github.com/docker/docker v0.0.0-20180924202107-a9c061deec0f
|
||||
github.com/genuinetools/reg v0.16.0
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d // indirect
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/golang/protobuf v1.4.2
|
||||
github.com/google/go-containerregistry v0.0.0-20200331213917-3d03ed9b1ca2
|
||||
github.com/google/go-github/v28 v28.1.1
|
||||
github.com/google/wire v0.3.0
|
||||
github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f
|
||||
github.com/knqyf263/go-deb-version v0.0.0-20190517075300-09fca494f03d
|
||||
github.com/knqyf263/go-rpm-version v0.0.0-20170716094938-74609b86c936
|
||||
github.com/knqyf263/go-version v1.1.1
|
||||
github.com/kylelemons/godebug v1.1.0
|
||||
github.com/olekukonko/tablewriter v0.0.2-0.20190607075207-195002e6e56a
|
||||
github.com/prometheus/procfs v0.0.5 // indirect
|
||||
github.com/stretchr/testify v1.4.0
|
||||
github.com/open-policy-agent/opa v0.21.1
|
||||
github.com/spf13/afero v1.2.2
|
||||
github.com/stretchr/testify v1.6.1
|
||||
github.com/testcontainers/testcontainers-go v0.3.1
|
||||
github.com/twitchtv/twirp v5.10.1+incompatible
|
||||
github.com/urfave/cli v1.20.0
|
||||
github.com/urfave/cli/v2 v2.3.0
|
||||
go.uber.org/atomic v1.5.1 // indirect
|
||||
go.uber.org/multierr v1.4.0 // indirect
|
||||
go.uber.org/zap v1.13.0
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
|
||||
golang.org/x/tools v0.0.0-20191121040551-947d4aa89328 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898
|
||||
gopkg.in/yaml.v2 v2.2.4 // indirect
|
||||
k8s.io/utils v0.0.0-20191010214722-8d271d903fe4
|
||||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
|
||||
k8s.io/utils v0.0.0-20201005171033-6301aaf42dc7
|
||||
)
|
||||
|
||||
replace github.com/genuinetools/reg => github.com/tomoyamachi/reg v0.16.1-0.20190706172545-2a2250fd7c00
|
||||
|
||||
@@ -3,7 +3,7 @@ builds:
|
||||
-
|
||||
main: cmd/trivy/main.go
|
||||
binary: trivy
|
||||
ldflags:
|
||||
ldflags:
|
||||
- -s -w
|
||||
- "-extldflags '-static'"
|
||||
- -X main.version={{.Version}}
|
||||
@@ -19,27 +19,30 @@ builds:
|
||||
- 386
|
||||
- arm
|
||||
- arm64
|
||||
- ppc64le
|
||||
goarm:
|
||||
- 7
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: 386
|
||||
|
||||
nfpms:
|
||||
-
|
||||
formats:
|
||||
- deb
|
||||
- rpm
|
||||
dependencies:
|
||||
- rpm
|
||||
vendor: "aquasecurity"
|
||||
homepage: "https://github.com/aquasecurity"
|
||||
maintainer: "Teppei Fukuda <knqyf263@gmail.com>"
|
||||
description: "A Fast Vulnerability Scanner for Containers"
|
||||
license: "AGPL-3.0"
|
||||
license: "Apache-2.0"
|
||||
file_name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
|
||||
replacements:
|
||||
amd64: 64bit
|
||||
386: 32bit
|
||||
arm: ARM
|
||||
arm64: ARM64
|
||||
ppc64le: PPC64LE
|
||||
darwin: macOS
|
||||
linux: Linux
|
||||
openbsd: OpenBSD
|
||||
@@ -56,6 +59,7 @@ archives:
|
||||
386: 32bit
|
||||
arm: ARM
|
||||
arm64: ARM64
|
||||
ppc64le: PPC64LE
|
||||
darwin: macOS
|
||||
linux: Linux
|
||||
openbsd: OpenBSD
|
||||
@@ -65,15 +69,14 @@ archives:
|
||||
files:
|
||||
- README.md
|
||||
- LICENSE
|
||||
- contrib/gitlab.tpl
|
||||
- contrib/*.tpl
|
||||
|
||||
|
||||
brews:
|
||||
-
|
||||
github:
|
||||
owner: aquasecurity
|
||||
name: homebrew-trivy
|
||||
dependencies:
|
||||
- rpm
|
||||
homepage: "https://github.com/aquasecurity/trivy"
|
||||
description: ""
|
||||
test: |
|
||||
@@ -83,6 +86,8 @@ dockers:
|
||||
- image_templates:
|
||||
- "docker.io/aquasec/trivy:{{ .Version }}"
|
||||
- "docker.io/aquasec/trivy:latest"
|
||||
- "ghcr.io/aquasecurity/trivy:{{ .Version }}"
|
||||
- "ghcr.io/aquasecurity/trivy:latest"
|
||||
binaries:
|
||||
- trivy
|
||||
build_flag_templates:
|
||||
@@ -95,4 +100,5 @@ dockers:
|
||||
- "--label=org.label-schema.vcs=https://github.com/aquasecurity/trivy"
|
||||
- "--label=org.label-schema.vcs-ref={{ .FullCommit }}"
|
||||
extra_files:
|
||||
- contrib/gitlab.tpl
|
||||
- contrib/
|
||||
|
||||
|
||||
BIN
imgs/logo.png
BIN
imgs/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 8.7 KiB |
BIN
imgs/usage.gif
BIN
imgs/usage.gif
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 3.6 MiB |
@@ -12,24 +12,27 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aquasecurity/trivy/internal"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/aquasecurity/trivy/internal"
|
||||
"github.com/aquasecurity/trivy/pkg/report"
|
||||
)
|
||||
|
||||
type args struct {
|
||||
Format string
|
||||
TemplatePath string
|
||||
Version string
|
||||
IgnoreUnfixed bool
|
||||
Severity []string
|
||||
IgnoreIDs []string
|
||||
Input string
|
||||
ClientToken string
|
||||
ClientTokenHeader string
|
||||
}
|
||||
|
||||
func TestClientServer(t *testing.T) {
|
||||
type args struct {
|
||||
Version string
|
||||
IgnoreUnfixed bool
|
||||
Severity []string
|
||||
IgnoreIDs []string
|
||||
Input string
|
||||
ClientToken string
|
||||
ClientTokenHeader string
|
||||
ServerToken string
|
||||
ServerTokenHeader string
|
||||
}
|
||||
cases := []struct {
|
||||
name string
|
||||
testArgs args
|
||||
@@ -44,18 +47,6 @@ func TestClientServer(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/alpine-310.json.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 integration with token",
|
||||
testArgs: args{
|
||||
Version: "dev",
|
||||
Input: "testdata/fixtures/alpine-310.tar.gz",
|
||||
ClientToken: "token",
|
||||
ClientTokenHeader: "Trivy-Token",
|
||||
ServerToken: "token",
|
||||
ServerTokenHeader: "Trivy-Token",
|
||||
},
|
||||
golden: "testdata/alpine-310.json.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 integration with --ignore-unfixed option",
|
||||
testArgs: args{
|
||||
@@ -85,6 +76,26 @@ func TestClientServer(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/alpine-310-ignore-cveids.json.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 integration with gitlab template",
|
||||
testArgs: args{
|
||||
Format: "template",
|
||||
TemplatePath: "@../contrib/gitlab.tpl",
|
||||
Version: "dev",
|
||||
Input: "testdata/fixtures/alpine-310.tar.gz",
|
||||
},
|
||||
golden: "testdata/alpine-310.gitlab.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 integration with sarif template",
|
||||
testArgs: args{
|
||||
Format: "template",
|
||||
TemplatePath: "@../contrib/sarif.tpl",
|
||||
Version: "dev",
|
||||
Input: "testdata/fixtures/alpine-310.tar.gz",
|
||||
},
|
||||
golden: "testdata/alpine-310.sarif.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.9 integration",
|
||||
testArgs: args{
|
||||
@@ -160,16 +171,6 @@ func TestClientServer(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/centos-7-ignore-unfixed.json.golden",
|
||||
},
|
||||
{
|
||||
name: "centos 7 integration with critical severity",
|
||||
testArgs: args{
|
||||
Version: "dev",
|
||||
IgnoreUnfixed: true,
|
||||
Severity: []string{"CRITICAL"},
|
||||
Input: "testdata/fixtures/centos-7.tar.gz",
|
||||
},
|
||||
golden: "testdata/centos-7-critical.json.golden",
|
||||
},
|
||||
{
|
||||
name: "centos 7 integration with low and high severity",
|
||||
testArgs: args{
|
||||
@@ -301,6 +302,64 @@ func TestClientServer(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/photon-30.json.golden",
|
||||
},
|
||||
{
|
||||
name: "buxybox with Cargo.lock integration",
|
||||
testArgs: args{
|
||||
Version: "dev",
|
||||
Input: "testdata/fixtures/busybox-with-lockfile.tar.gz",
|
||||
},
|
||||
golden: "testdata/busybox-with-lockfile.json.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 integration with ASFF template",
|
||||
testArgs: args{
|
||||
Format: "template",
|
||||
TemplatePath: "@../contrib/asff.tpl",
|
||||
Version: "dev",
|
||||
Input: "testdata/fixtures/alpine-310.tar.gz",
|
||||
},
|
||||
golden: "testdata/alpine-310.asff.golden",
|
||||
},
|
||||
}
|
||||
|
||||
app, addr, cacheDir := setup(t, "", "")
|
||||
|
||||
for _, c := range cases {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
report.Now = func() time.Time {
|
||||
return time.Date(2020, 8, 10, 7, 28, 17, 958601, time.UTC)
|
||||
}
|
||||
os.Setenv("AWS_REGION", "test-region")
|
||||
os.Setenv("AWS_ACCOUNT_ID", "123456789012")
|
||||
osArgs, outputFile, cleanup := setupClient(t, c.testArgs, addr, cacheDir, c.golden)
|
||||
defer cleanup()
|
||||
|
||||
// Run Trivy client
|
||||
err := app.Run(osArgs)
|
||||
require.NoError(t, err)
|
||||
|
||||
compare(t, c.golden, outputFile)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientServerWithToken(t *testing.T) {
|
||||
cases := []struct {
|
||||
name string
|
||||
testArgs args
|
||||
golden string
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "alpine 3.10 integration with token",
|
||||
testArgs: args{
|
||||
Version: "dev",
|
||||
Input: "testdata/fixtures/alpine-310.tar.gz",
|
||||
ClientToken: "token",
|
||||
ClientTokenHeader: "Trivy-Token",
|
||||
},
|
||||
golden: "testdata/alpine-310.json.golden",
|
||||
},
|
||||
{
|
||||
name: "invalid token",
|
||||
testArgs: args{
|
||||
@@ -308,8 +367,6 @@ func TestClientServer(t *testing.T) {
|
||||
Input: "testdata/fixtures/distroless-base.tar.gz",
|
||||
ClientToken: "invalidtoken",
|
||||
ClientTokenHeader: "Trivy-Token",
|
||||
ServerToken: "token",
|
||||
ServerTokenHeader: "Trivy-Token",
|
||||
},
|
||||
wantErr: "twirp error unauthenticated: invalid token",
|
||||
},
|
||||
@@ -320,46 +377,23 @@ func TestClientServer(t *testing.T) {
|
||||
Input: "testdata/fixtures/distroless-base.tar.gz",
|
||||
ClientToken: "valid-token",
|
||||
ClientTokenHeader: "Trivy-Token",
|
||||
ServerToken: "valid-token",
|
||||
ServerTokenHeader: "Invalid",
|
||||
},
|
||||
wantErr: "twirp error unauthenticated: invalid token",
|
||||
},
|
||||
}
|
||||
|
||||
serverToken := "token"
|
||||
serverTokenHeader := "Trivy-Token"
|
||||
app, addr, cacheDir := setup(t, serverToken, serverTokenHeader)
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
for _, c := range cases {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
// Copy DB file
|
||||
cacheDir := gunzipDB()
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
port, err := getFreePort()
|
||||
require.NoError(t, err, c.name)
|
||||
addr := fmt.Sprintf("localhost:%d", port)
|
||||
|
||||
go func() {
|
||||
// Setup CLI App
|
||||
app := internal.NewApp(c.testArgs.Version)
|
||||
app.Writer = ioutil.Discard
|
||||
osArgs := setupServer(addr, c.testArgs.ServerToken, c.testArgs.ServerTokenHeader, cacheDir)
|
||||
|
||||
// Run Trivy server
|
||||
require.NoError(t, app.Run(osArgs), c.name)
|
||||
}()
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
require.NoError(t, waitPort(ctx, addr), c.name)
|
||||
|
||||
// Setup CLI App
|
||||
app := internal.NewApp(c.testArgs.Version)
|
||||
app.Writer = ioutil.Discard
|
||||
|
||||
osArgs, outputFile, cleanup := setupClient(t, c.testArgs.IgnoreUnfixed, c.testArgs.Severity,
|
||||
c.testArgs.IgnoreIDs, addr, c.testArgs.ClientToken, c.testArgs.ClientTokenHeader, c.testArgs.Input, cacheDir, c.golden)
|
||||
osArgs, outputFile, cleanup := setupClient(t, c.testArgs, addr, cacheDir, c.golden)
|
||||
defer cleanup()
|
||||
|
||||
// Run Trivy client
|
||||
err = app.Run(osArgs)
|
||||
err := app.Run(osArgs)
|
||||
|
||||
if c.wantErr != "" {
|
||||
require.NotNil(t, err, c.name)
|
||||
@@ -369,17 +403,44 @@ func TestClientServer(t *testing.T) {
|
||||
assert.NoError(t, err, c.name)
|
||||
}
|
||||
|
||||
// Compare want and got
|
||||
want, err := ioutil.ReadFile(c.golden)
|
||||
assert.NoError(t, err)
|
||||
got, err := ioutil.ReadFile(outputFile)
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.JSONEq(t, string(want), string(got))
|
||||
compare(t, c.golden, outputFile)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func setup(t *testing.T, token, tokenHeader string) (*cli.App, string, string) {
|
||||
t.Helper()
|
||||
version := "dev"
|
||||
|
||||
// Copy DB file
|
||||
cacheDir, err := gunzipDB()
|
||||
assert.NoError(t, err)
|
||||
|
||||
port, err := getFreePort()
|
||||
assert.NoError(t, err)
|
||||
addr := fmt.Sprintf("localhost:%d", port)
|
||||
|
||||
go func() {
|
||||
// Setup CLI App
|
||||
app := internal.NewApp(version)
|
||||
app.Writer = ioutil.Discard
|
||||
osArgs := setupServer(addr, token, tokenHeader, cacheDir)
|
||||
|
||||
// Run Trivy server
|
||||
app.Run(osArgs)
|
||||
}()
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
err = waitPort(ctx, addr)
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Setup CLI App
|
||||
app := internal.NewApp(version)
|
||||
app.Writer = ioutil.Discard
|
||||
|
||||
return app, addr, cacheDir
|
||||
}
|
||||
|
||||
func setupServer(addr, token, tokenHeader, cacheDir string) []string {
|
||||
osArgs := []string{"trivy", "server", "--skip-update", "--cache-dir", cacheDir, "--listen", addr}
|
||||
if token != "" {
|
||||
@@ -388,35 +449,43 @@ func setupServer(addr, token, tokenHeader, cacheDir string) []string {
|
||||
return osArgs
|
||||
}
|
||||
|
||||
func setupClient(t *testing.T, ignoreUnfixed bool, severity, ignoreIDs []string,
|
||||
addr, token, tokenHeader, input, cacheDir, golden string) ([]string, string, func()) {
|
||||
func setupClient(t *testing.T, c args, addr string, cacheDir string, golden string) ([]string, string, func()) {
|
||||
t.Helper()
|
||||
osArgs := []string{"trivy", "client", "--cache-dir", cacheDir,
|
||||
"--format", "json", "--remote", "http://" + addr}
|
||||
if ignoreUnfixed {
|
||||
osArgs := []string{"trivy", "client", "--cache-dir", cacheDir, "--remote", "http://" + addr}
|
||||
|
||||
if c.Format != "" {
|
||||
osArgs = append(osArgs, "--format", c.Format)
|
||||
if c.TemplatePath != "" {
|
||||
osArgs = append(osArgs, "--template", c.TemplatePath)
|
||||
}
|
||||
} else {
|
||||
osArgs = append(osArgs, "--format", "json")
|
||||
}
|
||||
|
||||
if c.IgnoreUnfixed {
|
||||
osArgs = append(osArgs, "--ignore-unfixed")
|
||||
}
|
||||
if len(severity) != 0 {
|
||||
if len(c.Severity) != 0 {
|
||||
osArgs = append(osArgs,
|
||||
[]string{"--severity", strings.Join(severity, ",")}...,
|
||||
[]string{"--severity", strings.Join(c.Severity, ",")}...,
|
||||
)
|
||||
}
|
||||
|
||||
var err error
|
||||
var ignoreTmpDir string
|
||||
if len(ignoreIDs) != 0 {
|
||||
if len(c.IgnoreIDs) != 0 {
|
||||
ignoreTmpDir, err = ioutil.TempDir("", "ignore")
|
||||
require.NoError(t, err, "failed to create a temp dir")
|
||||
trivyIgnore := filepath.Join(ignoreTmpDir, ".trivyignore")
|
||||
err = ioutil.WriteFile(trivyIgnore, []byte(strings.Join(ignoreIDs, "\n")), 0444)
|
||||
err = ioutil.WriteFile(trivyIgnore, []byte(strings.Join(c.IgnoreIDs, "\n")), 0444)
|
||||
require.NoError(t, err, "failed to write .trivyignore")
|
||||
osArgs = append(osArgs, []string{"--ignorefile", trivyIgnore}...)
|
||||
}
|
||||
if token != "" {
|
||||
osArgs = append(osArgs, []string{"--token", token, "--token-header", tokenHeader}...)
|
||||
if c.ClientToken != "" {
|
||||
osArgs = append(osArgs, []string{"--token", c.ClientToken, "--token-header", c.ClientTokenHeader}...)
|
||||
}
|
||||
if input != "" {
|
||||
osArgs = append(osArgs, []string{"--input", input}...)
|
||||
if c.Input != "" {
|
||||
osArgs = append(osArgs, []string{"--input", c.Input}...)
|
||||
}
|
||||
|
||||
// Setup the output file
|
||||
@@ -431,9 +500,22 @@ func setupClient(t *testing.T, ignoreUnfixed bool, severity, ignoreIDs []string,
|
||||
|
||||
cleanup := func() {
|
||||
_ = os.Remove(ignoreTmpDir)
|
||||
_ = os.Remove(outputFile)
|
||||
if !*update {
|
||||
_ = os.Remove(outputFile)
|
||||
}
|
||||
}
|
||||
|
||||
osArgs = append(osArgs, []string{"--output", outputFile}...)
|
||||
return osArgs, outputFile, cleanup
|
||||
}
|
||||
|
||||
func compare(t *testing.T, wantFile, gotFile string) {
|
||||
t.Helper()
|
||||
// Compare want and got
|
||||
want, err := ioutil.ReadFile(wantFile)
|
||||
assert.NoError(t, err)
|
||||
got, err := ioutil.ReadFile(gotFile)
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.JSONEq(t, string(want), string(got))
|
||||
}
|
||||
|
||||
23
integration/data/auth_config/config.yml
Normal file
23
integration/data/auth_config/config.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
server:
|
||||
addr: ":5001"
|
||||
certificate: "/certs/cert.pem"
|
||||
key: "/certs/key.pem"
|
||||
|
||||
token:
|
||||
issuer: "Trivy auth server" # Must match issuer in the Registry config.
|
||||
expiration: 900
|
||||
|
||||
users:
|
||||
# Password is specified as a BCrypt hash. Use `htpasswd -nB USERNAME` to generate.
|
||||
"admin":
|
||||
password: "$2y$05$LO.vzwpWC5LZGqThvEfznu8qhb5SGqvBSWY1J3yZ4AxtMRZ3kN5jC" # badmin
|
||||
"test":
|
||||
password: "$2y$05$WuwBasGDAgr.QCbGIjKJaep4dhxeai9gNZdmBnQXqpKly57oNutya" # 123
|
||||
|
||||
acl:
|
||||
- match: {account: "admin"}
|
||||
actions: ["*"]
|
||||
comment: "Admin has full access to everything."
|
||||
- match: {account: "test"}
|
||||
actions: ["pull"]
|
||||
comment: "User \"test\" can pull stuff."
|
||||
18
integration/data/certs/cert.pem
Normal file
18
integration/data/certs/cert.pem
Normal file
@@ -0,0 +1,18 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC+jCCAeKgAwIBAgIRAJLJ5vw48YZwoHlC8i6VdHswDQYJKoZIhvcNAQELBQAw
|
||||
EjEQMA4GA1UEChMHQWNtZSBDbzAeFw0yMDA1MDMxMTU2MzhaFw0yMTA1MDMxMTU2
|
||||
MzhaMBIxEDAOBgNVBAoTB0FjbWUgQ28wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
|
||||
ggEKAoIBAQDhnepAL1Atd1xVh/TOZpTK7yHwtOrtGWNEqNkFbcyD7x9CNgUkxjO8
|
||||
nc4ynEo4ARpLj+2VDLIwi93weCFj6mcz2tdHi7n0eiPR7+PSNMNpPFwablLOEtaX
|
||||
XVqHhJNsHcJx6okX6ullksJoRnZGu+n1LvGRMMLWjS3UJZA6+1pujoifyrx9YXLU
|
||||
qSjkRRv3Ly8HmAPJq0T19uCZiJ8qbrW1Vx3hdUILL4OlJmpjZvGKMRnolinko2Vk
|
||||
0pHH5MWz0iUbqWQjHZmQWi0rDHRAFbuCqQdmFsEneXmUzExXZbyHwrTH/mrjJTCJ
|
||||
YmtR7Eq80AxsWnXNI3Z0mVQ9/nZDsT31AgMBAAGjSzBJMA4GA1UdDwEB/wQEAwIF
|
||||
oDATBgNVHSUEDDAKBggrBgEFBQcDATAMBgNVHRMBAf8EAjAAMBQGA1UdEQQNMAuC
|
||||
CWxvY2FsaG9zdDANBgkqhkiG9w0BAQsFAAOCAQEAG7spAmpZVKOV913WhKZp8o1+
|
||||
T6v/b6KUOAZ0iWXeGWO7LwnRaulkyauGav9xJUpfEw7Z/57qwTVIGZD6mZF6tt77
|
||||
FsXXiQJA88LrQnt1BRTeNK8sRp4S3N1hrtY3akTit/dyQcfh3NSDttzkYsoUu0qT
|
||||
DUkXD0b4eDmaD47+0Z6eIVp3aEcPMzpiy6qWc5fMjMeHjtYF4lBSF0JTWzmxNUGl
|
||||
fiGhMJStQK/n73t58O7h5Adva5wRV+Km6pa+6SfOxPNUjsxXjG0LzWA9dJg/q2rs
|
||||
k/ouIE05BfB3z538ncQVBTwfPMClbIiJhAs3b6ej22+j/O+vbFBmdfkpVpFRtg==
|
||||
-----END CERTIFICATE-----
|
||||
28
integration/data/certs/key.pem
Normal file
28
integration/data/certs/key.pem
Normal file
@@ -0,0 +1,28 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDhnepAL1Atd1xV
|
||||
h/TOZpTK7yHwtOrtGWNEqNkFbcyD7x9CNgUkxjO8nc4ynEo4ARpLj+2VDLIwi93w
|
||||
eCFj6mcz2tdHi7n0eiPR7+PSNMNpPFwablLOEtaXXVqHhJNsHcJx6okX6ullksJo
|
||||
RnZGu+n1LvGRMMLWjS3UJZA6+1pujoifyrx9YXLUqSjkRRv3Ly8HmAPJq0T19uCZ
|
||||
iJ8qbrW1Vx3hdUILL4OlJmpjZvGKMRnolinko2Vk0pHH5MWz0iUbqWQjHZmQWi0r
|
||||
DHRAFbuCqQdmFsEneXmUzExXZbyHwrTH/mrjJTCJYmtR7Eq80AxsWnXNI3Z0mVQ9
|
||||
/nZDsT31AgMBAAECggEBAKwwGhSMR3O7sdNxJIvVzF8orE2JtfXoN1OyTZcQGlLi
|
||||
z4d3tOtA/UFJapJDp30gklHy8Y6clu3oASVCebFItyTjMwPehrgn82iI3eWS8URC
|
||||
lcRySG4QAIia7bmZm+2atMi+B40icqhbnlV42VHYnpDKGAEIJtsZ+kz7shzhsj3G
|
||||
yTQMFyuqk0DUmsbSVKPjryv15DXsT9Rk2pVZYFhiRw/gQpWD58GMP/HMrSz+sjuX
|
||||
ZIlhSMGVWA4Yc7le4PpWI2qAZLR+X1EgkzxcMJ0kWvnvzEXFmofaYzkbEcNOlguF
|
||||
Bv9kP5fh35AbQbTLykGO9h4VrfDajlHequzNBJs1z60CgYEA53cwBh42pg/fSmaO
|
||||
sowpFV52ZfbfUPcuXRuaidHWougByB8P8XTMeQTse4NLt+2oat/5rdP3keGr5OR5
|
||||
8q7v8/R/KY0NQOa/93BUeRDW4ntxMECWbC2p/sq2wnRKTl+yepAWrRXzk8z9vFP/
|
||||
TZM5m65aj3IsZ3Bo1WG+SSf8bvsCgYEA+YgFxmiTauKRO4IVPuOqJ88yC5SQ83mF
|
||||
T54ILYalG3yq/Jm1TTOzoZAoKvHrJeeZqQvjS4jSY5gc5TCrUVTdsw5nXtrRKZJs
|
||||
HjtVT78qfzjCSHzImvc3Rw5+SNO2+j9yxuBSAG4tEKD3KKxSodXnKtD4CwzvRdyI
|
||||
gUyjQi3Os88CgYEAgrzegkYkhe2nKKX+6bijJ+/AHl2vy1KifHKv+jJs8nzrLLbm
|
||||
0XIwYBa44BbL+Oqi2yMBKv7z8hEuf03R15KZ9Ahgnv6Nwt/TBBcNj4hEZ45j42ZH
|
||||
0HiGcWTcj78RjW0eKX4jYMZqW0xI8Uvcg1uqCVYUzrsle5ORkxzvVvDf82sCgYEA
|
||||
4hS9tsA1IJhaoaIAgdRf7GWroBZhJlep0zMJkcX2fer8OJVDUMlRLUahPhelx9gI
|
||||
vsLIkz1J8XZ2Z6kq7yuHGp4oRibXb2T8lH+JkhFP/ah9TpPQZacq7DRTcsRvelhW
|
||||
M542bbFlHzXX+X/39i0Jnx9qPQjhGVjwTMYU/Pbn2r0CgYAkwwh2oq6BP3w7/4xe
|
||||
giaW/5zzMA8R9ZXFfkE4OXk2vig8LzUn1IO0JeGLyHQbdg8exYxTU3zygIlSvCQP
|
||||
Zbl0+RB+NHwGOqlpEDdPFXsqi1GAdWOC6FzYtBFNk9WyjFICXjB42wnfIIUQPLU1
|
||||
kQKFaehfx9KR0iW1dnm3vbFlzw==
|
||||
-----END PRIVATE KEY-----
|
||||
117
integration/docker/docker.go
Normal file
117
integration/docker/docker.go
Normal file
@@ -0,0 +1,117 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"os"
|
||||
|
||||
"github.com/docker/docker/client"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
)
|
||||
|
||||
// RegistryConfig holds the config for docker registry
|
||||
type RegistryConfig struct {
|
||||
URL *url.URL
|
||||
Username string
|
||||
Password string
|
||||
}
|
||||
|
||||
// GetAuthConfig returns the docker registry authConfig
|
||||
func (c RegistryConfig) GetAuthConfig() types.AuthConfig {
|
||||
return types.AuthConfig{
|
||||
Username: c.Username,
|
||||
Password: c.Password,
|
||||
ServerAddress: c.URL.Host,
|
||||
}
|
||||
}
|
||||
|
||||
// GetRegistryAuth returns the json encoded docker registry auth
|
||||
func (c RegistryConfig) GetRegistryAuth() (string, error) {
|
||||
authConfig := types.AuthConfig{
|
||||
Username: c.Username,
|
||||
Password: c.Password,
|
||||
}
|
||||
encodedJSON, err := json.Marshal(authConfig)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return base64.URLEncoding.EncodeToString(encodedJSON), nil
|
||||
}
|
||||
|
||||
// Docker returns docker client
|
||||
type Docker struct {
|
||||
cli *client.Client
|
||||
}
|
||||
|
||||
// New is the factory method to return docker client
|
||||
func New() (Docker, error) {
|
||||
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||
if err != nil {
|
||||
return Docker{}, err
|
||||
}
|
||||
return Docker{
|
||||
cli: cli,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ReplicateImage tags the given imagePath and pushes it to the given dest registry.
|
||||
func (d Docker) ReplicateImage(ctx context.Context, imageRef, imagePath string, dest RegistryConfig) error {
|
||||
// remove existing Image if any
|
||||
_, _ = d.cli.ImageRemove(ctx, imageRef, types.ImageRemoveOptions{
|
||||
Force: true,
|
||||
PruneChildren: true,
|
||||
})
|
||||
|
||||
testfile, err := os.Open(imagePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// load image into docker engine
|
||||
resp, err := d.cli.ImageLoad(ctx, testfile, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err = io.Copy(ioutil.Discard, resp.Body); err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
targetImageRef := fmt.Sprintf("%s/%s", dest.URL.Host, imageRef)
|
||||
|
||||
if err = d.cli.ImageTag(ctx, imageRef, targetImageRef); err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
_, _ = d.cli.ImageRemove(ctx, imageRef, types.ImageRemoveOptions{
|
||||
Force: true,
|
||||
PruneChildren: true,
|
||||
})
|
||||
_, _ = d.cli.ImageRemove(ctx, targetImageRef, types.ImageRemoveOptions{
|
||||
Force: true,
|
||||
PruneChildren: true,
|
||||
})
|
||||
}()
|
||||
|
||||
auth, err := dest.GetRegistryAuth()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
pushOut, err := d.cli.ImagePush(ctx, targetImageRef, types.ImagePushOptions{RegistryAuth: auth})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer pushOut.Close()
|
||||
|
||||
if _, err = io.Copy(ioutil.Discard, pushOut); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -4,6 +4,7 @@ package integration
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -19,22 +20,33 @@ import (
|
||||
|
||||
func TestRun_WithDockerEngine(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
imageTag string
|
||||
invalidImage bool
|
||||
ignoreUnfixed bool
|
||||
severity []string
|
||||
ignoreIDs []string
|
||||
testfile string
|
||||
expectedOutputFile string
|
||||
expectedError string
|
||||
name string
|
||||
withImageSubcommand bool
|
||||
imageTag string
|
||||
invalidImage bool
|
||||
ignoreUnfixed bool
|
||||
severity []string
|
||||
ignoreIDs []string
|
||||
testfile string
|
||||
expectedOutputFile string
|
||||
expectedError string
|
||||
}{
|
||||
// All of these cases should pass for either
|
||||
// $ trivy <args>
|
||||
// $ trivy image <args>
|
||||
{
|
||||
name: "happy path, valid image path, alpine:3.10",
|
||||
imageTag: "alpine:3.10",
|
||||
expectedOutputFile: "testdata/alpine-310.json.golden",
|
||||
testfile: "testdata/fixtures/alpine-310.tar.gz",
|
||||
},
|
||||
{
|
||||
name: "happy path, valid image path, with image subcommand, alpine:3.10",
|
||||
withImageSubcommand: true,
|
||||
imageTag: "alpine:3.10",
|
||||
expectedOutputFile: "testdata/alpine-310.json.golden",
|
||||
testfile: "testdata/fixtures/alpine-310.tar.gz",
|
||||
},
|
||||
{
|
||||
name: "happy path, valid image path, alpine:3.10, ignore unfixed",
|
||||
ignoreUnfixed: true,
|
||||
@@ -81,12 +93,6 @@ func TestRun_WithDockerEngine(t *testing.T) {
|
||||
expectedOutputFile: "testdata/centos-6.json.golden",
|
||||
testfile: "testdata/fixtures/centos-6.tar.gz",
|
||||
},
|
||||
{
|
||||
name: "happy path, valid image path, centos:6",
|
||||
imageTag: "centos:6",
|
||||
expectedOutputFile: "testdata/centos-6.json.golden",
|
||||
testfile: "testdata/fixtures/centos-6.tar.gz",
|
||||
},
|
||||
{
|
||||
name: "happy path, valid image path, centos:7",
|
||||
imageTag: "centos:7",
|
||||
@@ -225,26 +231,33 @@ func TestRun_WithDockerEngine(t *testing.T) {
|
||||
expectedOutputFile: "testdata/photon-30.json.golden",
|
||||
testfile: "testdata/fixtures/photon-30.tar.gz",
|
||||
},
|
||||
{
|
||||
name: "buxybox with Cargo.lock integration",
|
||||
imageTag: "busy-cargo:latest",
|
||||
expectedOutputFile: "testdata/busybox-with-lockfile.json.golden",
|
||||
testfile: "testdata/fixtures/busybox-with-lockfile.tar.gz",
|
||||
},
|
||||
{
|
||||
name: "sad path, invalid image",
|
||||
invalidImage: true,
|
||||
testfile: "badimage:latest",
|
||||
expectedError: "error in image scan: failed to analyze image: failed to extract files: failed to get the v2 manifest: Get https://registry-1.docker.io/v2/library/badimage/manifests/latest: http: non-successful response (status=401 body=\"{\\\"errors\\\":[{\\\"code\\\":\\\"UNAUTHORIZED\\\",\\\"message\\\":\\\"authentication required\\\",\\\"detail\\\":[{\\\"Type\\\":\\\"repository\\\",\\\"Class\\\":\\\"\\\",\\\"Name\\\":\\\"library/badimage\\\",\\\"Action\\\":\\\"pull\\\"}]}]}\\n\")",
|
||||
expectedError: "unable to inspect the image (index.docker.io/library/badimage:latest)",
|
||||
},
|
||||
}
|
||||
|
||||
// Copy DB file
|
||||
cacheDir, err := gunzipDB()
|
||||
require.NoError(t, err)
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
ctx := context.Background()
|
||||
defer ctx.Done()
|
||||
|
||||
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||
require.NoError(t, err)
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
// Copy DB file
|
||||
cacheDir := gunzipDB()
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
ctx := context.Background()
|
||||
defer ctx.Done()
|
||||
|
||||
cli, err := client.NewClientWithOpts(client.FromEnv)
|
||||
require.NoError(t, err, tc.name)
|
||||
|
||||
if !tc.invalidImage {
|
||||
testfile, err := os.Open(tc.testfile)
|
||||
require.NoError(t, err, tc.name)
|
||||
@@ -256,8 +269,9 @@ func TestRun_WithDockerEngine(t *testing.T) {
|
||||
})
|
||||
|
||||
// load image into docker engine
|
||||
_, err = cli.ImageLoad(ctx, testfile, true)
|
||||
res, err := cli.ImageLoad(ctx, testfile, true)
|
||||
require.NoError(t, err, tc.name)
|
||||
io.Copy(ioutil.Discard, res.Body)
|
||||
|
||||
// tag our image to something unique
|
||||
err = cli.ImageTag(ctx, tc.imageTag, tc.testfile)
|
||||
@@ -270,7 +284,14 @@ func TestRun_WithDockerEngine(t *testing.T) {
|
||||
|
||||
// run trivy
|
||||
app := internal.NewApp("dev")
|
||||
trivyArgs := []string{"trivy", "--skip-update", "--cache-dir", cacheDir, "--format=json"}
|
||||
trivyArgs := []string{"trivy"}
|
||||
trivyArgs = append(trivyArgs, "--cache-dir", cacheDir)
|
||||
if tc.withImageSubcommand {
|
||||
trivyArgs = append(trivyArgs, "image")
|
||||
}
|
||||
|
||||
trivyArgs = append(trivyArgs, []string{"--skip-update", "--format=json", "--output", of.Name()}...)
|
||||
|
||||
if tc.ignoreUnfixed {
|
||||
trivyArgs = append(trivyArgs, "--ignore-unfixed")
|
||||
}
|
||||
@@ -285,34 +306,35 @@ func TestRun_WithDockerEngine(t *testing.T) {
|
||||
assert.NoError(t, err, "failed to write .trivyignore")
|
||||
defer os.Remove(trivyIgnore)
|
||||
}
|
||||
if !tc.invalidImage {
|
||||
trivyArgs = append(trivyArgs, "--output", of.Name())
|
||||
}
|
||||
trivyArgs = append(trivyArgs, tc.testfile)
|
||||
|
||||
err = app.Run(trivyArgs)
|
||||
switch {
|
||||
case tc.expectedError != "":
|
||||
assert.Equal(t, tc.expectedError, err.Error(), tc.name)
|
||||
require.NotNil(t, err)
|
||||
assert.Contains(t, err.Error(), tc.expectedError, tc.name)
|
||||
return
|
||||
default:
|
||||
assert.NoError(t, err, tc.name)
|
||||
}
|
||||
|
||||
if !tc.invalidImage {
|
||||
// check for vulnerability output info
|
||||
got, err := ioutil.ReadAll(of)
|
||||
assert.NoError(t, err, tc.name)
|
||||
want, err := ioutil.ReadFile(tc.expectedOutputFile)
|
||||
assert.NoError(t, err, tc.name)
|
||||
assert.JSONEq(t, string(want), string(got), tc.name)
|
||||
// check for vulnerability output info
|
||||
got, err := ioutil.ReadAll(of)
|
||||
assert.NoError(t, err, tc.name)
|
||||
want, err := ioutil.ReadFile(tc.expectedOutputFile)
|
||||
assert.NoError(t, err, tc.name)
|
||||
assert.JSONEq(t, string(want), string(got), tc.name)
|
||||
|
||||
// cleanup
|
||||
_, err = cli.ImageRemove(ctx, tc.testfile, types.ImageRemoveOptions{
|
||||
Force: true,
|
||||
PruneChildren: true,
|
||||
})
|
||||
assert.NoError(t, err, tc.name)
|
||||
}
|
||||
// cleanup
|
||||
_, err = cli.ImageRemove(ctx, tc.testfile, types.ImageRemoveOptions{
|
||||
Force: true,
|
||||
PruneChildren: true,
|
||||
})
|
||||
_, err = cli.ImageRemove(ctx, tc.imageTag, types.ImageRemoveOptions{
|
||||
Force: true,
|
||||
PruneChildren: true,
|
||||
})
|
||||
assert.NoError(t, err, tc.name)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,49 +5,70 @@ package integration
|
||||
import (
|
||||
"compress/gzip"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/aquasecurity/trivy-db/pkg/db"
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
var update = flag.Bool("update", false, "update golden files")
|
||||
|
||||
func gunzipDB() string {
|
||||
func gunzipDB() (string, error) {
|
||||
gz, err := os.Open("testdata/trivy.db.gz")
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
return "", err
|
||||
}
|
||||
zr, err := gzip.NewReader(gz)
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
return "", err
|
||||
}
|
||||
|
||||
tmpDir, err := ioutil.TempDir("", "integration")
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
}
|
||||
dbDir := filepath.Join(tmpDir, "db")
|
||||
err = os.MkdirAll(dbDir, 0700)
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
return "", err
|
||||
}
|
||||
|
||||
file, err := os.Create(filepath.Join(dbDir, "trivy.db"))
|
||||
dbPath := db.Path(tmpDir)
|
||||
dbDir := filepath.Dir(dbPath)
|
||||
err = os.MkdirAll(dbDir, 0700)
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
return "", err
|
||||
}
|
||||
|
||||
file, err := os.Create(dbPath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
_, err = io.Copy(file, zr)
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
if _, err = io.Copy(file, zr); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return tmpDir
|
||||
|
||||
fs := afero.NewOsFs()
|
||||
metadataFile := filepath.Join(dbDir, "metadata.json")
|
||||
b, err := json.Marshal(db.Metadata{
|
||||
Version: 1,
|
||||
Type: 1,
|
||||
NextUpdate: time.Time{},
|
||||
UpdatedAt: time.Time{},
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
err = afero.WriteFile(fs, metadataFile, b, 0600)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return tmpDir, nil
|
||||
}
|
||||
|
||||
func getFreePort() (int, error) {
|
||||
|
||||
353
integration/registry_test.go
Normal file
353
integration/registry_test.go
Normal file
@@ -0,0 +1,353 @@
|
||||
// +build integration
|
||||
|
||||
package integration
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/go-connections/nat"
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
testcontainers "github.com/testcontainers/testcontainers-go"
|
||||
"github.com/testcontainers/testcontainers-go/wait"
|
||||
|
||||
_ "github.com/aquasecurity/fanal/analyzer"
|
||||
testdocker "github.com/aquasecurity/trivy/integration/docker"
|
||||
"github.com/aquasecurity/trivy/internal"
|
||||
"github.com/aquasecurity/trivy/pkg/report"
|
||||
)
|
||||
|
||||
const (
|
||||
registryImage = "registry:2"
|
||||
registryPort = "5443/tcp"
|
||||
|
||||
authImage = "cesanta/docker_auth:1"
|
||||
authPort = "5001/tcp"
|
||||
authUsername = "admin"
|
||||
authPassword = "badmin"
|
||||
)
|
||||
|
||||
func setupRegistry(ctx context.Context, baseDir string, authURL *url.URL) (testcontainers.Container, error) {
|
||||
req := testcontainers.ContainerRequest{
|
||||
Name: "registry",
|
||||
Image: registryImage,
|
||||
ExposedPorts: []string{registryPort},
|
||||
Env: map[string]string{
|
||||
"REGISTRY_HTTP_ADDR": "0.0.0.0:5443",
|
||||
"REGISTRY_HTTP_TLS_CERTIFICATE": "/certs/cert.pem",
|
||||
"REGISTRY_HTTP_TLS_KEY": "/certs/key.pem",
|
||||
"REGISTRY_AUTH": "token",
|
||||
"REGISTRY_AUTH_TOKEN_REALM": fmt.Sprintf("%s/auth", authURL),
|
||||
"REGISTRY_AUTH_TOKEN_SERVICE": "registry.docker.io",
|
||||
"REGISTRY_AUTH_TOKEN_ISSUER": "Trivy auth server",
|
||||
"REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE": "/certs/cert.pem",
|
||||
},
|
||||
BindMounts: map[string]string{
|
||||
filepath.Join(baseDir, "data", "certs"): "/certs",
|
||||
},
|
||||
WaitingFor: wait.ForLog("listening on [::]:5443"),
|
||||
}
|
||||
|
||||
registryC, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
ContainerRequest: req,
|
||||
Started: true,
|
||||
})
|
||||
return registryC, err
|
||||
}
|
||||
|
||||
func setupAuthServer(ctx context.Context, baseDir string) (testcontainers.Container, error) {
|
||||
req := testcontainers.ContainerRequest{
|
||||
Name: "docker_auth",
|
||||
Image: authImage,
|
||||
ExposedPorts: []string{authPort},
|
||||
BindMounts: map[string]string{
|
||||
filepath.Join(baseDir, "data", "auth_config"): "/config",
|
||||
filepath.Join(baseDir, "data", "certs"): "/certs",
|
||||
},
|
||||
Cmd: []string{"/config/config.yml"},
|
||||
}
|
||||
|
||||
authC, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||
ContainerRequest: req,
|
||||
Started: true,
|
||||
})
|
||||
return authC, err
|
||||
}
|
||||
|
||||
func getURL(ctx context.Context, container testcontainers.Container, exposedPort nat.Port) (*url.URL, error) {
|
||||
ip, err := container.Host(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
port, err := container.MappedPort(ctx, exposedPort)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
urlStr := fmt.Sprintf("https://%s:%s", ip, port.Port())
|
||||
return url.Parse(urlStr)
|
||||
}
|
||||
|
||||
type registryOption struct {
|
||||
AuthURL *url.URL
|
||||
Username string
|
||||
Password string
|
||||
RegistryToken bool
|
||||
}
|
||||
|
||||
func TestRegistry(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
baseDir, err := filepath.Abs(".")
|
||||
require.NoError(t, err)
|
||||
|
||||
// set up auth server
|
||||
authC, err := setupAuthServer(ctx, baseDir)
|
||||
require.NoError(t, err)
|
||||
defer authC.Terminate(ctx)
|
||||
|
||||
authURL, err := getURL(ctx, authC, authPort)
|
||||
require.NoError(t, err)
|
||||
|
||||
// set up registry
|
||||
registryC, err := setupRegistry(ctx, baseDir, authURL)
|
||||
require.NoError(t, err)
|
||||
defer registryC.Terminate(ctx)
|
||||
|
||||
registryURL, err := getURL(ctx, registryC, registryPort)
|
||||
require.NoError(t, err)
|
||||
|
||||
config := testdocker.RegistryConfig{
|
||||
URL: registryURL,
|
||||
Username: authUsername,
|
||||
Password: authPassword,
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
imageName string
|
||||
imageFile string
|
||||
option registryOption
|
||||
golden string
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "happy path with username/password",
|
||||
imageName: "alpine:3.10",
|
||||
imageFile: "testdata/fixtures/alpine-310.tar.gz",
|
||||
option: registryOption{
|
||||
AuthURL: authURL,
|
||||
Username: authUsername,
|
||||
Password: authPassword,
|
||||
},
|
||||
golden: "testdata/alpine-310-registry.json.golden",
|
||||
},
|
||||
{
|
||||
name: "happy path with registry token",
|
||||
imageName: "alpine:3.10",
|
||||
imageFile: "testdata/fixtures/alpine-310.tar.gz",
|
||||
option: registryOption{
|
||||
AuthURL: authURL,
|
||||
Username: authUsername,
|
||||
Password: authPassword,
|
||||
RegistryToken: true,
|
||||
},
|
||||
golden: "testdata/alpine-310-registry.json.golden",
|
||||
},
|
||||
{
|
||||
name: "sad path",
|
||||
imageName: "alpine:3.10",
|
||||
imageFile: "testdata/fixtures/alpine-310.tar.gz",
|
||||
wantErr: "unsupported status code 401; body: Auth failed",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
d, err := testdocker.New()
|
||||
require.NoError(t, err)
|
||||
|
||||
s := fmt.Sprintf("%s/%s", registryURL.Host, tc.imageName)
|
||||
imageRef, err := name.ParseReference(s)
|
||||
require.NoError(t, err)
|
||||
|
||||
// 1. Load a test image from the tar file, tag it and push to the test registry.
|
||||
err = d.ReplicateImage(ctx, tc.imageName, tc.imageFile, config)
|
||||
require.NoError(t, err)
|
||||
|
||||
// 2. Scan it
|
||||
resultFile, cleanup, err := scan(imageRef, baseDir, tc.golden, tc.option)
|
||||
|
||||
if tc.wantErr != "" {
|
||||
require.NotNil(t, err)
|
||||
require.Contains(t, err.Error(), tc.wantErr, err)
|
||||
return
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
defer cleanup()
|
||||
|
||||
// 3. Compare want and got
|
||||
golden, err := os.Open(tc.golden)
|
||||
assert.NoError(t, err)
|
||||
|
||||
var want report.Results
|
||||
err = json.NewDecoder(golden).Decode(&want)
|
||||
require.NoError(t, err)
|
||||
|
||||
result, err := os.Open(resultFile)
|
||||
assert.NoError(t, err)
|
||||
|
||||
var got report.Results
|
||||
err = json.NewDecoder(result).Decode(&got)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, want[0].Vulnerabilities, got[0].Vulnerabilities)
|
||||
assert.Equal(t, want[0].Vulnerabilities, got[0].Vulnerabilities)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func scan(imageRef name.Reference, baseDir, goldenFile string, opt registryOption) (string, func(), error) {
|
||||
cleanup := func() {}
|
||||
|
||||
// Copy DB file
|
||||
cacheDir, err := gunzipDB()
|
||||
if err != nil {
|
||||
return "", cleanup, err
|
||||
}
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
// Setup the output file
|
||||
var outputFile string
|
||||
if *update && goldenFile != "" {
|
||||
outputFile = goldenFile
|
||||
} else {
|
||||
output, err := ioutil.TempFile("", "integration")
|
||||
if err != nil {
|
||||
return "", cleanup, err
|
||||
}
|
||||
defer output.Close()
|
||||
|
||||
outputFile = output.Name()
|
||||
cleanup = func() {
|
||||
os.Remove(outputFile)
|
||||
}
|
||||
}
|
||||
|
||||
// Setup env
|
||||
if err = setupEnv(imageRef, baseDir, opt); err != nil {
|
||||
return "", cleanup, err
|
||||
}
|
||||
defer unsetEnv()
|
||||
|
||||
// Setup CLI App
|
||||
app := internal.NewApp("dev")
|
||||
app.Writer = ioutil.Discard
|
||||
|
||||
osArgs := []string{"trivy", "--cache-dir", cacheDir, "--format", "json", "--skip-update", "--output", outputFile, imageRef.Name()}
|
||||
|
||||
// Run Trivy
|
||||
if err = app.Run(osArgs); err != nil {
|
||||
return "", cleanup, err
|
||||
}
|
||||
return outputFile, cleanup, nil
|
||||
}
|
||||
|
||||
func setupEnv(imageRef name.Reference, baseDir string, opt registryOption) error {
|
||||
if err := os.Setenv("TRIVY_INSECURE", "true"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if opt.Username != "" && opt.Password != "" {
|
||||
if opt.RegistryToken {
|
||||
// Get a registry token in advance
|
||||
token, err := requestRegistryToken(imageRef, baseDir, opt)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := os.Setenv("TRIVY_REGISTRY_TOKEN", token); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if err := os.Setenv("TRIVY_USERNAME", opt.Username); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := os.Setenv("TRIVY_PASSWORD", opt.Password); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func unsetEnv() error {
|
||||
envs := []string{"TRIVY_INSECURE", "TRIVY_USERNAME", "TRIVY_PASSWORD", "TRIVY_REGISTRY_TOKEN"}
|
||||
for _, e := range envs {
|
||||
if err := os.Unsetenv(e); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func requestRegistryToken(imageRef name.Reference, baseDir string, opt registryOption) (string, error) {
|
||||
// Create a CA certificate pool and add cert.pem to it
|
||||
caCert, err := ioutil.ReadFile(filepath.Join(baseDir, "data", "certs", "cert.pem"))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
caCertPool := x509.NewCertPool()
|
||||
caCertPool.AppendCertsFromPEM(caCert)
|
||||
|
||||
// Create a HTTPS client and supply the created CA pool
|
||||
client := &http.Client{
|
||||
Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
RootCAs: caCertPool,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Get a registry token
|
||||
req, err := http.NewRequest("GET", fmt.Sprintf("%s/auth", opt.AuthURL), nil)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// Set query parameters
|
||||
values := req.URL.Query()
|
||||
values.Set("service", "registry.docker.io")
|
||||
values.Set("scope", imageRef.Scope("pull"))
|
||||
req.URL.RawQuery = values.Encode()
|
||||
|
||||
req.SetBasicAuth(opt.Username, opt.Password)
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
type res struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
}
|
||||
|
||||
var r res
|
||||
if err = json.NewDecoder(resp.Body).Decode(&r); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return r.AccessToken, nil
|
||||
}
|
||||
@@ -8,20 +8,24 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/aquasecurity/trivy/internal"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/aquasecurity/trivy/internal"
|
||||
)
|
||||
|
||||
func TestRun_WithTar(t *testing.T) {
|
||||
type args struct {
|
||||
Version string
|
||||
SkipUpdate bool
|
||||
IgnoreUnfixed bool
|
||||
Severity []string
|
||||
IgnoreIDs []string
|
||||
Format string
|
||||
Input string
|
||||
Version string
|
||||
WithImageSubcommand bool
|
||||
SkipUpdate bool
|
||||
IgnoreUnfixed bool
|
||||
Severity []string
|
||||
IgnoreIDs []string
|
||||
Format string
|
||||
Input string
|
||||
SkipDirs []string
|
||||
SkipFiles []string
|
||||
}
|
||||
cases := []struct {
|
||||
name string
|
||||
@@ -38,6 +42,17 @@ func TestRun_WithTar(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/alpine-310.json.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 integration with image subcommand",
|
||||
testArgs: args{
|
||||
Version: "dev",
|
||||
WithImageSubcommand: true,
|
||||
SkipUpdate: true,
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/alpine-310.tar.gz",
|
||||
},
|
||||
golden: "testdata/alpine-310.json.golden",
|
||||
},
|
||||
{
|
||||
name: "alpine 3.10 integration with --ignore-unfixed option",
|
||||
testArgs: args{
|
||||
@@ -166,18 +181,6 @@ func TestRun_WithTar(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/centos-7-ignore-unfixed.json.golden",
|
||||
},
|
||||
{
|
||||
name: "centos 7 integration with critical severity",
|
||||
testArgs: args{
|
||||
Version: "dev",
|
||||
SkipUpdate: true,
|
||||
IgnoreUnfixed: true,
|
||||
Severity: []string{"CRITICAL"},
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/centos-7.tar.gz",
|
||||
},
|
||||
golden: "testdata/centos-7-critical.json.golden",
|
||||
},
|
||||
{
|
||||
name: "centos 7 integration with low and high severity",
|
||||
testArgs: args{
|
||||
@@ -341,19 +344,53 @@ func TestRun_WithTar(t *testing.T) {
|
||||
},
|
||||
golden: "testdata/photon-30.json.golden",
|
||||
},
|
||||
{
|
||||
name: "buxybox with Cargo.lock integration",
|
||||
testArgs: args{
|
||||
Version: "dev",
|
||||
SkipUpdate: true,
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/busybox-with-lockfile.tar.gz",
|
||||
},
|
||||
golden: "testdata/busybox-with-lockfile.json.golden",
|
||||
},
|
||||
{
|
||||
name: "fluentd with multiple lock files",
|
||||
testArgs: args{
|
||||
Version: "dev",
|
||||
SkipUpdate: true,
|
||||
IgnoreUnfixed: true,
|
||||
Format: "json",
|
||||
Input: "testdata/fixtures/fluentd-multiple-lockfiles.tar.gz",
|
||||
SkipFiles: []string{"/Gemfile.lock"},
|
||||
SkipDirs: []string{
|
||||
"/var/lib/gems/2.5.0/gems/http_parser.rb-0.6.0",
|
||||
"/var/lib/gems/2.5.0/gems/fluent-plugin-detect-exceptions-0.0.13",
|
||||
},
|
||||
},
|
||||
golden: "testdata/fluentd-multiple-lockfiles.json.golden",
|
||||
},
|
||||
}
|
||||
|
||||
// Copy DB file
|
||||
cacheDir, err := gunzipDB()
|
||||
require.NoError(t, err)
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
// Setup CLI App
|
||||
app := internal.NewApp("dev")
|
||||
app.Writer = ioutil.Discard
|
||||
|
||||
for _, c := range cases {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
// Copy DB file
|
||||
cacheDir := gunzipDB()
|
||||
defer os.RemoveAll(cacheDir)
|
||||
|
||||
// Setup CLI App
|
||||
app := internal.NewApp(c.testArgs.Version)
|
||||
app.Writer = ioutil.Discard
|
||||
osArgs := []string{"trivy"}
|
||||
osArgs = append(osArgs, "--cache-dir", cacheDir)
|
||||
if c.testArgs.WithImageSubcommand {
|
||||
osArgs = append(osArgs, "image")
|
||||
}
|
||||
osArgs = append(osArgs, "--format", c.testArgs.Format)
|
||||
|
||||
osArgs := []string{"trivy", "--cache-dir", cacheDir, "--format", c.testArgs.Format}
|
||||
if c.testArgs.SkipUpdate {
|
||||
osArgs = append(osArgs, "--skip-update")
|
||||
}
|
||||
@@ -372,7 +409,14 @@ func TestRun_WithTar(t *testing.T) {
|
||||
defer os.Remove(trivyIgnore)
|
||||
}
|
||||
if c.testArgs.Input != "" {
|
||||
osArgs = append(osArgs, []string{"--input", c.testArgs.Input}...)
|
||||
osArgs = append(osArgs, "--input", c.testArgs.Input)
|
||||
}
|
||||
|
||||
if len(c.testArgs.SkipFiles) != 0 {
|
||||
osArgs = append(osArgs, "--skip-files", strings.Join(c.testArgs.SkipFiles, ","))
|
||||
}
|
||||
if len(c.testArgs.SkipDirs) != 0 {
|
||||
osArgs = append(osArgs, "--skip-dirs", strings.Join(c.testArgs.SkipDirs, ","))
|
||||
}
|
||||
|
||||
// Setup the output file
|
||||
@@ -1,12 +1,99 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -19,11 +25,44 @@
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -40,9 +79,113 @@
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GY6SNRJP2S7Y42GIIDO3HXPNMDYN2U3A/",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://support.f5.com/csp/article/K44070243",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -19,11 +25,118 @@
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GY6SNRJP2S7Y42GIIDO3HXPNMDYN2U3A/",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://support.f5.com/csp/article/K44070243",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
|
||||
214
integration/testdata/alpine-310-registry.json.golden
vendored
Normal file
214
integration/testdata/alpine-310-registry.json.golden
vendored
Normal file
@@ -0,0 +1,214 @@
|
||||
[
|
||||
{
|
||||
"Target": "localhost:32787/alpine:3.10 (alpine 3.10.2)",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GY6SNRJP2S7Y42GIIDO3HXPNMDYN2U3A/",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://support.f5.com/csp/article/K44070243",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GY6SNRJP2S7Y42GIIDO3HXPNMDYN2U3A/",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://support.f5.com/csp/article/K44070243",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"Digest": "sha256:9d48c3bd43c520dc2784e868a780e976b207cbf493eaff8c6596eb871cbd9609",
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
370
integration/testdata/alpine-310.asff.golden
vendored
Normal file
370
integration/testdata/alpine-310.asff.golden
vendored
Normal file
@@ -0,0 +1,370 @@
|
||||
[
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)/CVE-2019-1549",
|
||||
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"Severity": {
|
||||
"Product": 4,
|
||||
"Normalized": 40
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to CVE-2019-1549 in container testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "https://avd.aquasec.com/nvd/cve-2019-1549"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Partition": "aws",
|
||||
"Region": "test-region",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)" },
|
||||
"Other": {
|
||||
"CVE ID": "CVE-2019-1549",
|
||||
"CVE Title": "openssl: information disclosure in fork()",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"Installed Package": "1.1.1c-r0",
|
||||
"Patched Package": "1.1.1d-r0",
|
||||
"NvdCvssScoreV3": "0",
|
||||
"NvdCvssVectorV3": "",
|
||||
"NvdCvssScoreV2": "0",
|
||||
"NvdCvssVectorV2": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
},
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)/CVE-2019-1551",
|
||||
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"Severity": {
|
||||
"Product": 4,
|
||||
"Normalized": 40
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to CVE-2019-1551 in container testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "https://avd.aquasec.com/nvd/cve-2019-1551"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Partition": "aws",
|
||||
"Region": "test-region",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)" },
|
||||
"Other": {
|
||||
"CVE ID": "CVE-2019-1551",
|
||||
"CVE Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"Installed Package": "1.1.1c-r0",
|
||||
"Patched Package": "1.1.1d-r2",
|
||||
"NvdCvssScoreV3": "0",
|
||||
"NvdCvssVectorV3": "",
|
||||
"NvdCvssScoreV2": "0",
|
||||
"NvdCvssVectorV2": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
},
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)/CVE-2019-1563",
|
||||
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"Severity": {
|
||||
"Product": 4,
|
||||
"Normalized": 40
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to CVE-2019-1563 in container testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "https://avd.aquasec.com/nvd/cve-2019-1563"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Partition": "aws",
|
||||
"Region": "test-region",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)" },
|
||||
"Other": {
|
||||
"CVE ID": "CVE-2019-1563",
|
||||
"CVE Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"Installed Package": "1.1.1c-r0",
|
||||
"Patched Package": "1.1.1d-r0",
|
||||
"NvdCvssScoreV3": "0",
|
||||
"NvdCvssVectorV3": "",
|
||||
"NvdCvssScoreV2": "0",
|
||||
"NvdCvssVectorV2": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
},
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)/CVE-2019-1547",
|
||||
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"Severity": {
|
||||
"Product": 1,
|
||||
"Normalized": 10
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to CVE-2019-1547 in container testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "https://avd.aquasec.com/nvd/cve-2019-1547"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Partition": "aws",
|
||||
"Region": "test-region",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)" },
|
||||
"Other": {
|
||||
"CVE ID": "CVE-2019-1547",
|
||||
"CVE Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"Installed Package": "1.1.1c-r0",
|
||||
"Patched Package": "1.1.1d-r0",
|
||||
"NvdCvssScoreV3": "0",
|
||||
"NvdCvssVectorV3": "",
|
||||
"NvdCvssScoreV2": "0",
|
||||
"NvdCvssVectorV2": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
},
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)/CVE-2019-1549",
|
||||
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"Severity": {
|
||||
"Product": 4,
|
||||
"Normalized": 40
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to CVE-2019-1549 in container testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "https://avd.aquasec.com/nvd/cve-2019-1549"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Partition": "aws",
|
||||
"Region": "test-region",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)" },
|
||||
"Other": {
|
||||
"CVE ID": "CVE-2019-1549",
|
||||
"CVE Title": "openssl: information disclosure in fork()",
|
||||
"PkgName": "libssl1.1",
|
||||
"Installed Package": "1.1.1c-r0",
|
||||
"Patched Package": "1.1.1d-r0",
|
||||
"NvdCvssScoreV3": "0",
|
||||
"NvdCvssVectorV3": "",
|
||||
"NvdCvssScoreV2": "0",
|
||||
"NvdCvssVectorV2": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
},
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)/CVE-2019-1551",
|
||||
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"Severity": {
|
||||
"Product": 4,
|
||||
"Normalized": 40
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to CVE-2019-1551 in container testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "https://avd.aquasec.com/nvd/cve-2019-1551"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Partition": "aws",
|
||||
"Region": "test-region",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)" },
|
||||
"Other": {
|
||||
"CVE ID": "CVE-2019-1551",
|
||||
"CVE Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"PkgName": "libssl1.1",
|
||||
"Installed Package": "1.1.1c-r0",
|
||||
"Patched Package": "1.1.1d-r2",
|
||||
"NvdCvssScoreV3": "0",
|
||||
"NvdCvssVectorV3": "",
|
||||
"NvdCvssScoreV2": "0",
|
||||
"NvdCvssVectorV2": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
},
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)/CVE-2019-1563",
|
||||
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"Severity": {
|
||||
"Product": 4,
|
||||
"Normalized": 40
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to CVE-2019-1563 in container testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "https://avd.aquasec.com/nvd/cve-2019-1563"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Partition": "aws",
|
||||
"Region": "test-region",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)" },
|
||||
"Other": {
|
||||
"CVE ID": "CVE-2019-1563",
|
||||
"CVE Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"PkgName": "libssl1.1",
|
||||
"Installed Package": "1.1.1c-r0",
|
||||
"Patched Package": "1.1.1d-r0",
|
||||
"NvdCvssScoreV3": "0",
|
||||
"NvdCvssVectorV3": "",
|
||||
"NvdCvssScoreV2": "0",
|
||||
"NvdCvssVectorV2": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
},
|
||||
{
|
||||
"SchemaVersion": "2018-10-08",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)/CVE-2019-1547",
|
||||
"ProductArn": "arn:aws:securityhub:test-region::product/aquasecurity/aquasecurity",
|
||||
"GeneratorId": "Trivy",
|
||||
"AwsAccountId": "123456789012",
|
||||
"Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ],
|
||||
"CreatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"UpdatedAt": "2020-08-10T07:28:17.000958601Z",
|
||||
"Severity": {
|
||||
"Product": 1,
|
||||
"Normalized": 10
|
||||
},
|
||||
"Title": "Trivy found a vulnerability to CVE-2019-1547 in container testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Remediation": {
|
||||
"Recommendation": {
|
||||
"Text": "More information on this vulnerability is provided in the hyperlink",
|
||||
"Url": "https://avd.aquasec.com/nvd/cve-2019-1547"
|
||||
}
|
||||
},
|
||||
"ProductFields": { "Product Name": "Trivy" },
|
||||
"Resources": [
|
||||
{
|
||||
"Type": "Container",
|
||||
"Id": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Partition": "aws",
|
||||
"Region": "test-region",
|
||||
"Details": {
|
||||
"Container": { "ImageName": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)" },
|
||||
"Other": {
|
||||
"CVE ID": "CVE-2019-1547",
|
||||
"CVE Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"PkgName": "libssl1.1",
|
||||
"Installed Package": "1.1.1c-r0",
|
||||
"Patched Package": "1.1.1d-r0",
|
||||
"NvdCvssScoreV3": "0",
|
||||
"NvdCvssVectorV3": "",
|
||||
"NvdCvssScoreV2": "0",
|
||||
"NvdCvssVectorV2": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"RecordState": "ACTIVE"
|
||||
}
|
||||
]
|
||||
418
integration/testdata/alpine-310.gitlab.golden
vendored
Normal file
418
integration/testdata/alpine-310.gitlab.golden
vendored
Normal file
@@ -0,0 +1,418 @@
|
||||
{
|
||||
"version": "2.3",
|
||||
"vulnerabilities": [
|
||||
{
|
||||
"id": "CVE-2019-1549",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: information disclosure in fork()",
|
||||
"description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"cve": "CVE-2019-1549",
|
||||
"severity": "Medium",
|
||||
"confidence": "Unknown",
|
||||
"solution": "Upgrade libcrypto1.1 to 1.1.1d-r0",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
"name": "libcrypto1.1"
|
||||
},
|
||||
"version": "1.1.1c-r0"
|
||||
},
|
||||
"operating_system": "Unknown",
|
||||
"image": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)"
|
||||
},
|
||||
"identifiers": [
|
||||
{
|
||||
"type": "cve",
|
||||
"name": "CVE-2019-1549",
|
||||
"value": "CVE-2019-1549",
|
||||
"url": "https://avd.aquasec.com/nvd/cve-2019-1549"
|
||||
}
|
||||
],
|
||||
"links": [{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be"
|
||||
},{
|
||||
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GY6SNRJP2S7Y42GIIDO3HXPNMDYN2U3A/"
|
||||
},{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190919-0002/"
|
||||
},{
|
||||
"url": "https://support.f5.com/csp/article/K44070243"
|
||||
},{
|
||||
"url": "https://www.openssl.org/news/secadv/20190910.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1551",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"cve": "CVE-2019-1551",
|
||||
"severity": "Medium",
|
||||
"confidence": "Unknown",
|
||||
"solution": "Upgrade libcrypto1.1 to 1.1.1d-r2",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
"name": "libcrypto1.1"
|
||||
},
|
||||
"version": "1.1.1c-r0"
|
||||
},
|
||||
"operating_system": "Unknown",
|
||||
"image": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)"
|
||||
},
|
||||
"identifiers": [
|
||||
{
|
||||
"type": "cve",
|
||||
"name": "CVE-2019-1551",
|
||||
"value": "CVE-2019-1551",
|
||||
"url": "https://avd.aquasec.com/nvd/cve-2019-1551"
|
||||
}
|
||||
],
|
||||
"links": [{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html"
|
||||
},{
|
||||
"url": "http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html"
|
||||
},{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98"
|
||||
},{
|
||||
"url": "https://github.com/openssl/openssl/pull/10575"
|
||||
},{
|
||||
"url": "https://seclists.org/bugtraq/2019/Dec/39"
|
||||
},{
|
||||
"url": "https://seclists.org/bugtraq/2019/Dec/46"
|
||||
},{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20191210-0001/"
|
||||
},{
|
||||
"url": "https://www.debian.org/security/2019/dsa-4594"
|
||||
},{
|
||||
"url": "https://www.openssl.org/news/secadv/20191206.txt"
|
||||
},{
|
||||
"url": "https://www.tenable.com/security/tns-2019-09"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1563",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"cve": "CVE-2019-1563",
|
||||
"severity": "Medium",
|
||||
"confidence": "Unknown",
|
||||
"solution": "Upgrade libcrypto1.1 to 1.1.1d-r0",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
"name": "libcrypto1.1"
|
||||
},
|
||||
"version": "1.1.1c-r0"
|
||||
},
|
||||
"operating_system": "Unknown",
|
||||
"image": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)"
|
||||
},
|
||||
"identifiers": [
|
||||
{
|
||||
"type": "cve",
|
||||
"name": "CVE-2019-1563",
|
||||
"value": "CVE-2019-1563",
|
||||
"url": "https://avd.aquasec.com/nvd/cve-2019-1563"
|
||||
}
|
||||
],
|
||||
"links": [{
|
||||
"url": "http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html"
|
||||
},{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f"
|
||||
},{
|
||||
"url": "https://seclists.org/bugtraq/2019/Sep/25"
|
||||
},{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190919-0002/"
|
||||
},{
|
||||
"url": "https://www.openssl.org/news/secadv/20190910.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1547",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: side-channel weak encryption vulnerability",
|
||||
"description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"cve": "CVE-2019-1547",
|
||||
"severity": "Low",
|
||||
"confidence": "Unknown",
|
||||
"solution": "Upgrade libcrypto1.1 to 1.1.1d-r0",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
"name": "libcrypto1.1"
|
||||
},
|
||||
"version": "1.1.1c-r0"
|
||||
},
|
||||
"operating_system": "Unknown",
|
||||
"image": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)"
|
||||
},
|
||||
"identifiers": [
|
||||
{
|
||||
"type": "cve",
|
||||
"name": "CVE-2019-1547",
|
||||
"value": "CVE-2019-1547",
|
||||
"url": "https://avd.aquasec.com/nvd/cve-2019-1547"
|
||||
}
|
||||
],
|
||||
"links": [{
|
||||
"url": "http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html"
|
||||
},{
|
||||
"url": "https://arxiv.org/abs/1909.01785"
|
||||
},{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a"
|
||||
},{
|
||||
"url": "https://seclists.org/bugtraq/2019/Sep/25"
|
||||
},{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190919-0002/"
|
||||
},{
|
||||
"url": "https://www.openssl.org/news/secadv/20190910.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1549",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: information disclosure in fork()",
|
||||
"description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"cve": "CVE-2019-1549",
|
||||
"severity": "Medium",
|
||||
"confidence": "Unknown",
|
||||
"solution": "Upgrade libssl1.1 to 1.1.1d-r0",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
"name": "libssl1.1"
|
||||
},
|
||||
"version": "1.1.1c-r0"
|
||||
},
|
||||
"operating_system": "Unknown",
|
||||
"image": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)"
|
||||
},
|
||||
"identifiers": [
|
||||
{
|
||||
"type": "cve",
|
||||
"name": "CVE-2019-1549",
|
||||
"value": "CVE-2019-1549",
|
||||
"url": "https://avd.aquasec.com/nvd/cve-2019-1549"
|
||||
}
|
||||
],
|
||||
"links": [{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be"
|
||||
},{
|
||||
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GY6SNRJP2S7Y42GIIDO3HXPNMDYN2U3A/"
|
||||
},{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190919-0002/"
|
||||
},{
|
||||
"url": "https://support.f5.com/csp/article/K44070243"
|
||||
},{
|
||||
"url": "https://www.openssl.org/news/secadv/20190910.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1551",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"cve": "CVE-2019-1551",
|
||||
"severity": "Medium",
|
||||
"confidence": "Unknown",
|
||||
"solution": "Upgrade libssl1.1 to 1.1.1d-r2",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
"name": "libssl1.1"
|
||||
},
|
||||
"version": "1.1.1c-r0"
|
||||
},
|
||||
"operating_system": "Unknown",
|
||||
"image": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)"
|
||||
},
|
||||
"identifiers": [
|
||||
{
|
||||
"type": "cve",
|
||||
"name": "CVE-2019-1551",
|
||||
"value": "CVE-2019-1551",
|
||||
"url": "https://avd.aquasec.com/nvd/cve-2019-1551"
|
||||
}
|
||||
],
|
||||
"links": [{
|
||||
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html"
|
||||
},{
|
||||
"url": "http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html"
|
||||
},{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98"
|
||||
},{
|
||||
"url": "https://github.com/openssl/openssl/pull/10575"
|
||||
},{
|
||||
"url": "https://seclists.org/bugtraq/2019/Dec/39"
|
||||
},{
|
||||
"url": "https://seclists.org/bugtraq/2019/Dec/46"
|
||||
},{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20191210-0001/"
|
||||
},{
|
||||
"url": "https://www.debian.org/security/2019/dsa-4594"
|
||||
},{
|
||||
"url": "https://www.openssl.org/news/secadv/20191206.txt"
|
||||
},{
|
||||
"url": "https://www.tenable.com/security/tns-2019-09"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1563",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"cve": "CVE-2019-1563",
|
||||
"severity": "Medium",
|
||||
"confidence": "Unknown",
|
||||
"solution": "Upgrade libssl1.1 to 1.1.1d-r0",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
"name": "libssl1.1"
|
||||
},
|
||||
"version": "1.1.1c-r0"
|
||||
},
|
||||
"operating_system": "Unknown",
|
||||
"image": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)"
|
||||
},
|
||||
"identifiers": [
|
||||
{
|
||||
"type": "cve",
|
||||
"name": "CVE-2019-1563",
|
||||
"value": "CVE-2019-1563",
|
||||
"url": "https://avd.aquasec.com/nvd/cve-2019-1563"
|
||||
}
|
||||
],
|
||||
"links": [{
|
||||
"url": "http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html"
|
||||
},{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f"
|
||||
},{
|
||||
"url": "https://seclists.org/bugtraq/2019/Sep/25"
|
||||
},{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190919-0002/"
|
||||
},{
|
||||
"url": "https://www.openssl.org/news/secadv/20190910.txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CVE-2019-1547",
|
||||
"category": "container_scanning",
|
||||
"message": "openssl: side-channel weak encryption vulnerability",
|
||||
"description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"cve": "CVE-2019-1547",
|
||||
"severity": "Low",
|
||||
"confidence": "Unknown",
|
||||
"solution": "Upgrade libssl1.1 to 1.1.1d-r0",
|
||||
"scanner": {
|
||||
"id": "trivy",
|
||||
"name": "trivy"
|
||||
},
|
||||
"location": {
|
||||
"dependency": {
|
||||
"package": {
|
||||
"name": "libssl1.1"
|
||||
},
|
||||
"version": "1.1.1c-r0"
|
||||
},
|
||||
"operating_system": "Unknown",
|
||||
"image": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)"
|
||||
},
|
||||
"identifiers": [
|
||||
{
|
||||
"type": "cve",
|
||||
"name": "CVE-2019-1547",
|
||||
"value": "CVE-2019-1547",
|
||||
"url": "https://avd.aquasec.com/nvd/cve-2019-1547"
|
||||
}
|
||||
],
|
||||
"links": [{
|
||||
"url": "http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html"
|
||||
},{
|
||||
"url": "https://arxiv.org/abs/1909.01785"
|
||||
},{
|
||||
"url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8"
|
||||
},{
|
||||
"url": "https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a"
|
||||
},{
|
||||
"url": "https://seclists.org/bugtraq/2019/Sep/25"
|
||||
},{
|
||||
"url": "https://security.netapp.com/advisory/ntap-20190919-0002/"
|
||||
},{
|
||||
"url": "https://www.openssl.org/news/secadv/20190910.txt"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"remediations": []
|
||||
}
|
||||
149
integration/testdata/alpine-310.json.golden
vendored
149
integration/testdata/alpine-310.json.golden
vendored
@@ -1,12 +1,18 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/alpine-310.tar.gz (alpine 3.10.2)",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -19,11 +25,44 @@
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -40,9 +79,113 @@
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GY6SNRJP2S7Y42GIIDO3HXPNMDYN2U3A/",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://support.f5.com/csp/article/K44070243",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1c-r0",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:03901b4a2ea88eeaad62dbe59b072b28b6efa00491962b8741081c5df50c65e0"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
|
||||
353
integration/testdata/alpine-310.sarif.golden
vendored
Normal file
353
integration/testdata/alpine-310.sarif.golden
vendored
Normal file
@@ -0,0 +1,353 @@
|
||||
{
|
||||
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.4.json",
|
||||
"version": "2.1.0",
|
||||
"runs": [
|
||||
{
|
||||
"tool": {
|
||||
"driver": {
|
||||
"name": "Trivy",
|
||||
"fullName": "Trivy Vulnerability Scanner",
|
||||
"rules": [
|
||||
{
|
||||
"id": "[MEDIUM] CVE-2019-1549",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": "CVE-2019-1549 Package: libcrypto1.1"
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": "openssl: information disclosure in fork()."
|
||||
},
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1549\nSeverity: MEDIUM\nPackage: libcrypto1.1\nInstalled Version: 1.1.1c-r0\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)",
|
||||
"markdown": "**Vulnerability CVE-2019-1549**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|MEDIUM|libcrypto1.1|1.1.1c-r0|1.1.1d-r0|[CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)|\n"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"MEDIUM",
|
||||
"libcrypto1.1"
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "[MEDIUM] CVE-2019-1551",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": "CVE-2019-1551 Package: libcrypto1.1"
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64."
|
||||
},
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1551\nSeverity: MEDIUM\nPackage: libcrypto1.1\nInstalled Version: 1.1.1c-r0\nFixed Version: 1.1.1d-r2\nLink: [CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)",
|
||||
"markdown": "**Vulnerability CVE-2019-1551**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|MEDIUM|libcrypto1.1|1.1.1c-r0|1.1.1d-r2|[CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)|\n"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"MEDIUM",
|
||||
"libcrypto1.1"
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "[MEDIUM] CVE-2019-1563",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": "CVE-2019-1563 Package: libcrypto1.1"
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey."
|
||||
},
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1563\nSeverity: MEDIUM\nPackage: libcrypto1.1\nInstalled Version: 1.1.1c-r0\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1563](https://avd.aquasec.com/nvd/cve-2019-1563)",
|
||||
"markdown": "**Vulnerability CVE-2019-1563**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|MEDIUM|libcrypto1.1|1.1.1c-r0|1.1.1d-r0|[CVE-2019-1563](https://avd.aquasec.com/nvd/cve-2019-1563)|\n"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"MEDIUM",
|
||||
"libcrypto1.1"
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "[LOW] CVE-2019-1547",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": "CVE-2019-1547 Package: libcrypto1.1"
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": "openssl: side-channel weak encryption vulnerability."
|
||||
},
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1547\nSeverity: LOW\nPackage: libcrypto1.1\nInstalled Version: 1.1.1c-r0\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1547](https://avd.aquasec.com/nvd/cve-2019-1547)",
|
||||
"markdown": "**Vulnerability CVE-2019-1547**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|LOW|libcrypto1.1|1.1.1c-r0|1.1.1d-r0|[CVE-2019-1547](https://avd.aquasec.com/nvd/cve-2019-1547)|\n"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"LOW",
|
||||
"libcrypto1.1"
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "[MEDIUM] CVE-2019-1549",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": "CVE-2019-1549 Package: libssl1.1"
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": "openssl: information disclosure in fork()."
|
||||
},
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1549\nSeverity: MEDIUM\nPackage: libssl1.1\nInstalled Version: 1.1.1c-r0\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)",
|
||||
"markdown": "**Vulnerability CVE-2019-1549**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|MEDIUM|libssl1.1|1.1.1c-r0|1.1.1d-r0|[CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)|\n"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"MEDIUM",
|
||||
"libssl1.1"
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "[MEDIUM] CVE-2019-1551",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": "CVE-2019-1551 Package: libssl1.1"
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64."
|
||||
},
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1551\nSeverity: MEDIUM\nPackage: libssl1.1\nInstalled Version: 1.1.1c-r0\nFixed Version: 1.1.1d-r2\nLink: [CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)",
|
||||
"markdown": "**Vulnerability CVE-2019-1551**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|MEDIUM|libssl1.1|1.1.1c-r0|1.1.1d-r2|[CVE-2019-1551](https://avd.aquasec.com/nvd/cve-2019-1551)|\n"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"MEDIUM",
|
||||
"libssl1.1"
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "[MEDIUM] CVE-2019-1563",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": "CVE-2019-1563 Package: libssl1.1"
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey."
|
||||
},
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1563\nSeverity: MEDIUM\nPackage: libssl1.1\nInstalled Version: 1.1.1c-r0\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1563](https://avd.aquasec.com/nvd/cve-2019-1563)",
|
||||
"markdown": "**Vulnerability CVE-2019-1563**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|MEDIUM|libssl1.1|1.1.1c-r0|1.1.1d-r0|[CVE-2019-1563](https://avd.aquasec.com/nvd/cve-2019-1563)|\n"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"MEDIUM",
|
||||
"libssl1.1"
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "[LOW] CVE-2019-1547",
|
||||
"name": "dockerfile_scan",
|
||||
"shortDescription": {
|
||||
"text": "CVE-2019-1547 Package: libssl1.1"
|
||||
},
|
||||
"fullDescription": {
|
||||
"text": "openssl: side-channel weak encryption vulnerability."
|
||||
},
|
||||
"help": {
|
||||
"text": "Vulnerability CVE-2019-1547\nSeverity: LOW\nPackage: libssl1.1\nInstalled Version: 1.1.1c-r0\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1547](https://avd.aquasec.com/nvd/cve-2019-1547)",
|
||||
"markdown": "**Vulnerability CVE-2019-1547**\n| Severity | Package | Installed Version | Fixed Version | Link |\n| --- | --- | --- | --- | --- |\n|LOW|libssl1.1|1.1.1c-r0|1.1.1d-r0|[CVE-2019-1547](https://avd.aquasec.com/nvd/cve-2019-1547)|\n"
|
||||
},
|
||||
"properties": {
|
||||
"tags": [
|
||||
"vulnerability",
|
||||
"LOW",
|
||||
"libssl1.1"
|
||||
],
|
||||
"precision": "very-high"
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"ruleId": "[MEDIUM] CVE-2019-1549",
|
||||
"ruleIndex": 0,
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c)."
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ruleId": "[MEDIUM] CVE-2019-1551",
|
||||
"ruleIndex": 1,
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t)."
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ruleId": "[MEDIUM] CVE-2019-1563",
|
||||
"ruleIndex": 2,
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s)."
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ruleId": "[LOW] CVE-2019-1547",
|
||||
"ruleIndex": 3,
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s)."
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ruleId": "[MEDIUM] CVE-2019-1549",
|
||||
"ruleIndex": 4,
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c)."
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ruleId": "[MEDIUM] CVE-2019-1551",
|
||||
"ruleIndex": 5,
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t)."
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ruleId": "[MEDIUM] CVE-2019-1563",
|
||||
"ruleIndex": 6,
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s)."
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ruleId": "[LOW] CVE-2019-1547",
|
||||
"ruleIndex": 7,
|
||||
"level": "error",
|
||||
"message": {
|
||||
"text": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s)."
|
||||
},
|
||||
"locations": [{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "Dockerfile"
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 1
|
||||
}
|
||||
}
|
||||
}]
|
||||
}],
|
||||
"columnKind": "utf16CodeUnits"
|
||||
}
|
||||
]
|
||||
}
|
||||
197
integration/testdata/alpine-39.json.golden
vendored
197
integration/testdata/alpine-39.json.golden
vendored
@@ -1,24 +1,18 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/alpine-39.tar.gz (alpine 3.9.4)",
|
||||
"Type": "alpine",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-14697",
|
||||
"PkgName": "musl",
|
||||
"InstalledVersion": "1.1.20-r4",
|
||||
"FixedVersion": "1.1.20-r5",
|
||||
"Description": "musl libc through 1.1.23 has an x87 floating-point stack adjustment imbalance, related to the math/i386/ directory. In some cases, use of this library could introduce out-of-bounds writes that are not present in an application's source code.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://www.openwall.com/lists/oss-security/2019/08/06/4",
|
||||
"https://www.openwall.com/lists/musl/2019/08/06/1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1b-r1",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -31,11 +25,44 @@
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1b-r1",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1b-r1",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -52,9 +79,14 @@
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "openssl",
|
||||
"PkgName": "libcrypto1.1",
|
||||
"InstalledVersion": "1.1.1b-r1",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
@@ -69,6 +101,141 @@
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1549",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1b-r1",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1549",
|
||||
"Title": "openssl: information disclosure in fork()",
|
||||
"Description": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1549",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GY6SNRJP2S7Y42GIIDO3HXPNMDYN2U3A/",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://support.f5.com/csp/article/K44070243",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1b-r1",
|
||||
"FixedVersion": "1.1.1d-r2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1b-r1",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.1b-r1",
|
||||
"FixedVersion": "1.1.1d-r0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-14697",
|
||||
"PkgName": "musl",
|
||||
"InstalledVersion": "1.1.20-r4",
|
||||
"FixedVersion": "1.1.20-r5",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-14697",
|
||||
"Description": "musl libc through 1.1.23 has an x87 floating-point stack adjustment imbalance, related to the math/i386/ directory. In some cases, use of this library could introduce out-of-bounds writes that are not present in an application's source code.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://www.openwall.com/lists/oss-security/2019/08/06/4",
|
||||
"https://security.gentoo.org/glsa/202003-13",
|
||||
"https://www.openwall.com/lists/musl/2019/08/06/1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-14697",
|
||||
"PkgName": "musl-utils",
|
||||
"InstalledVersion": "1.1.20-r4",
|
||||
"FixedVersion": "1.1.20-r5",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f1b5933fe4b5f49bbe8258745cf396afe07e625bdab3168e364daf7c956b6b81"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-14697",
|
||||
"Description": "musl libc through 1.1.23 has an x87 floating-point stack adjustment imbalance, related to the math/i386/ directory. In some cases, use of this library could introduce out-of-bounds writes that are not present in an application's source code.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://www.openwall.com/lists/oss-security/2019/08/06/4",
|
||||
"https://security.gentoo.org/glsa/202003-13",
|
||||
"https://www.openwall.com/lists/musl/2019/08/06/1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
1096
integration/testdata/amazon-1.json.golden
vendored
1096
integration/testdata/amazon-1.json.golden
vendored
File diff suppressed because it is too large
Load Diff
1362
integration/testdata/amazon-2.json.golden
vendored
1362
integration/testdata/amazon-2.json.golden
vendored
File diff suppressed because it is too large
Load Diff
135
integration/testdata/busybox-with-lockfile.json.golden
vendored
Normal file
135
integration/testdata/busybox-with-lockfile.json.golden
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
[
|
||||
{
|
||||
"Target": "Cargo.lock",
|
||||
"Type": "cargo",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "RUSTSEC-2019-0001",
|
||||
"PkgName": "ammonia",
|
||||
"InstalledVersion": "1.9.0",
|
||||
"FixedVersion": "\u003e= 2.1.0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:ea6f6933da66090da8bfe233d68f083792a68f944cd2d8f9fbb52da795813a4f"
|
||||
},
|
||||
"PrimaryURL": "https://rustsec.org/advisories/RUSTSEC-2019-0001",
|
||||
"Title": "Uncontrolled recursion leads to abort in HTML serialization",
|
||||
"Description": "Affected versions of this crate did use recursion for serialization of HTML\nDOM trees.\n\nThis allows an attacker to cause abort due to stack overflow by providing\na pathologically nested input.\n\nThe flaw was corrected by serializing the DOM tree iteratively instead.",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"https://github.com/rust-ammonia/ammonia/blob/master/CHANGELOG.md#210"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "RUSTSEC-2016-0001",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "0.8.3",
|
||||
"FixedVersion": "\u003e= 0.9.0",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:ea6f6933da66090da8bfe233d68f083792a68f944cd2d8f9fbb52da795813a4f"
|
||||
},
|
||||
"PrimaryURL": "https://rustsec.org/advisories/RUSTSEC-2016-0001",
|
||||
"Title": "SSL/TLS MitM vulnerability due to insecure defaults",
|
||||
"Description": "All versions of rust-openssl prior to 0.9.0 contained numerous insecure defaults\nincluding off-by-default certificate verification and no API to perform hostname\nverification.\n\nUnless configured correctly by a developer, these defaults could allow an attacker\nto perform man-in-the-middle attacks.\n\nThe problem was addressed in newer versions by enabling certificate verification\nby default and exposing APIs to perform hostname verification. Use the\n`SslConnector` and `SslAcceptor` types to take advantage of these new features\n(as opposed to the lower-level `SslContext` type).",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"https://github.com/sfackler/rust-openssl/releases/tag/v0.9.0"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "RUSTSEC-2019-0035",
|
||||
"PkgName": "rand_core",
|
||||
"InstalledVersion": "0.3.1",
|
||||
"FixedVersion": "\u003e= 0.4.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:ea6f6933da66090da8bfe233d68f083792a68f944cd2d8f9fbb52da795813a4f"
|
||||
},
|
||||
"PrimaryURL": "https://rustsec.org/advisories/RUSTSEC-2019-0035",
|
||||
"Title": "Unaligned memory access",
|
||||
"Description": "Affected versions of this crate violated alignment when casting byte slices to\ninteger slices, resulting in undefined behavior.\n\nThe flaw was corrected by Ralf Jung and Diggory Hardy.",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"https://github.com/rust-random/rand/blob/master/rand_core/CHANGELOG.md#050---2019-06-06"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "RUSTSEC-2019-0035",
|
||||
"PkgName": "rand_core",
|
||||
"InstalledVersion": "0.4.0",
|
||||
"FixedVersion": "\u003e= 0.4.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:ea6f6933da66090da8bfe233d68f083792a68f944cd2d8f9fbb52da795813a4f"
|
||||
},
|
||||
"PrimaryURL": "https://rustsec.org/advisories/RUSTSEC-2019-0035",
|
||||
"Title": "Unaligned memory access",
|
||||
"Description": "Affected versions of this crate violated alignment when casting byte slices to\ninteger slices, resulting in undefined behavior.\n\nThe flaw was corrected by Ralf Jung and Diggory Hardy.",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"https://github.com/rust-random/rand/blob/master/rand_core/CHANGELOG.md#050---2019-06-06"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "RUSTSEC-2018-0018",
|
||||
"PkgName": "smallvec",
|
||||
"InstalledVersion": "0.6.9",
|
||||
"FixedVersion": "\u003e= 0.6.13",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:ea6f6933da66090da8bfe233d68f083792a68f944cd2d8f9fbb52da795813a4f"
|
||||
},
|
||||
"PrimaryURL": "https://rustsec.org/advisories/RUSTSEC-2018-0018",
|
||||
"Title": "smallvec creates uninitialized value of any type",
|
||||
"Description": "Affected versions of this crate called `mem::uninitialized()` to create values of a user-supplied type `T`.\nThis is unsound e.g. if `T` is a reference type (which must be non-null and thus may not remain uninitialized).\n \nThe flaw was corrected by avoiding the use of `mem::uninitialized()`, using `MaybeUninit` instead.",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"https://github.com/servo/rust-smallvec/issues/126"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "RUSTSEC-2019-0009",
|
||||
"PkgName": "smallvec",
|
||||
"InstalledVersion": "0.6.9",
|
||||
"FixedVersion": "\u003e= 0.6.10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:ea6f6933da66090da8bfe233d68f083792a68f944cd2d8f9fbb52da795813a4f"
|
||||
},
|
||||
"PrimaryURL": "https://rustsec.org/advisories/RUSTSEC-2019-0009",
|
||||
"Title": "Double-free and use-after-free in SmallVec::grow()",
|
||||
"Description": "Attempting to call `grow` on a spilled SmallVec with a value equal to the current capacity causes it to free the existing data. This performs a double free immediately and may lead to use-after-free on subsequent accesses to the SmallVec contents.\n\nAn attacker that controls the value passed to `grow` may exploit this flaw to obtain memory contents or gain remote code execution.\n\nCredits to @ehuss for discovering, reporting and fixing the bug.",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"https://github.com/servo/rust-smallvec/issues/148"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "RUSTSEC-2019-0012",
|
||||
"PkgName": "smallvec",
|
||||
"InstalledVersion": "0.6.9",
|
||||
"FixedVersion": "\u003e= 0.6.10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:ea6f6933da66090da8bfe233d68f083792a68f944cd2d8f9fbb52da795813a4f"
|
||||
},
|
||||
"PrimaryURL": "https://rustsec.org/advisories/RUSTSEC-2019-0012",
|
||||
"Title": "Memory corruption in SmallVec::grow()",
|
||||
"Description": "Attempting to call `grow` on a spilled SmallVec with a value less than the current capacity causes corruption of memory allocator data structures.\n\nAn attacker that controls the value passed to `grow` may exploit this flaw to obtain memory contents or gain remote code execution.\n\nCredits to @ehuss for discovering, reporting and fixing the bug.",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"https://github.com/servo/rust-smallvec/issues/149"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "RUSTSEC-2018-0017",
|
||||
"PkgName": "tempdir",
|
||||
"InstalledVersion": "0.3.7",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:ea6f6933da66090da8bfe233d68f083792a68f944cd2d8f9fbb52da795813a4f"
|
||||
},
|
||||
"PrimaryURL": "https://rustsec.org/advisories/RUSTSEC-2018-0017",
|
||||
"Title": "`tempdir` crate has been deprecated; use `tempfile` instead",
|
||||
"Description": "The [`tempdir`](https://crates.io/crates/tempdir) crate has been deprecated\nand the functionality is merged into [`tempfile`](https://crates.io/crates/tempfile).",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"https://github.com/rust-lang-deprecated/tempdir/pull/46"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
11843
integration/testdata/centos-6.json.golden
vendored
11843
integration/testdata/centos-6.json.golden
vendored
File diff suppressed because it is too large
Load Diff
144
integration/testdata/centos-7-critical.json.golden
vendored
144
integration/testdata/centos-7-critical.json.golden
vendored
@@ -1,144 +0,0 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/centos-7.tar.gz (centos 7.6.1810)",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-14618",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.29.0-51.el7",
|
||||
"FixedVersion": "7.29.0-51.el7_6.3",
|
||||
"Title": "curl: NTLM password overflow via integer overflow",
|
||||
"Description": "curl before version 7.61.1 is vulnerable to a buffer overrun in the NTLM authentication code. The internal function Curl_ntlm_core_mk_nt_hash multiplies the length of the password by two (SUM) to figure out how large temporary storage area to allocate from the heap. The length value is then subsequently used to iterate over the password and generate output into the allocated storage buffer. On systems with a 32 bit size_t, the math to calculate SUM triggers an integer overflow when the password length exceeds 2GB (2^31 bytes). This integer overflow usually causes a very small buffer to actually get allocated instead of the intended very huge one, making the use of that buffer end up in a heap buffer overflow. (This bug is almost identical to CVE-2017-8816.)",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://www.securitytracker.com/id/1041605",
|
||||
"https://access.redhat.com/errata/RHSA-2018:3558",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-14618",
|
||||
"https://cert-portal.siemens.com/productcert/pdf/ssa-436177.pdf",
|
||||
"https://curl.haxx.se/docs/CVE-2018-14618.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14618",
|
||||
"https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2018-0014",
|
||||
"https://security.gentoo.org/glsa/201903-03",
|
||||
"https://usn.ubuntu.com/3765-1/",
|
||||
"https://usn.ubuntu.com/3765-2/",
|
||||
"https://www.debian.org/security/2018/dsa-4286"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-14618",
|
||||
"PkgName": "libcurl",
|
||||
"InstalledVersion": "7.29.0-51.el7",
|
||||
"FixedVersion": "7.29.0-51.el7_6.3",
|
||||
"Title": "curl: NTLM password overflow via integer overflow",
|
||||
"Description": "curl before version 7.61.1 is vulnerable to a buffer overrun in the NTLM authentication code. The internal function Curl_ntlm_core_mk_nt_hash multiplies the length of the password by two (SUM) to figure out how large temporary storage area to allocate from the heap. The length value is then subsequently used to iterate over the password and generate output into the allocated storage buffer. On systems with a 32 bit size_t, the math to calculate SUM triggers an integer overflow when the password length exceeds 2GB (2^31 bytes). This integer overflow usually causes a very small buffer to actually get allocated instead of the intended very huge one, making the use of that buffer end up in a heap buffer overflow. (This bug is almost identical to CVE-2017-8816.)",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://www.securitytracker.com/id/1041605",
|
||||
"https://access.redhat.com/errata/RHSA-2018:3558",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-14618",
|
||||
"https://cert-portal.siemens.com/productcert/pdf/ssa-436177.pdf",
|
||||
"https://curl.haxx.se/docs/CVE-2018-14618.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-14618",
|
||||
"https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2018-0014",
|
||||
"https://security.gentoo.org/glsa/201903-03",
|
||||
"https://usn.ubuntu.com/3765-1/",
|
||||
"https://usn.ubuntu.com/3765-2/",
|
||||
"https://www.debian.org/security/2018/dsa-4286"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-3855",
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.4.3-12.el7",
|
||||
"FixedVersion": "1.4.3-12.el7_6.2",
|
||||
"Title": "libssh2: Integer overflow in transport read resulting in out of bounds write",
|
||||
"Description": "An integer overflow flaw which could lead to an out of bounds write was discovered in libssh2 before 1.8.1 in the way packets are read from the server. A remote attacker who compromises a SSH server may be able to execute code on the client system when a user connects to the server.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00040.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00003.html",
|
||||
"http://packetstormsecurity.com/files/152136/Slackware-Security-Advisory-libssh2-Updates.html",
|
||||
"http://www.openwall.com/lists/oss-security/2019/03/18/3",
|
||||
"http://www.securityfocus.com/bid/107485",
|
||||
"https://access.redhat.com/errata/RHSA-2019:0679",
|
||||
"https://access.redhat.com/errata/RHSA-2019:1175",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3855",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3855",
|
||||
"https://lists.debian.org/debian-lts-announce/2019/03/msg00032.html",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5DK6VO2CEUTAJFYIKWNZKEKYMYR3NO2O/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XCWEA5ZCLKRDUK62QVVYMFWLWKOPX3LO/",
|
||||
"https://seclists.org/bugtraq/2019/Apr/25",
|
||||
"https://seclists.org/bugtraq/2019/Mar/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190327-0005/",
|
||||
"https://www.broadcom.com/support/fibre-channel-networking/security-advisories/brocade-security-advisory-2019-767",
|
||||
"https://www.debian.org/security/2019/dsa-4431",
|
||||
"https://www.libssh2.org/CVE-2019-3855.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-15686",
|
||||
"PkgName": "systemd",
|
||||
"InstalledVersion": "219-62.el7_6.5",
|
||||
"FixedVersion": "219-67.el7",
|
||||
"Title": "systemd: line splitting via fgets() allows for state injection during daemon-reexec",
|
||||
"Description": "A vulnerability in unit_deserialize of systemd allows an attacker to supply arbitrary state across systemd re-execution via NotifyAccess. This can be used to improperly influence systemd execution and possibly lead to root privilege escalation. Affected releases are systemd versions up to and including 239.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/105747",
|
||||
"https://access.redhat.com/errata/RHSA-2019:2091",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-15686",
|
||||
"https://github.com/systemd/systemd/pull/10519",
|
||||
"https://lists.debian.org/debian-lts-announce/2018/11/msg00017.html",
|
||||
"https://security.gentoo.org/glsa/201810-10",
|
||||
"https://usn.ubuntu.com/3816-1/",
|
||||
"https://www.exploit-db.com/exploits/45714/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-15686",
|
||||
"PkgName": "systemd-libs",
|
||||
"InstalledVersion": "219-62.el7_6.5",
|
||||
"FixedVersion": "219-67.el7",
|
||||
"Title": "systemd: line splitting via fgets() allows for state injection during daemon-reexec",
|
||||
"Description": "A vulnerability in unit_deserialize of systemd allows an attacker to supply arbitrary state across systemd re-execution via NotifyAccess. This can be used to improperly influence systemd execution and possibly lead to root privilege escalation. Affected releases are systemd versions up to and including 239.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/105747",
|
||||
"https://access.redhat.com/errata/RHSA-2019:2091",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-15686",
|
||||
"https://github.com/systemd/systemd/pull/10519",
|
||||
"https://lists.debian.org/debian-lts-announce/2018/11/msg00017.html",
|
||||
"https://security.gentoo.org/glsa/201810-10",
|
||||
"https://usn.ubuntu.com/3816-1/",
|
||||
"https://www.exploit-db.com/exploits/45714/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-12735",
|
||||
"PkgName": "vim-minimal",
|
||||
"InstalledVersion": "2:7.4.160-5.el7",
|
||||
"FixedVersion": "2:7.4.160-6.el7_6",
|
||||
"Title": "vim/neovim: ':source!' command allows arbitrary command execution via modelines",
|
||||
"Description": "getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via the :source! command in a modeline, as demonstrated by execute in Vim, and assert_fails or nvim_input in Neovim.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00031.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00036.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00037.html",
|
||||
"http://www.securityfocus.com/bid/108724",
|
||||
"https://bugs.debian.org/930020",
|
||||
"https://bugs.debian.org/930024",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12735",
|
||||
"https://github.com/neovim/neovim/pull/10082",
|
||||
"https://github.com/numirias/security/blob/master/doc/2019-06-04_ace-vim-neovim.md",
|
||||
"https://github.com/vim/vim/commit/53575521406739cf20bbe4e384d88e7dca11f040",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2BMDSHTF754TITC6AQJPCS5IRIDMMIM7/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TRIRBC2YRGKPAWVRMZS4SZTGGCVRVZPR/",
|
||||
"https://usn.ubuntu.com/4016-1/",
|
||||
"https://usn.ubuntu.com/4016-2/",
|
||||
"https://www.debian.org/security/2019/dsa-4467"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
1577
integration/testdata/centos-7-ignore-unfixed.json.golden
vendored
1577
integration/testdata/centos-7-ignore-unfixed.json.golden
vendored
File diff suppressed because it is too large
Load Diff
1581
integration/testdata/centos-7-low-high.json.golden
vendored
1581
integration/testdata/centos-7-low-high.json.golden
vendored
File diff suppressed because it is too large
Load Diff
16209
integration/testdata/centos-7.json.golden
vendored
16209
integration/testdata/centos-7.json.golden
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,19 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/debian-buster.tar.gz (debian 10.1)",
|
||||
"Type": "debian",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5094",
|
||||
"PkgName": "e2fsprogs",
|
||||
"InstalledVersion": "1.44.5-1+deb10u1",
|
||||
"FixedVersion": "1.44.5-1+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -18,11 +25,39 @@
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "e2fsprogs",
|
||||
"InstalledVersion": "1.44.5-1+deb10u1",
|
||||
"FixedVersion": "1.44.5-1+deb10u3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5094",
|
||||
"PkgName": "libcom-err2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u1",
|
||||
"FixedVersion": "1.44.5-1+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -34,11 +69,39 @@
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libcom-err2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u1",
|
||||
"FixedVersion": "1.44.5-1+deb10u3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5094",
|
||||
"PkgName": "libext2fs2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u1",
|
||||
"FixedVersion": "1.44.5-1+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -50,11 +113,104 @@
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libext2fs2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u1",
|
||||
"FixedVersion": "1.44.5-1+deb10u3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-18224",
|
||||
"PkgName": "libidn2-0",
|
||||
"InstalledVersion": "2.0.5-1",
|
||||
"FixedVersion": "2.0.5-1+deb10u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-18224",
|
||||
"Title": "libidn2: heap-based buffer overflow in idn2_to_ascii_4i in lib/lookup.c",
|
||||
"Description": "idn2_to_ascii_4i in lib/lookup.c in GNU libidn2 before 2.1.1 has a heap-based buffer overflow via a long domain string.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12420",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18224",
|
||||
"https://github.com/libidn/libidn2/commit/e4d1558aa2c1c04a05066ee8600f37603890ba8c",
|
||||
"https://github.com/libidn/libidn2/compare/libidn2-2.1.0...libidn2-2.1.1",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JDQVQ2XPV5BTZUFINT7AFJSKNNBVURNJ/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MINU5RKDFE6TKAFY5DRFN3WSFDS4DYVS/",
|
||||
"https://usn.ubuntu.com/4168-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17594",
|
||||
"PkgName": "libncursesw6",
|
||||
"InstalledVersion": "6.1+20181013-2+deb10u1",
|
||||
"FixedVersion": "6.1+20181013-2+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17594",
|
||||
"Title": "ncurses: heap-based buffer overflow in the _nc_find_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the _nc_find_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17594",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00017.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17595",
|
||||
"PkgName": "libncursesw6",
|
||||
"InstalledVersion": "6.1+20181013-2+deb10u1",
|
||||
"FixedVersion": "6.1+20181013-2+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17595",
|
||||
"Title": "ncurses: heap-based buffer overflow in the fmt_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the fmt_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17595",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00013.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5094",
|
||||
"PkgName": "libss2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u1",
|
||||
"FixedVersion": "1.44.5-1+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -65,6 +221,202 @@
|
||||
"https://usn.ubuntu.com/4142-2/",
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libss2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u1",
|
||||
"FixedVersion": "1.44.5-1+deb10u3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-15718",
|
||||
"PkgName": "libsystemd0",
|
||||
"InstalledVersion": "241-7~deb10u1",
|
||||
"FixedVersion": "241-7~deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-15718",
|
||||
"Title": "systemd: systemd-resolved allows unprivileged users to configure DNS",
|
||||
"Description": "In systemd 240, bus_open_system_watch_bind_with_description in shared/bus-util.c (as used by systemd-resolved to connect to the system D-Bus instance), calls sd_bus_set_trusted, which disables access controls for incoming D-Bus messages. An unprivileged user can exploit this by executing D-Bus methods that should be restricted to privileged users, in order to change the system's DNS resolver settings.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-15718.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-3592.html",
|
||||
"http://www.openwall.com/lists/oss-security/2019/09/03/1",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=1746057",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-15718",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BRE5IS24XTF5WNZGH2L7GSQJKARBOEGL/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HIKGKXZ5OEGOEYURHLJHEMFYNLEGAW5B/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U2WNHRJW4XI6H5YMDG4BUFGPAXWUMUVG/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17594",
|
||||
"PkgName": "libtinfo6",
|
||||
"InstalledVersion": "6.1+20181013-2+deb10u1",
|
||||
"FixedVersion": "6.1+20181013-2+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17594",
|
||||
"Title": "ncurses: heap-based buffer overflow in the _nc_find_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the _nc_find_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17594",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00017.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17595",
|
||||
"PkgName": "libtinfo6",
|
||||
"InstalledVersion": "6.1+20181013-2+deb10u1",
|
||||
"FixedVersion": "6.1+20181013-2+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17595",
|
||||
"Title": "ncurses: heap-based buffer overflow in the fmt_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the fmt_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17595",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00013.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-15718",
|
||||
"PkgName": "libudev1",
|
||||
"InstalledVersion": "241-7~deb10u1",
|
||||
"FixedVersion": "241-7~deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-15718",
|
||||
"Title": "systemd: systemd-resolved allows unprivileged users to configure DNS",
|
||||
"Description": "In systemd 240, bus_open_system_watch_bind_with_description in shared/bus-util.c (as used by systemd-resolved to connect to the system D-Bus instance), calls sd_bus_set_trusted, which disables access controls for incoming D-Bus messages. An unprivileged user can exploit this by executing D-Bus methods that should be restricted to privileged users, in order to change the system's DNS resolver settings.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-15718.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-3592.html",
|
||||
"http://www.openwall.com/lists/oss-security/2019/09/03/1",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=1746057",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-15718",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BRE5IS24XTF5WNZGH2L7GSQJKARBOEGL/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HIKGKXZ5OEGOEYURHLJHEMFYNLEGAW5B/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U2WNHRJW4XI6H5YMDG4BUFGPAXWUMUVG/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17594",
|
||||
"PkgName": "ncurses-base",
|
||||
"InstalledVersion": "6.1+20181013-2+deb10u1",
|
||||
"FixedVersion": "6.1+20181013-2+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17594",
|
||||
"Title": "ncurses: heap-based buffer overflow in the _nc_find_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the _nc_find_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17594",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00017.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17595",
|
||||
"PkgName": "ncurses-base",
|
||||
"InstalledVersion": "6.1+20181013-2+deb10u1",
|
||||
"FixedVersion": "6.1+20181013-2+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17595",
|
||||
"Title": "ncurses: heap-based buffer overflow in the fmt_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the fmt_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17595",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00013.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17594",
|
||||
"PkgName": "ncurses-bin",
|
||||
"InstalledVersion": "6.1+20181013-2+deb10u1",
|
||||
"FixedVersion": "6.1+20181013-2+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17594",
|
||||
"Title": "ncurses: heap-based buffer overflow in the _nc_find_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the _nc_find_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17594",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00017.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17595",
|
||||
"PkgName": "ncurses-bin",
|
||||
"InstalledVersion": "6.1+20181013-2+deb10u1",
|
||||
"FixedVersion": "6.1+20181013-2+deb10u2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:78c1b9419976227e05be9d243b7fa583bea44a5258e52018b2af4cdfe23d148d"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17595",
|
||||
"Title": "ncurses: heap-based buffer overflow in the fmt_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the fmt_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17595",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00013.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
1122
integration/testdata/debian-buster.json.golden
vendored
1122
integration/testdata/debian-buster.json.golden
vendored
File diff suppressed because it is too large
Load Diff
2102
integration/testdata/debian-stretch.json.golden
vendored
2102
integration/testdata/debian-stretch.json.golden
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,18 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/distroless-base.tar.gz (debian 9.9)",
|
||||
"Type": "debian",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"FixedVersion": "1.1.0l-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -26,6 +32,11 @@
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"FixedVersion": "1.1.0l-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
|
||||
421
integration/testdata/distroless-base.json.golden
vendored
421
integration/testdata/distroless-base.json.golden
vendored
@@ -1,15 +1,23 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/distroless-base.tar.gz (debian 9.9)",
|
||||
"Type": "debian",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-1000001",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-1000001",
|
||||
"Title": "glibc: realpath() buffer underflow when getcwd() returns relative path allows privilege escalation",
|
||||
"Description": "In glibc 2.26 and earlier there is confusion in the usage of getcwd() by realpath() which can be used to write before the destination buffer leading to a buffer underflow and potential code execution.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2018-1000001.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2018-0805.html",
|
||||
"http://seclists.org/oss-sec/2018/q1/38",
|
||||
"http://www.securityfocus.com/bid/102525",
|
||||
"http://www.securitytracker.com/id/1040162",
|
||||
@@ -27,17 +35,25 @@
|
||||
"VulnerabilityID": "CVE-2018-6485",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-6485",
|
||||
"Title": "glibc: Integer overflow in posix_memalign in memalign functions",
|
||||
"Description": "An integer overflow in the implementation of the posix_memalign in memalign functions in the GNU C Library (aka glibc or libc6) 2.26 and earlier could cause these functions to return a pointer to a heap area that is too small, potentially leading to heap corruption.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://bugs.debian.org/878159",
|
||||
"http://linux.oracle.com/cve/CVE-2018-6485.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2018-3092.html",
|
||||
"http://www.securityfocus.com/bid/102912",
|
||||
"https://access.redhat.com/errata/RHBA-2019:0327",
|
||||
"https://access.redhat.com/errata/RHSA-2018:3092",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-6485",
|
||||
"https://security.netapp.com/advisory/ntap-20190404-0003/",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=22343",
|
||||
"https://usn.ubuntu.com/4218-1/",
|
||||
"https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html"
|
||||
]
|
||||
},
|
||||
@@ -45,6 +61,11 @@
|
||||
"VulnerabilityID": "CVE-2018-6551",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-6551",
|
||||
"Title": "glibc: integer overflow in malloc functions",
|
||||
"Description": "The malloc implementation in the GNU C Library (aka glibc or libc6), from version 2.24 to 2.26 on powerpc, and only in version 2.26 on i386, did not properly handle malloc calls with arguments close to SIZE_MAX and could return a pointer to a heap region that is smaller than requested, eventually leading to heap corruption.",
|
||||
"Severity": "HIGH",
|
||||
@@ -55,21 +76,15 @@
|
||||
"https://sourceware.org/git/?p=glibc.git;a=commit;h=8e448310d74b283c5cd02b9ed7fb997b47bf9b22"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1010022",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Title": "glibc: stack guard protection bypass",
|
||||
"Description": "GNU Libc current is affected by: Mitigation bypass. The impact is: Attacker may bypass stack guard protection. The component is: nptl. The attack vector is: Exploit stack buffer overflow vulnerability and use this bypass vulnerability to bypass stack guard.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=22850"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-9169",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-9169",
|
||||
"Title": "glibc: regular-expression match via proceed_next_node in posix/regexec.c leads to heap-based buffer over-read",
|
||||
"Description": "In the GNU C Library (aka glibc or libc6) through 2.29, proceed_next_node in posix/regexec.c has a heap-based buffer over-read via an attempted case-insensitive regular-expression match.",
|
||||
"Severity": "HIGH",
|
||||
@@ -85,10 +100,27 @@
|
||||
"https://support.f5.com/csp/article/K54823184"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2020-1752",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-1752",
|
||||
"Title": "glibc: use-after-free in glob() function when expanding ~user",
|
||||
"Description": "A use-after-free vulnerability was found in glibc in the way the tilde expansion was carried out. Directory paths containing an initial tilde followed by a valid username were affected by this issue. A local attacker could exploit this flaw by creating a specially crafted path that, when processed by the glob function, would potentially lead to arbitrary code execution.",
|
||||
"Severity": "HIGH"
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2009-5155",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2009-5155",
|
||||
"Title": "glibc: parse_reg_exp in posix/regcomp.c misparses alternatives leading to denial of service or trigger incorrect result",
|
||||
"Description": "In the GNU C Library (aka glibc or libc6) before 2.28, parse_reg_exp in posix/regcomp.c misparses alternatives, which allows attackers to cause a denial of service (assertion failure and application exit) or trigger an incorrect result by attempting a regular-expression match.",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -105,13 +137,75 @@
|
||||
"https://support.f5.com/csp/article/K64119434"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2016-10739",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2016-10739",
|
||||
"Title": "glibc: getaddrinfo should reject IP addresses with trailing characters",
|
||||
"Description": "In the GNU C Library (aka glibc or libc6) through 2.28, the getaddrinfo function would successfully parse a string that contained an IPv4 address followed by whitespace and arbitrary characters, which could lead applications to incorrectly assume that it had parsed a valid string, without the possibility of embedded HTTP headers or other potentially dangerous substrings.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2016-10739.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-3513.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00082.html",
|
||||
"http://www.securityfocus.com/bid/106672",
|
||||
"https://access.redhat.com/errata/RHSA-2019:2118",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=1347549",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10739",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=20018"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2017-12132",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2017-12132",
|
||||
"Title": "glibc: Fragmentation attacks possible when EDNS0 is enabled",
|
||||
"Description": "The DNS stub resolver in the GNU C Library (aka glibc or libc6) before version 2.26, when EDNS support is enabled, will solicit large UDP responses from name servers, potentially simplifying off-path DNS spoofing attacks due to IP fragmentation.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2017-12132.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2018-0805.html",
|
||||
"http://www.securityfocus.com/bid/100598",
|
||||
"https://access.redhat.com/errata/RHSA-2018:0805",
|
||||
"https://arxiv.org/pdf/1205.4011.pdf",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-12132",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=21361"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2020-1751",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-1751",
|
||||
"Title": "glibc: array overflow in backtrace on powerpc",
|
||||
"Description": "No description is available for this CVE.",
|
||||
"Severity": "MEDIUM"
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2010-4051",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2010-4051",
|
||||
"Title": "CVE-2010-4052 glibc: De-recursivise regular expression engine",
|
||||
"Description": "The regcomp implementation in the GNU C Library (aka glibc or libc6) through 2.11.3, and 2.12.x through 2.12.2, allows context-dependent attackers to cause a denial of service (application crash) via a regular expression containing adjacent bounded repetitions that bypass the intended RE_DUP_MAX limitation, as demonstrated by a {10,}{10,}{10,}{10,}{10,} sequence in the proftpd.gnu.c exploit for ProFTPD, related to a \"RE_DUP_MAX overflow.\"",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://cxib.net/stuff/proftpd.gnu.c",
|
||||
"http://seclists.org/fulldisclosure/2011/Jan/78",
|
||||
@@ -130,9 +224,14 @@
|
||||
"VulnerabilityID": "CVE-2010-4052",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2010-4052",
|
||||
"Title": "CVE-2010-4051 CVE-2010-4052 glibc: De-recursivise regular expression engine",
|
||||
"Description": "Stack consumption vulnerability in the regcomp implementation in the GNU C Library (aka glibc or libc6) through 2.11.3, and 2.12.x through 2.12.2, allows context-dependent attackers to cause a denial of service (resource exhaustion) via a regular expression containing adjacent repetition operators, as demonstrated by a {10,}{10,}{10,}{10,} sequence in the proftpd.gnu.c exploit for ProFTPD.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://cxib.net/stuff/proftpd.gnu.c",
|
||||
"http://seclists.org/fulldisclosure/2011/Jan/78",
|
||||
@@ -151,9 +250,14 @@
|
||||
"VulnerabilityID": "CVE-2010-4756",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2010-4756",
|
||||
"Title": "glibc: glob implementation can cause excessive CPU and memory consumption due to crafted glob expressions",
|
||||
"Description": "The glob implementation in the GNU C Library (aka glibc or libc6) allows remote authenticated users to cause a denial of service (CPU and memory consumption) via crafted glob expressions that do not match any pathnames, as demonstrated by glob expressions in STAT commands to an FTP daemon, a different vulnerability than CVE-2010-2632.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://cxib.net/stuff/glob-0day.c",
|
||||
"http://securityreason.com/achievement_securityalert/89",
|
||||
@@ -164,9 +268,14 @@
|
||||
"VulnerabilityID": "CVE-2015-8985",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2015-8985",
|
||||
"Title": "glibc: potential denial of service in pop_fail_stack()",
|
||||
"Description": "The pop_fail_stack function in the GNU C Library (aka glibc or libc6) allows context-dependent attackers to cause a denial of service (assertion failure and application crash) via vectors related to extended regular expression processing.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.openwall.com/lists/oss-security/2017/02/14/9",
|
||||
"http://www.securityfocus.com/bid/76916",
|
||||
@@ -179,66 +288,68 @@
|
||||
"VulnerabilityID": "CVE-2016-10228",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2016-10228",
|
||||
"Title": "glibc: iconv program can hang when invoked with the -c option",
|
||||
"Description": "The iconv program in the GNU C Library (aka glibc or libc6) 2.25 and earlier, when invoked with the -c option, enters an infinite loop when processing invalid multi-byte input sequences, leading to a denial of service.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://openwall.com/lists/oss-security/2017/03/01/10",
|
||||
"http://www.securityfocus.com/bid/96525",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=19519"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2016-10739",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Title": "glibc: getaddrinfo should reject IP addresses with trailing characters",
|
||||
"Description": "In the GNU C Library (aka glibc or libc6) through 2.28, the getaddrinfo function would successfully parse a string that contained an IPv4 address followed by whitespace and arbitrary characters, which could lead applications to incorrectly assume that it had parsed a valid string, without the possibility of embedded HTTP headers or other potentially dangerous substrings.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00082.html",
|
||||
"http://www.securityfocus.com/bid/106672",
|
||||
"https://access.redhat.com/errata/RHSA-2019:2118",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=1347549",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10739",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=20018"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2017-12132",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Title": "glibc: Fragmentation attacks possible when EDNS0 is enabled",
|
||||
"Description": "The DNS stub resolver in the GNU C Library (aka glibc or libc6) before version 2.26, when EDNS support is enabled, will solicit large UDP responses from name servers, potentially simplifying off-path DNS spoofing attacks due to IP fragmentation.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/100598",
|
||||
"https://access.redhat.com/errata/RHSA-2018:0805",
|
||||
"https://arxiv.org/pdf/1205.4011.pdf",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-12132",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=21361"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-20796",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-20796",
|
||||
"Title": "glibc: uncontrolled recursion in function check_dst_limits_calc_pos_1 in posix/regexec.c",
|
||||
"Description": "In the GNU C Library (aka glibc or libc6) through 2.29, check_dst_limits_calc_pos_1 in posix/regexec.c has Uncontrolled Recursion, as demonstrated by '(\\227|)(\\\\1\\\\1|t1|\\\\\\2537)+' in grep.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/107160",
|
||||
"https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34141",
|
||||
"https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00108.html",
|
||||
"https://security.netapp.com/advisory/ntap-20190315-0002/"
|
||||
"https://security.netapp.com/advisory/ntap-20190315-0002/",
|
||||
"https://support.f5.com/csp/article/K26346590?utm_source=f5support\u0026amp;utm_medium=RSS"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1010022",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1010022",
|
||||
"Title": "glibc: stack guard protection bypass",
|
||||
"Description": "GNU Libc current is affected by: Mitigation bypass. The impact is: Attacker may bypass stack guard protection. The component is: nptl. The attack vector is: Exploit stack buffer overflow vulnerability and use this bypass vulnerability to bypass stack guard.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=22850"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1010023",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1010023",
|
||||
"Title": "glibc: running ldd on malicious ELF leads to code execution because of wrong size computation",
|
||||
"Description": "GNU Libc current is affected by: Re-mapping current loaded libray with malicious ELF file. The impact is: In worst case attacker may evaluate privileges. The component is: libld. The attack vector is: Attacker sends 2 ELF files to victim and asks to run ldd on it. ldd execute code.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/109167",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=22851",
|
||||
@@ -249,8 +360,14 @@
|
||||
"VulnerabilityID": "CVE-2019-1010024",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1010024",
|
||||
"Title": "glibc: ASLR bypass using cache of thread stack and heap",
|
||||
"Description": "GNU Libc current is affected by: Mitigation bypass. The impact is: Attacker may bypass ASLR using cache of thread stack and heap. The component is: glibc.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/109162",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=22852",
|
||||
@@ -261,41 +378,62 @@
|
||||
"VulnerabilityID": "CVE-2019-1010025",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1010025",
|
||||
"Title": "glibc: information disclosure of heap addresses of pthread_created thread",
|
||||
"Description": "** DISPUTED ** GNU Libc current is affected by: Mitigation bypass. The impact is: Attacker may guess the heap addresses of pthread_created thread. The component is: glibc. NOTE: the vendor's position is \"ASLR bypass itself is not a vulnerability.\"",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=22853"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19126",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19126",
|
||||
"Title": "glibc: LD_PREFER_MAP_32BIT_EXEC not ignored in setuid binaries",
|
||||
"Description": "On the x86-64 architecture, the GNU C Library (aka glibc) before 2.31 fails to ignore the LD_PREFER_MAP_32BIT_EXEC environment variable during program execution after a security transition, allowing local attackers to restrict the possible mapping addresses for loaded libraries and thus bypass ASLR for a setuid program.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZFJ5E7NWOL6ROE5QVICHKIOUGCPFJVUH/",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=25204"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-6488",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-6488",
|
||||
"Title": "glibc: Incorrect attempt to use a 64-bit register for size_t in assembly codes results in segmentation fault",
|
||||
"Description": "The string component in the GNU C Library (aka glibc or libc6) through 2.28, when running on the x32 architecture, incorrectly attempts to use a 64-bit register for size_t in assembly codes, which can lead to a segmentation fault or possibly unspecified other impact, as demonstrated by a crash in __memmove_avx_unaligned_erms in sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S during a memcpy.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/106671",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6488",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=24097"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-9192",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Title": "glibc: uncontrolled recursion in function check_dst_limits_calc_pos_1 in posix/regexec.c",
|
||||
"Description": "** DISPUTED ** In the GNU C Library (aka glibc or libc6) through 2.29, check_dst_limits_calc_pos_1 in posix/regexec.c has Uncontrolled Recursion, as demonstrated by '(|)(\\\\1\\\\1)*' in grep, a different issue than CVE-2018-20796. NOTE: the software maintainer disputes that this is a vulnerability because the behavior occurs only with a crafted pattern.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=24269"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-7309",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-7309",
|
||||
"Title": "glibc: memcmp function incorrectly returns zero",
|
||||
"Description": "In the GNU C Library (aka glibc or libc6) through 2.29, the memcmp function for the x32 architecture can incorrectly return zero (indicating that the inputs are equal) because the RDX most significant bit is mishandled.",
|
||||
"Severity": "LOW",
|
||||
@@ -306,13 +444,77 @@
|
||||
"https://sourceware.org/ml/libc-alpha/2019-02/msg00041.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-9192",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-9192",
|
||||
"Title": "glibc: uncontrolled recursion in function check_dst_limits_calc_pos_1 in posix/regexec.c",
|
||||
"Description": "** DISPUTED ** In the GNU C Library (aka glibc or libc6) through 2.29, check_dst_limits_calc_pos_1 in posix/regexec.c has Uncontrolled Recursion, as demonstrated by '(|)(\\\\1\\\\1)*' in grep, a different issue than CVE-2018-20796. NOTE: the software maintainer disputes that this is a vulnerability because the behavior occurs only with a crafted pattern.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=24269",
|
||||
"https://support.f5.com/csp/article/K26346590?utm_source=f5support\u0026amp;utm_medium=RSS"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2020-10029",
|
||||
"PkgName": "libc6",
|
||||
"InstalledVersion": "2.24-11+deb9u4",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-10029",
|
||||
"Title": "glibc: stack corruption from crafted input in cosl, sinl, sincosl, and tanl functions",
|
||||
"Description": "The GNU C Library (aka glibc or libc6) before 2.32 could overflow an on-stack buffer during range reduction if an input to an 80-bit long double function contains a non-canonical bit pattern, a seen when passing a 0x5d414141414141410000 value to sinl on x86 targets. This is related to sysdeps/ieee754/ldbl-96/e_rem_pio2l.c.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-03/msg00033.html",
|
||||
"https://sourceware.org/bugzilla/show_bug.cgi?id=25487",
|
||||
"https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=9333498794cde1d5cca518badf79533a24114b6f"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"FixedVersion": "1.1.0l-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2007-6755",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2007-6755",
|
||||
"Title": "Dual_EC_DRBG: weak pseudo random number generator",
|
||||
"Description": "The NIST SP 800-90A default statement of the Dual Elliptic Curve Deterministic Random Bit Generation (Dual_EC_DRBG) algorithm contains point Q constants with a possible relationship to certain \"skeleton key\" values, which might allow context-dependent attackers to defeat cryptographic protection mechanisms by leveraging knowledge of those values. NOTE: this is a preliminary CVE for Dual_EC_DRBG; future research may provide additional details about point Q and associated attacks, and could potentially lead to a RECAST or REJECT of this CVE.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://arstechnica.com/security/2013/09/stop-using-nsa-influence-code-in-our-product-rsa-tells-customers/",
|
||||
"http://blog.cryptographyengineering.com/2013/09/rsa-warns-developers-against-its-own.html",
|
||||
@@ -328,9 +530,14 @@
|
||||
"VulnerabilityID": "CVE-2010-0928",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2010-0928",
|
||||
"Title": "openssl: RSA authentication weakness",
|
||||
"Description": "OpenSSL 0.9.8i on the Gaisler Research LEON3 SoC on the Xilinx Virtex-II Pro FPGA uses a Fixed Width Exponentiation (FWE) algorithm for certain signature calculations, and does not verify the signature before providing it to a caller, which makes it easier for physically proximate attackers to determine the private key via a modified supply voltage for the microprocessor, related to a \"fault-based attack.\"",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://rdist.root.org/2010/03/08/attacking-rsa-exponentiation-with-fault-injection/",
|
||||
"http://www.eecs.umich.edu/%7Evaleria/research/publications/DATE10RSA.pdf",
|
||||
@@ -341,10 +548,42 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "libssl1.1",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"FixedVersion": "1.1.0l-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
@@ -363,9 +602,14 @@
|
||||
"VulnerabilityID": "CVE-2007-6755",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2007-6755",
|
||||
"Title": "Dual_EC_DRBG: weak pseudo random number generator",
|
||||
"Description": "The NIST SP 800-90A default statement of the Dual Elliptic Curve Deterministic Random Bit Generation (Dual_EC_DRBG) algorithm contains point Q constants with a possible relationship to certain \"skeleton key\" values, which might allow context-dependent attackers to defeat cryptographic protection mechanisms by leveraging knowledge of those values. NOTE: this is a preliminary CVE for Dual_EC_DRBG; future research may provide additional details about point Q and associated attacks, and could potentially lead to a RECAST or REJECT of this CVE.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://arstechnica.com/security/2013/09/stop-using-nsa-influence-code-in-our-product-rsa-tells-customers/",
|
||||
"http://blog.cryptographyengineering.com/2013/09/rsa-warns-developers-against-its-own.html",
|
||||
@@ -381,9 +625,14 @@
|
||||
"VulnerabilityID": "CVE-2010-0928",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2010-0928",
|
||||
"Title": "openssl: RSA authentication weakness",
|
||||
"Description": "OpenSSL 0.9.8i on the Gaisler Research LEON3 SoC on the Xilinx Virtex-II Pro FPGA uses a Fixed Width Exponentiation (FWE) algorithm for certain signature calculations, and does not verify the signature before providing it to a caller, which makes it easier for physically proximate attackers to determine the private key via a modified supply voltage for the microprocessor, related to a \"fault-based attack.\"",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://rdist.root.org/2010/03/08/attacking-rsa-exponentiation-with-fault-injection/",
|
||||
"http://www.eecs.umich.edu/%7Evaleria/research/publications/DATE10RSA.pdf",
|
||||
@@ -394,22 +643,30 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.1.0k-1~deb9u1",
|
||||
"FixedVersion": "1.1.0l-1~deb9u1",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:dffd9992ca398466a663c87c92cfea2a2db0ae0cf33fcb99da60eec52addbfc5"
|
||||
},
|
||||
"SeveritySource": "debian",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
1584
integration/testdata/distroless-python27.json.golden
vendored
1584
integration/testdata/distroless-python27.json.golden
vendored
File diff suppressed because it is too large
Load Diff
119
integration/testdata/fluentd-multiple-lockfiles.json.golden
vendored
Normal file
119
integration/testdata/fluentd-multiple-lockfiles.json.golden
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/fluentd-multiple-lockfiles.tar.gz (debian 10.2)",
|
||||
"Type": "debian",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "e2fsprogs",
|
||||
"InstalledVersion": "1.44.5-1+deb10u2",
|
||||
"FixedVersion": "1.44.5-1+deb10u3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libcom-err2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u2",
|
||||
"FixedVersion": "1.44.5-1+deb10u3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libext2fs2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u2",
|
||||
"FixedVersion": "1.44.5-1+deb10u3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-18224",
|
||||
"PkgName": "libidn2-0",
|
||||
"InstalledVersion": "2.0.5-1",
|
||||
"FixedVersion": "2.0.5-1+deb10u1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-18224",
|
||||
"Title": "libidn2: heap-based buffer overflow in idn2_to_ascii_4i in lib/lookup.c",
|
||||
"Description": "idn2_to_ascii_4i in lib/lookup.c in GNU libidn2 before 2.1.1 has a heap-based buffer overflow via a long domain string.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12420",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18224",
|
||||
"https://github.com/libidn/libidn2/commit/e4d1558aa2c1c04a05066ee8600f37603890ba8c",
|
||||
"https://github.com/libidn/libidn2/compare/libidn2-2.1.0...libidn2-2.1.1",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JDQVQ2XPV5BTZUFINT7AFJSKNNBVURNJ/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MINU5RKDFE6TKAFY5DRFN3WSFDS4DYVS/",
|
||||
"https://usn.ubuntu.com/4168-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libss2",
|
||||
"InstalledVersion": "1.44.5-1+deb10u2",
|
||||
"FixedVersion": "1.44.5-1+deb10u3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
243
integration/testdata/opensuse-leap-151.json.golden
vendored
243
integration/testdata/opensuse-leap-151.json.golden
vendored
@@ -1,25 +1,82 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/opensuse-leap-151.tar.gz (opensuse.leap 15.1)",
|
||||
"Type": "opensuse.leap",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2019:2596-1",
|
||||
"PkgName": "cpio",
|
||||
"InstalledVersion": "2.12-lp151.2.68",
|
||||
"FixedVersion": "2.12-lp151.3.3.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for cpio",
|
||||
"Description": "This update for cpio fixes the following issues:\n\n- CVE-2019-14866: Fixed an improper validation of the values written \n in the header of a TAR file through the to_oct() function which could \n have led to unexpected TAR generation (bsc#1155199).\n\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00076.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0381-1",
|
||||
"PkgName": "glibc",
|
||||
"InstalledVersion": "2.26-lp151.18.7",
|
||||
"FixedVersion": "2.26-lp151.19.3.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for glibc",
|
||||
"Description": "This update for glibc fixes the following issues:\n\n- CVE-2020-10029: Fixed a potential overflow in on-stack buffer \n during range reduction (bsc#1165784).\t \n- Fixed an issue where pthread were not always locked correctly (bsc#1164505).\n- Document mprotect and introduce section on memory protection (bsc#1163184).\n\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-03/msg00033.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0166-1",
|
||||
"PkgName": "libcom_err2",
|
||||
"InstalledVersion": "1.43.8-lp151.5.6.1",
|
||||
"FixedVersion": "1.43.8-lp151.5.12.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for e2fsprogs",
|
||||
"Description": "This update for e2fsprogs fixes the following issues:\n\n- CVE-2019-5188: Fixed a code execution vulnerability in the directory rehashing functionality (bsc#1160571).\n\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0022-1",
|
||||
"PkgName": "libgcrypt20",
|
||||
"InstalledVersion": "1.8.2-lp151.9.4.1",
|
||||
"FixedVersion": "1.8.2-lp151.9.7.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for libgcrypt",
|
||||
"Description": "This update for libgcrypt fixes the following issues:\n\nSecurity issues fixed:\n\n- CVE-2019-13627: Mitigation against an ECDSA timing attack (bsc#1148987).\n\nBug fixes:\n\n- Added CMAC AES self test (bsc#1155339).\n- Added CMAC TDES self test missing (bsc#1155338).\n- Fix test dsa-rfc6979 in FIPS mode.\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00018.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2019:2611-1",
|
||||
"PkgName": "libidn2-0",
|
||||
"InstalledVersion": "2.0.4-lp151.2.3",
|
||||
"FixedVersion": "2.2.0-lp151.3.3.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for libidn2",
|
||||
"Description": "This update for libidn2 to version 2.2.0 fixes the following issues:\n\n- CVE-2019-12290: Fixed an improper round-trip check when converting A-labels to U-labels (bsc#1154884).\n- CVE-2019-18224: Fixed a heap-based buffer overflow that was caused by long domain strings (bsc#1154887).\n\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-12/msg00009.html",
|
||||
@@ -31,72 +88,256 @@
|
||||
"PkgName": "libncurses6",
|
||||
"InstalledVersion": "6.1-lp151.5.41",
|
||||
"FixedVersion": "6.1-lp151.6.3.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for ncurses",
|
||||
"Description": "This update for ncurses fixes the following issues:\n\nSecurity issues fixed:\n\n- CVE-2019-17594: Fixed a heap-based buffer over-read in the _nc_find_entry function (bsc#1154036).\n- CVE-2019-17595: Fixed a heap-based buffer over-read in the fmt_entry function (bsc#1154037).\n\nNon-security issue fixed:\n\n- Removed screen.xterm from terminfo database (bsc#1103320).\n\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0379-1",
|
||||
"PkgName": "libnghttp2-14",
|
||||
"InstalledVersion": "1.39.2-lp151.3.3.1",
|
||||
"FixedVersion": "1.40.0-lp151.3.6.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for nghttp2",
|
||||
"Description": "This update for nghttp2 fixes the following issues:\n\nnghttp2 was update to version 1.40.0 (bsc#1166481)\n\n- lib: Add nghttp2_check_authority as public API\n- lib: Fix the bug that stream is closed with wrong error code\n- lib: Faster huffman encoding and decoding\n- build: Avoid filename collision of static and dynamic lib\n- build: Add new flag ENABLE_STATIC_CRT for Windows\n- build: cmake: Support building nghttpx with systemd\n- third-party: Update neverbleed to fix memory leak\n- nghttpx: Fix bug that mruby is incorrectly shared between backends\n- nghttpx: Reconnect h1 backend if it lost connection before sending headers\n- nghttpx: Returns 408 if backend timed out before sending headers\n- nghttpx: Fix request stal\n\n\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-03/msg00034.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0062-1",
|
||||
"PkgName": "libopenssl1_1",
|
||||
"InstalledVersion": "1.1.0i-lp151.8.3.1",
|
||||
"FixedVersion": "1.1.0i-lp151.8.6.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for openssl-1_1",
|
||||
"Description": "This update for openssl-1_1 fixes the following issues:\n\nSecurity issue fixed:\n\n- CVE-2019-1551: Fixed an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli (bsc#1158809). \n\nVarious FIPS related improvements were done:\n\n- FIPS: Backport SSH KDF to openssl (jsc#SLE-8789, bsc#1157775).\n- Port FIPS patches from SLE-12 (bsc#1158101).\n- Use SHA-2 in the RSA pairwise consistency check (bsc#1155346).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0255-1",
|
||||
"PkgName": "libsolv-tools",
|
||||
"InstalledVersion": "0.7.6-lp151.2.3.2",
|
||||
"FixedVersion": "0.7.10-lp151.2.10.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for libsolv, libzypp, zypper",
|
||||
"Description": "This update for libsolv, libzypp, zypper fixes the following issues:\n\n\nSecurity issue fixed:\n\n- CVE-2019-18900: Fixed assert cookie file that was world readable (bsc#1158763).\n\nBug fixes\n\n- Fixed removing orphaned packages dropped by to-be-installed products (bsc#1155819).\n- Adds libzypp API to mark all obsolete kernels according to the existing purge-kernel script rules (bsc#1155198).\n- Do not enforce 'en' being in RequestedLocales If the user decides to have a system without explicit language support he may do so (bsc#1155678). \n- Load only target resolvables for zypper rm (bsc#1157377).\n- Fix broken search by filelist (bsc#1135114).\n- Replace python by a bash script in zypper-log (fixes#304, fixes#306, bsc#1156158).\n- Do not sort out requested locales which are not available (bsc#1155678).\n- Prevent listing duplicate matches in tables. XML result is provided within the new list-patches-byissue element (bsc#1154805). \n- XML add patch issue-date and issue-list (bsc#1154805).\n- Fix zypper lp --cve/bugzilla/issue options (bsc#1155298).\n- Always execute commit when adding/removing locales (fixes bsc#1155205).\n- Fix description of --table-style,-s in man page (bsc#1154804).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00036.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2019:2689-1",
|
||||
"PkgName": "libssh4",
|
||||
"InstalledVersion": "0.8.7-lp151.2.3.1",
|
||||
"FixedVersion": "0.8.7-lp151.2.6.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for libssh",
|
||||
"Severity": "MEDIUM",
|
||||
"Description": "This update for libssh fixes the following issues:\n\n- CVE-2019-14889: Fixed an arbitrary command execution (bsc#1158095).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-12/msg00033.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0102-1",
|
||||
"PkgName": "libssh4",
|
||||
"InstalledVersion": "0.8.7-lp151.2.3.1",
|
||||
"FixedVersion": "0.8.7-lp151.2.9.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for libssh",
|
||||
"Description": "This update for libssh fixes the following issues:\n\n- CVE-2019-14889: Fixed an unwanted command execution in scp caused by unsanitized location (bsc#1158095).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00047.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0208-1",
|
||||
"PkgName": "libsystemd0",
|
||||
"InstalledVersion": "234-lp151.26.4.1",
|
||||
"FixedVersion": "234-lp151.26.7.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for systemd",
|
||||
"Description": "This update for systemd fixes the following issues:\n\n- CVE-2020-1712 (bsc#bsc#1162108)\n Fix a heap use-after-free vulnerability, when asynchronous\n Polkit queries were performed while handling Dbus messages. A local\n unprivileged attacker could have abused this flaw to crash systemd services or\n potentially execute code and elevate their privileges, by sending specially\n crafted Dbus messages.\n\n- Use suse.pool.ntp.org server pool on SLE distros (jsc#SLE-7683)\n\n- libblkid: open device in nonblock mode. (bsc#1084671)\n- udev/cdrom_id: Do not open CD-rom in exclusive mode. (bsc#1154256)\n- bus_open leak sd_event_source when udevadm trigger。 (bsc#1161436 CVE-2019-20386)\n- fileio: introduce read_full_virtual_file() for reading virtual files in sysfs, procfs (bsc#1133495 bsc#1159814)\n- fileio: initialize errno to zero before we do fread()\n- fileio: try to read one byte too much in read_full_stream()\n- logind: consider 'greeter' sessions suitable as 'display' sessions of a user (bsc#1158485)\n- logind: never elect a session that is stopping as display\n\n- journal: include kmsg lines from the systemd process which exec()d us (#8078)\n- udevd: don't use monitor after manager_exit()\n- udevd: capitalize log messages in on_sigchld()\n- udevd: merge conditions to decrease indentation\n- Revert 'udevd: fix crash when workers time out after exit is signal caught'\n- core: fragments of masked units ought not be considered for NeedDaemonReload (#7060) (bsc#1156482)\n- udevd: fix crash when workers time out after exit is signal caught\n- udevd: wait for workers to finish when exiting (bsc#1106383)\n\n- Improve bash completion support (bsc#1155207)\n * shell-completion: systemctl: do not list template units in {re,}start\n * shell-completion: systemctl: pass current word to all list_unit*\n * bash-completion: systemctl: pass current partial unit to list-unit* (bsc#1155207)\n * bash-completion: systemctl: use systemctl --no-pager\n * bash-completion: also suggest template unit files\n * bash-completion: systemctl: add missing options and verbs\n * bash-completion: use the first argument instead of the global variable (#6457)\n\n- networkd: VXLan Make group and remote variable separate (bsc#1156213)\n- networkd: vxlan require Remote= to be a non multicast address (#8117) (bsc#1156213)\n- fs-util: let's avoid unnecessary strerror()\n- fs-util: introduce inotify_add_watch_and_warn() helper\n- ask-password: improve log message when inotify limit is reached (bsc#1155574)\n- shared/install: failing with -ELOOP can be due to the use of an alias in install_error() (bsc#1151377)\n- man: alias names can't be used with enable command (bsc#1151377)\n\n- Add boot option to not use swap at system start (jsc#SLE-7689)\n\n- Allow YaST to select Iranian (Persian, Farsi) keyboard layout\n (bsc#1092920)\n \nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00014.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0208-1",
|
||||
"PkgName": "libudev1",
|
||||
"InstalledVersion": "234-lp151.26.4.1",
|
||||
"FixedVersion": "234-lp151.26.7.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for systemd",
|
||||
"Description": "This update for systemd fixes the following issues:\n\n- CVE-2020-1712 (bsc#bsc#1162108)\n Fix a heap use-after-free vulnerability, when asynchronous\n Polkit queries were performed while handling Dbus messages. A local\n unprivileged attacker could have abused this flaw to crash systemd services or\n potentially execute code and elevate their privileges, by sending specially\n crafted Dbus messages.\n\n- Use suse.pool.ntp.org server pool on SLE distros (jsc#SLE-7683)\n\n- libblkid: open device in nonblock mode. (bsc#1084671)\n- udev/cdrom_id: Do not open CD-rom in exclusive mode. (bsc#1154256)\n- bus_open leak sd_event_source when udevadm trigger。 (bsc#1161436 CVE-2019-20386)\n- fileio: introduce read_full_virtual_file() for reading virtual files in sysfs, procfs (bsc#1133495 bsc#1159814)\n- fileio: initialize errno to zero before we do fread()\n- fileio: try to read one byte too much in read_full_stream()\n- logind: consider 'greeter' sessions suitable as 'display' sessions of a user (bsc#1158485)\n- logind: never elect a session that is stopping as display\n\n- journal: include kmsg lines from the systemd process which exec()d us (#8078)\n- udevd: don't use monitor after manager_exit()\n- udevd: capitalize log messages in on_sigchld()\n- udevd: merge conditions to decrease indentation\n- Revert 'udevd: fix crash when workers time out after exit is signal caught'\n- core: fragments of masked units ought not be considered for NeedDaemonReload (#7060) (bsc#1156482)\n- udevd: fix crash when workers time out after exit is signal caught\n- udevd: wait for workers to finish when exiting (bsc#1106383)\n\n- Improve bash completion support (bsc#1155207)\n * shell-completion: systemctl: do not list template units in {re,}start\n * shell-completion: systemctl: pass current word to all list_unit*\n * bash-completion: systemctl: pass current partial unit to list-unit* (bsc#1155207)\n * bash-completion: systemctl: use systemctl --no-pager\n * bash-completion: also suggest template unit files\n * bash-completion: systemctl: add missing options and verbs\n * bash-completion: use the first argument instead of the global variable (#6457)\n\n- networkd: VXLan Make group and remote variable separate (bsc#1156213)\n- networkd: vxlan require Remote= to be a non multicast address (#8117) (bsc#1156213)\n- fs-util: let's avoid unnecessary strerror()\n- fs-util: introduce inotify_add_watch_and_warn() helper\n- ask-password: improve log message when inotify limit is reached (bsc#1155574)\n- shared/install: failing with -ELOOP can be due to the use of an alias in install_error() (bsc#1151377)\n- man: alias names can't be used with enable command (bsc#1151377)\n\n- Add boot option to not use swap at system start (jsc#SLE-7689)\n\n- Allow YaST to select Iranian (Persian, Farsi) keyboard layout\n (bsc#1092920)\n \nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00014.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2019:2612-1",
|
||||
"PkgName": "libxml2-2",
|
||||
"InstalledVersion": "2.9.7-lp151.5.3.1",
|
||||
"FixedVersion": "2.9.7-lp151.5.6.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for libxml2",
|
||||
"Description": "This update for libxml2 doesn't fix any additional security issues, but correct its rpm changelog to reflect\nall CVEs that have been fixed over the past.\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "UNKNOWN",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-12/msg00010.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0255-1",
|
||||
"PkgName": "libzypp",
|
||||
"InstalledVersion": "17.15.0-lp151.2.3.2",
|
||||
"FixedVersion": "17.19.0-lp151.2.10.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for libsolv, libzypp, zypper",
|
||||
"Description": "This update for libsolv, libzypp, zypper fixes the following issues:\n\n\nSecurity issue fixed:\n\n- CVE-2019-18900: Fixed assert cookie file that was world readable (bsc#1158763).\n\nBug fixes\n\n- Fixed removing orphaned packages dropped by to-be-installed products (bsc#1155819).\n- Adds libzypp API to mark all obsolete kernels according to the existing purge-kernel script rules (bsc#1155198).\n- Do not enforce 'en' being in RequestedLocales If the user decides to have a system without explicit language support he may do so (bsc#1155678). \n- Load only target resolvables for zypper rm (bsc#1157377).\n- Fix broken search by filelist (bsc#1135114).\n- Replace python by a bash script in zypper-log (fixes#304, fixes#306, bsc#1156158).\n- Do not sort out requested locales which are not available (bsc#1155678).\n- Prevent listing duplicate matches in tables. XML result is provided within the new list-patches-byissue element (bsc#1154805). \n- XML add patch issue-date and issue-list (bsc#1154805).\n- Fix zypper lp --cve/bugzilla/issue options (bsc#1155298).\n- Always execute commit when adding/removing locales (fixes bsc#1155205).\n- Fix description of --table-style,-s in man page (bsc#1154804).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00036.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2019:2551-1",
|
||||
"PkgName": "ncurses-utils",
|
||||
"InstalledVersion": "6.1-lp151.5.41",
|
||||
"FixedVersion": "6.1-lp151.6.3.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for ncurses",
|
||||
"Description": "This update for ncurses fixes the following issues:\n\nSecurity issues fixed:\n\n- CVE-2019-17594: Fixed a heap-based buffer over-read in the _nc_find_entry function (bsc#1154036).\n- CVE-2019-17595: Fixed a heap-based buffer over-read in the fmt_entry function (bsc#1154037).\n\nNon-security issue fixed:\n\n- Removed screen.xterm from terminfo database (bsc#1103320).\n\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0062-1",
|
||||
"PkgName": "openssl-1_1",
|
||||
"InstalledVersion": "1.1.0i-lp151.8.3.1",
|
||||
"FixedVersion": "1.1.0i-lp151.8.6.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for openssl-1_1",
|
||||
"Description": "This update for openssl-1_1 fixes the following issues:\n\nSecurity issue fixed:\n\n- CVE-2019-1551: Fixed an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli (bsc#1158809). \n\nVarious FIPS related improvements were done:\n\n- FIPS: Backport SSH KDF to openssl (jsc#SLE-8789, bsc#1157775).\n- Port FIPS patches from SLE-12 (bsc#1158101).\n- Use SHA-2 in the RSA pairwise consistency check (bsc#1155346).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2019:2672-1",
|
||||
"PkgName": "permissions",
|
||||
"InstalledVersion": "20181116-lp151.4.6.1",
|
||||
"FixedVersion": "20181116-lp151.4.9.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for permissions",
|
||||
"Description": "This update for permissions fixes the following issues:\n\n- CVE-2019-3688: Changed wrong ownership in /usr/sbin/pinger to root:squid\n which could have allowed a squid user to gain persistence by changing the \n binary (bsc#1093414).\n- CVE-2019-3690: Fixed a privilege escalation through untrusted symbolic \n links (bsc#1150734).\n- Fixed a regression which caused sagmentation fault (bsc#1157198).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-12/msg00024.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0302-1",
|
||||
"PkgName": "permissions",
|
||||
"InstalledVersion": "20181116-lp151.4.6.1",
|
||||
"FixedVersion": "20181116-lp151.4.12.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for permissions",
|
||||
"Description": "This update for permissions fixes the following issues:\n\nSecurity issues fixed:\n\n- CVE-2019-3687: Fixed a privilege escalation which could allow a local user to read network traffic if wireshark is installed (bsc#1148788)\n- CVE-2020-8013: Fixed an issue where chkstat set unintended setuid/capabilities for mrsh and wodim (bsc#1163922).\n\nNon-security issues fixed:\n\n- Fixed a regression where chkstat breaks without /proc available (bsc#1160764, bsc#1160594).\n- Fixed capability handling when doing multiple permission changes at once (bsc#1161779).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-03/msg00010.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2019:2551-1",
|
||||
"PkgName": "terminfo-base",
|
||||
"InstalledVersion": "6.1-lp151.5.41",
|
||||
"FixedVersion": "6.1-lp151.6.3.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for ncurses",
|
||||
"Description": "This update for ncurses fixes the following issues:\n\nSecurity issues fixed:\n\n- CVE-2019-17594: Fixed a heap-based buffer over-read in the _nc_find_entry function (bsc#1154036).\n- CVE-2019-17595: Fixed a heap-based buffer over-read in the fmt_entry function (bsc#1154037).\n\nNon-security issue fixed:\n\n- Removed screen.xterm from terminfo database (bsc#1103320).\n\nThis update was imported from the SUSE:SLE-15:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "openSUSE-SU-2020:0255-1",
|
||||
"PkgName": "zypper",
|
||||
"InstalledVersion": "1.14.30-lp151.2.3.1",
|
||||
"FixedVersion": "1.14.33-lp151.2.10.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:f7f9ae80878a1c56d8f9ca977a5d844168f7afc0c1429feef9366e713eac06ff"
|
||||
},
|
||||
"Title": "Security update for libsolv, libzypp, zypper",
|
||||
"Description": "This update for libsolv, libzypp, zypper fixes the following issues:\n\n\nSecurity issue fixed:\n\n- CVE-2019-18900: Fixed assert cookie file that was world readable (bsc#1158763).\n\nBug fixes\n\n- Fixed removing orphaned packages dropped by to-be-installed products (bsc#1155819).\n- Adds libzypp API to mark all obsolete kernels according to the existing purge-kernel script rules (bsc#1155198).\n- Do not enforce 'en' being in RequestedLocales If the user decides to have a system without explicit language support he may do so (bsc#1155678). \n- Load only target resolvables for zypper rm (bsc#1157377).\n- Fix broken search by filelist (bsc#1135114).\n- Replace python by a bash script in zypper-log (fixes#304, fixes#306, bsc#1156158).\n- Do not sort out requested locales which are not available (bsc#1155678).\n- Prevent listing duplicate matches in tables. XML result is provided within the new list-patches-byissue element (bsc#1154805). \n- XML add patch issue-date and issue-list (bsc#1154805).\n- Fix zypper lp --cve/bugzilla/issue options (bsc#1155298).\n- Always execute commit when adding/removing locales (fixes bsc#1155205).\n- Fix description of --table-style,-s in man page (bsc#1154804).\n\nThis update was imported from the SUSE:SLE-15-SP1:Update update project.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00036.html",
|
||||
"https://www.suse.com/support/security/rating/"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/opensuse-leap-423.tar.gz (opensuse.leap 42.3)",
|
||||
"Type": "opensuse.leap",
|
||||
"Vulnerabilities": null
|
||||
}
|
||||
]
|
||||
199
integration/testdata/oraclelinux-6-slim.json.golden
vendored
199
integration/testdata/oraclelinux-6-slim.json.golden
vendored
@@ -1,16 +1,72 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/oraclelinux-6-slim.tar.gz (oracle 6.10)",
|
||||
"Type": "oracle",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5482",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.19.7-53.0.2.el6_9",
|
||||
"FixedVersion": "7.19.7-54.0.2.el6_10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5482",
|
||||
"Title": "curl: heap buffer overflow in function tftp_receive_packet()",
|
||||
"Description": "Heap buffer overflow in the TFTP protocol handler in cURL 7.19.4 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-5482.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-5562.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5482.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5482",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RGDVKSLY5JUNJRLYRUA6CXGQ2LM63XC3/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UA7KDM2WPM5CJDDGOEGFV6SSGD2J7RNT/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5482",
|
||||
"PkgName": "libcurl",
|
||||
"InstalledVersion": "7.19.7-53.0.2.el6_9",
|
||||
"FixedVersion": "7.19.7-54.0.2.el6_10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5482",
|
||||
"Title": "curl: heap buffer overflow in function tftp_receive_packet()",
|
||||
"Description": "Heap buffer overflow in the TFTP protocol handler in cURL 7.19.4 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-5482.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-5562.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5482.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5482",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RGDVKSLY5JUNJRLYRUA6CXGQ2LM63XC3/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UA7KDM2WPM5CJDDGOEGFV6SSGD2J7RNT/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-3855",
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.4.2-2.el6_7.1",
|
||||
"FixedVersion": "1.4.2-3.0.1.el6_10.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3855",
|
||||
"Title": "libssh2: Integer overflow in transport read resulting in out of bounds write",
|
||||
"Description": "An integer overflow flaw which could lead to an out of bounds write was discovered in libssh2 before 1.8.1 in the way packets are read from the server. A remote attacker who compromises a SSH server may be able to execute code on the client system when a user connects to the server.",
|
||||
"Severity": "CRITICAL",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-3855.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-1652.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00040.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00003.html",
|
||||
"http://packetstormsecurity.com/files/152136/Slackware-Security-Advisory-libssh2-Updates.html",
|
||||
@@ -36,10 +92,17 @@
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.4.2-2.el6_7.1",
|
||||
"FixedVersion": "1.4.2-3.0.1.el6_10.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3856",
|
||||
"Title": "libssh2: Integer overflow in keyboard interactive handling resulting in out of bounds write",
|
||||
"Description": "An integer overflow flaw, which could lead to an out of bounds write, was discovered in libssh2 before 1.8.1 in the way keyboard prompt requests are parsed. A remote attacker who compromises a SSH server may be able to execute code on the client system when a user connects to the server.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-3856.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-1652.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00040.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00003.html",
|
||||
"https://access.redhat.com/errata/RHSA-2019:0679",
|
||||
@@ -59,10 +122,17 @@
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.4.2-2.el6_7.1",
|
||||
"FixedVersion": "1.4.2-3.0.1.el6_10.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3857",
|
||||
"Title": "libssh2: Integer overflow in SSH packet processing channel resulting in out of bounds write",
|
||||
"Description": "An integer overflow flaw which could lead to an out of bounds write was discovered in libssh2 before 1.8.1 in the way SSH_MSG_CHANNEL_REQUEST packets with an exit signal are parsed. A remote attacker who compromises a SSH server may be able to execute code on the client system when a user connects to the server.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-3857.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-1652.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00040.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00003.html",
|
||||
"https://access.redhat.com/errata/RHSA-2019:0679",
|
||||
@@ -82,10 +152,17 @@
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.4.2-2.el6_7.1",
|
||||
"FixedVersion": "1.4.2-2.0.1.el6_7.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3862",
|
||||
"Title": "libssh2: Out-of-bounds memory comparison with specially crafted message channel request",
|
||||
"Description": "An out of bounds read flaw was discovered in libssh2 before 1.8.1 in the way SSH_MSG_CHANNEL_REQUEST packets with an exit status message and no payload are parsed. A remote attacker who compromises a SSH server may be able to cause a Denial of Service or read data in the client memory.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-3862.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-4693.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00040.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00003.html",
|
||||
"http://packetstormsecurity.com/files/152136/Slackware-Security-Advisory-libssh2-Updates.html",
|
||||
@@ -109,10 +186,17 @@
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.4.2-2.el6_7.1",
|
||||
"FixedVersion": "1.4.2-3.0.1.el6_10.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3863",
|
||||
"Title": "libssh2: Integer overflow in user authenticate keyboard interactive allows out-of-bounds writes",
|
||||
"Description": "A flaw was found in libssh2 before 1.8.1. A server could send a multiple keyboard interactive response messages whose total length are greater than unsigned char max characters. This value is used as an index to copy memory causing in an out of bounds memory write error.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-3863.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-1652.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00040.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00003.html",
|
||||
"https://access.redhat.com/errata/RHSA-2019:0679",
|
||||
@@ -127,15 +211,80 @@
|
||||
"https://www.libssh2.org/CVE-2019-3863.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-11745",
|
||||
"PkgName": "nss-softokn",
|
||||
"InstalledVersion": "3.14.3-23.3.0.1.el6_8",
|
||||
"FixedVersion": "3.44.0-6.0.1.el6_10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-11745",
|
||||
"Title": "nss: Out-of-bounds write when passing an output buffer smaller than the block size to NSC_EncryptUpdate",
|
||||
"Description": "When encrypting with a block cipher, if a call to NSC_EncryptUpdate was made with data smaller than the block size, a small out of bounds write could occur. This could have caused heap corruption and a potentially exploitable crash. This vulnerability affects Thunderbird \u003c 68.3, Firefox ESR \u003c 68.3, and Firefox \u003c 71.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-11745.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-4190.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00000.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00001.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00006.html",
|
||||
"https://bugzilla.mozilla.org/show_bug.cgi?id=1586176",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11745",
|
||||
"https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.44.3_release_notes",
|
||||
"https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.47.1_release_notes",
|
||||
"https://usn.ubuntu.com/4241-1/",
|
||||
"https://www.mozilla.org/security/advisories/mfsa2019-36/",
|
||||
"https://www.mozilla.org/security/advisories/mfsa2019-37/",
|
||||
"https://www.mozilla.org/security/advisories/mfsa2019-38/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-11745",
|
||||
"PkgName": "nss-softokn-freebl",
|
||||
"InstalledVersion": "3.14.3-23.3.0.1.el6_8",
|
||||
"FixedVersion": "3.44.0-6.0.1.el6_10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-11745",
|
||||
"Title": "nss: Out-of-bounds write when passing an output buffer smaller than the block size to NSC_EncryptUpdate",
|
||||
"Description": "When encrypting with a block cipher, if a call to NSC_EncryptUpdate was made with data smaller than the block size, a small out of bounds write could occur. This could have caused heap corruption and a potentially exploitable crash. This vulnerability affects Thunderbird \u003c 68.3, Firefox ESR \u003c 68.3, and Firefox \u003c 71.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-11745.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-4190.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00000.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00001.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00006.html",
|
||||
"https://bugzilla.mozilla.org/show_bug.cgi?id=1586176",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-11745",
|
||||
"https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.44.3_release_notes",
|
||||
"https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.47.1_release_notes",
|
||||
"https://usn.ubuntu.com/4241-1/",
|
||||
"https://www.mozilla.org/security/advisories/mfsa2019-36/",
|
||||
"https://www.mozilla.org/security/advisories/mfsa2019-37/",
|
||||
"https://www.mozilla.org/security/advisories/mfsa2019-38/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1559",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.1e-57.0.6.el6",
|
||||
"FixedVersion": "1.0.1e-58.0.1.el6_10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1559",
|
||||
"Title": "openssl: 0-byte record padding oracle",
|
||||
"Description": "If an application encounters a fatal protocol error and then calls SSL_shutdown() twice (once to send a close_notify, and once to receive one) then OpenSSL can respond differently to the calling application if a 0 byte record is received with invalid padding compared to if a 0 byte record is received with an invalid MAC. If the application then behaves differently based on that in a way that is detectable to the remote peer, then this amounts to a padding oracle that could be used to decrypt data. In order for this to be exploitable \"non-stitched\" ciphersuites must be in use. Stitched ciphersuites are optimised implementations of certain commonly used ciphersuites. Also the application must call SSL_shutdown() twice even if a protocol error has occurred (applications should not do this but some do anyway). Fixed in OpenSSL 1.0.2r (Affected 1.0.2-1.0.2q).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-1559.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-2471.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00041.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00019.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00046.html",
|
||||
@@ -159,6 +308,54 @@
|
||||
"https://www.tenable.com/security/tns-2019-02",
|
||||
"https://www.tenable.com/security/tns-2019-03"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-20852",
|
||||
"PkgName": "python",
|
||||
"InstalledVersion": "2.6.6-68.0.1.el6_10",
|
||||
"FixedVersion": "2.6.6-68.0.2.el6_10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-20852",
|
||||
"Title": "python: Cookie domain check returns incorrect results",
|
||||
"Description": "http.cookiejar.DefaultPolicy.domain_return_ok in Lib/http/cookiejar.py in Python before 3.7.3 does not correctly validate the domain: it can be tricked into sending existing cookies to the wrong server. An attacker may abuse this flaw by using a server with a hostname that has another valid hostname as a suffix (e.g., pythonicexample.com to steal cookies for example.com). When a program uses http.cookiejar.DefaultPolicy and tries to do an HTTP connection to an attacker-controlled server, existing cookies can be leaked to the attacker. This affects 2.x through 2.7.16, 3.x before 3.4.10, 3.5.x before 3.5.7, 3.6.x before 3.6.9, and 3.7.x before 3.7.3.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2018-20852.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-4884.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00071.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00074.html",
|
||||
"https://bugs.python.org/issue35121",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20852",
|
||||
"https://lists.debian.org/debian-lts-announce/2019/08/msg00022.html",
|
||||
"https://python-security.readthedocs.io/vuln/cookie-domain-check.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-20852",
|
||||
"PkgName": "python-libs",
|
||||
"InstalledVersion": "2.6.6-68.0.1.el6_10",
|
||||
"FixedVersion": "2.6.6-68.0.2.el6_10",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:a6f189f69066d36aff8efe2602482d28c02de433aef44ee9087b291df7e8fd08"
|
||||
},
|
||||
"SeveritySource": "nvd",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-20852",
|
||||
"Title": "python: Cookie domain check returns incorrect results",
|
||||
"Description": "http.cookiejar.DefaultPolicy.domain_return_ok in Lib/http/cookiejar.py in Python before 3.7.3 does not correctly validate the domain: it can be tricked into sending existing cookies to the wrong server. An attacker may abuse this flaw by using a server with a hostname that has another valid hostname as a suffix (e.g., pythonicexample.com to steal cookies for example.com). When a program uses http.cookiejar.DefaultPolicy and tries to do an HTTP connection to an attacker-controlled server, existing cookies can be leaked to the attacker. This affects 2.x through 2.7.16, 3.x before 3.4.10, 3.5.x before 3.5.7, 3.6.x before 3.6.9, and 3.7.x before 3.7.3.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2018-20852.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-4884.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00071.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00074.html",
|
||||
"https://bugs.python.org/issue35121",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20852",
|
||||
"https://lists.debian.org/debian-lts-announce/2019/08/msg00022.html",
|
||||
"https://python-security.readthedocs.io/vuln/cookie-domain-check.html"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
810
integration/testdata/oraclelinux-7-slim.json.golden
vendored
810
integration/testdata/oraclelinux-7-slim.json.golden
vendored
File diff suppressed because it is too large
Load Diff
1024
integration/testdata/oraclelinux-8-slim.json.golden
vendored
1024
integration/testdata/oraclelinux-8-slim.json.golden
vendored
File diff suppressed because it is too large
Load Diff
463
integration/testdata/photon-10.json.golden
vendored
463
integration/testdata/photon-10.json.golden
vendored
@@ -1,15 +1,40 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/photon-10.tar.gz (photon 1.0)",
|
||||
"Type": "photon",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-18276",
|
||||
"PkgName": "bash",
|
||||
"InstalledVersion": "4.3.48-3.ph1",
|
||||
"FixedVersion": "4.3.48-5.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-18276",
|
||||
"Title": "bash: when effective UID is not equal to its real UID the saved UID is not dropped",
|
||||
"Description": "An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. By default, if Bash is run with its effective UID not equal to its real UID, it will drop privileges by setting its effective UID to its real UID. However, it does so incorrectly. On Linux and other systems that support \"saved UID\" functionality, the saved UID is not dropped. An attacker with command execution in the shell can use \"enable -f\" for runtime loading of a new builtin, which can be a shared object that calls setuid() and therefore regains privileges. However, binaries running with an effective UID of 0 are unaffected.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/155498/Bash-5.0-Patch-11-Privilege-Escalation.html",
|
||||
"https://github.com/bminor/bash/commit/951bdaad7a18cc0dc1036bba86b18b90874d39ff",
|
||||
"https://www.youtube.com/watch?v=-wGtxJ8opa8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2012-6711",
|
||||
"PkgName": "bash",
|
||||
"InstalledVersion": "4.3.48-3.ph1",
|
||||
"FixedVersion": "4.3.48-4.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2012-6711",
|
||||
"Title": "bash: heap-based buffer overflow during echo of unsupported characters",
|
||||
"Description": "A heap-based buffer overflow exists in GNU Bash before 4.3 when wide characters, not supported by the current locale set in the LC_CTYPE environment variable, are printed through the echo built-in function. A local attacker, who can provide data to print through the \"echo -e\" built-in function, may use this flaw to crash a script or execute code with the privileges of the bash process. This occurs because ansicstr() in lib/sh/strtrans.c mishandles u32cconv().",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel\u0026id=863d31ae775d56b785dc5b0105b6d251515d81d5",
|
||||
"http://www.securityfocus.com/bid/108824",
|
||||
@@ -17,14 +42,229 @@
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6711"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5481",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.59.0-8.ph1",
|
||||
"FixedVersion": "7.59.0-9.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5481",
|
||||
"Title": "curl: double free due to subsequent call of realloc()",
|
||||
"Description": "Double-free vulnerability in the FTP-kerberos code in cURL 7.52.0 to 7.65.3.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5481.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5481",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RGDVKSLY5JUNJRLYRUA6CXGQ2LM63XC3/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UA7KDM2WPM5CJDDGOEGFV6SSGD2J7RNT/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5482",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.59.0-8.ph1",
|
||||
"FixedVersion": "7.59.0-9.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5482",
|
||||
"Title": "curl: heap buffer overflow in function tftp_receive_packet()",
|
||||
"Description": "Heap buffer overflow in the TFTP protocol handler in cURL 7.19.4 to 7.65.3.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-5482.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-5562.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5482.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5482",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RGDVKSLY5JUNJRLYRUA6CXGQ2LM63XC3/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UA7KDM2WPM5CJDDGOEGFV6SSGD2J7RNT/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-18218",
|
||||
"PkgName": "file",
|
||||
"InstalledVersion": "5.24-3.ph1",
|
||||
"FixedVersion": "5.24-4.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-18218",
|
||||
"Title": "file: heap-based buffer overflow in cdf_read_property_info in cdf.c",
|
||||
"Description": "cdf_read_property_info in cdf.c in file through 5.37 does not restrict the number of CDF_VECTOR elements, which allows a heap-based buffer overflow (4-byte out-of-bounds write).",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16780",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18218",
|
||||
"https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84",
|
||||
"https://lists.debian.org/debian-lts-announce/2019/10/msg00032.html",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CV6PFCEYHYALMTT45QE2U5C5TEJZQPXJ/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VBK6XOJR6OVWT2FUEBO7V7KCOSSLAP52/",
|
||||
"https://usn.ubuntu.com/4172-1/",
|
||||
"https://usn.ubuntu.com/4172-2/",
|
||||
"https://www.debian.org/security/2019/dsa-4550"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-20387",
|
||||
"PkgName": "libsolv",
|
||||
"InstalledVersion": "0.6.19-6.ph1",
|
||||
"FixedVersion": "0.6.19-7.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-20387",
|
||||
"Title": "libsolv: out-of-bounds read in repodata_schema2id in repodata.c",
|
||||
"Description": "repodata_schema2id in repodata.c in libsolv before 0.7.6 has a heap-based buffer over-read via a last schema whose length is less than the length of the input schema.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-20387",
|
||||
"https://github.com/openSUSE/libsolv/commit/fdb9c9c03508990e4583046b590c30d958f272da",
|
||||
"https://github.com/openSUSE/libsolv/compare/0.7.5...0.7.6",
|
||||
"https://lists.debian.org/debian-lts-announce/2020/01/msg00034.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17498",
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.9.0-1.ph1",
|
||||
"FixedVersion": "1.9.0-2.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17498",
|
||||
"Title": "libssh2: integer overflow in SSH_MSG_DISCONNECT logic in packet.c",
|
||||
"Description": "In libssh2 v1.9.0 and earlier versions, the SSH_MSG_DISCONNECT logic in packet.c has an integer overflow in a bounds check, enabling an attacker to specify an arbitrary (out-of-bounds) offset for a subsequent memory read. A crafted SSH server may be able to disclose sensitive information or cause a denial of service condition on the client system when a user connects to the server.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00026.html",
|
||||
"https://blog.semmle.com/libssh2-integer-overflow-CVE-2019-17498/",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17498",
|
||||
"https://github.com/kevinbackhouse/SecurityExploits/tree/8cbdbbe6363510f7d9ceec685373da12e6fc752d/libssh2/out_of_bounds_read_disconnect_CVE-2019-17498",
|
||||
"https://github.com/libssh2/libssh2/blob/42d37aa63129a1b2644bf6495198923534322d64/src/packet.c#L480",
|
||||
"https://github.com/libssh2/libssh2/pull/402/commits/1c6fa92b77e34d089493fe6d3e2c6c8775858b94",
|
||||
"https://lists.debian.org/debian-lts-announce/2019/11/msg00010.html",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TY7EEE34RFKCTXTMBQQWWSLXZWSCXNDB/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17594",
|
||||
"PkgName": "ncurses",
|
||||
"InstalledVersion": "6.0-9.ph1",
|
||||
"FixedVersion": "6.0-10.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17594",
|
||||
"Title": "ncurses: heap-based buffer overflow in the _nc_find_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the _nc_find_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17594",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00017.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17595",
|
||||
"PkgName": "ncurses",
|
||||
"InstalledVersion": "6.0-9.ph1",
|
||||
"FixedVersion": "6.0-10.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17595",
|
||||
"Title": "ncurses: heap-based buffer overflow in the fmt_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the fmt_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17595",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00013.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph1",
|
||||
"FixedVersion": "1.0.2t-1.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph1",
|
||||
"FixedVersion": "1.0.2u-1.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph1",
|
||||
"FixedVersion": "1.0.2t-1.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
@@ -37,23 +277,210 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1547",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph1",
|
||||
"FixedVersion": "1.0.2t-1.ph1",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"VulnerabilityID": "CVE-2019-19317",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.30.1-2.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19317",
|
||||
"Title": "sqlite: omits bits from the colUsed bitmask in the case of a generated column",
|
||||
"Description": "lookupName in resolve.c in SQLite 3.30.1 omits bits from the colUsed bitmask in the case of a generated column, which allows attackers to cause a denial of service or possibly have unspecified other impact.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1547",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=21c856b75d81eff61aa63b4f036bb64a85bf6d46",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=30c22fa8b1d840036b8e203585738df62a03cec8",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=7c1709c2da5414f5b6133d00a03fc8c5bf996c7a",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
"https://github.com/sqlite/sqlite/commit/522ebfa7cee96fb325a22ea3a2464a63485886a8",
|
||||
"https://github.com/sqlite/sqlite/commit/73bacb7f93eab9f4bd5a65cbc4ae242acf63c9e3",
|
||||
"https://security.netapp.com/advisory/ntap-20191223-0001/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19603",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.30.1-2.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19603",
|
||||
"Title": "sqlite: mishandles certain SELECT statements with a nonexistent VIEW, leading to DoS",
|
||||
"Description": "SQLite 3.30.1 mishandles certain SELECT statements with a nonexistent VIEW, leading to an application crash.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/527cbd4a104cb93bf3994b3dd3619a6299a78b13",
|
||||
"https://security.netapp.com/advisory/ntap-20191223-0001/",
|
||||
"https://www.sqlite.org/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19646",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.30.1-2.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19646",
|
||||
"Title": "sqlite: pragma.c mishandles NOT NULL in an integrity_check PRAGMA command in certain cases of generated columns",
|
||||
"Description": "pragma.c in SQLite through 3.30.1 mishandles NOT NULL in an integrity_check PRAGMA command in certain cases of generated columns.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/926f796e8feec15f3836aa0a060ed906f8ae04d3",
|
||||
"https://github.com/sqlite/sqlite/commit/ebd70eedd5d6e6a890a670b5ee874a5eae86b4dd",
|
||||
"https://security.netapp.com/advisory/ntap-20191223-0001/",
|
||||
"https://www.sqlite.org/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-20218",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.30.1-2.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-20218",
|
||||
"Title": "sqlite: selectExpander in select.c proceeds with WITH stack unwinding even after a parsing error",
|
||||
"Description": "selectExpander in select.c in SQLite 3.30.1 proceeds with WITH stack unwinding even after a parsing error.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/a6c1a71cde082e09750465d5675699062922e387",
|
||||
"https://usn.ubuntu.com/4298-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19244",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.31.1-1.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19244",
|
||||
"Title": "sqlite: allows a crash if a sub-select uses both DISTINCT and window functions and also has certain ORDER BY usage",
|
||||
"Description": "sqlite3Select in select.c in SQLite 3.30.1 allows a crash if a sub-select uses both DISTINCT and window functions, and also has certain ORDER BY usage.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/e59c562b3f6894f84c715772c4b116d7b5c01348",
|
||||
"https://usn.ubuntu.com/4205-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19880",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.30.1-2.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19880",
|
||||
"Title": "sqlite: invalid pointer dereference in exprListAppendList in window.c",
|
||||
"Description": "exprListAppendList in window.c in SQLite 3.30.1 allows attackers to trigger an invalid pointer dereference because constant integer values in ORDER BY clauses of window definitions are mishandled.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19880",
|
||||
"https://github.com/sqlite/sqlite/commit/75e95e1fcd52d3ec8282edb75ac8cd0814095d54",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0001/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19923",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.31.1-1.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19923",
|
||||
"Title": "sqlite: mishandling of certain uses of SELECT DISTINCT involving a LEFT JOIN in flattenSubquery in select.c leads to a NULL pointer dereference",
|
||||
"Description": "flattenSubquery in select.c in SQLite 3.30.1 mishandles certain uses of SELECT DISTINCT involving a LEFT JOIN in which the right-hand side is a view. This can cause a NULL pointer dereference (or incorrect results).",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19923",
|
||||
"https://github.com/sqlite/sqlite/commit/396afe6f6aa90a31303c183e11b2b2d4b7956b35",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0003/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19925",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.31.1-1.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19925",
|
||||
"Title": "sqlite: zipfileUpdate in ext/misc/zipfile.c mishandles a NULL pathname during an update of a ZIP archive",
|
||||
"Description": "zipfileUpdate in ext/misc/zipfile.c in SQLite 3.30.1 mishandles a NULL pathname during an update of a ZIP archive.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19925",
|
||||
"https://github.com/sqlite/sqlite/commit/54d501092d88c0cf89bec4279951f548fb0b8618",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0003/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19926",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.31.1-1.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19926",
|
||||
"Title": "sqlite: error mishandling because of incomplete fix of CVE-2019-19880",
|
||||
"Description": "multiSelect in select.c in SQLite 3.30.1 mishandles certain errors during parsing, as demonstrated by errors from sqlite3WindowRewrite() calls. NOTE: this vulnerability exists because of an incomplete fix for CVE-2019-19880.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19926",
|
||||
"https://github.com/sqlite/sqlite/commit/8428b3b437569338a9d1e10c4cd8154acbe33089",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0003/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19959",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.31.1-1.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19959",
|
||||
"Title": "sqlite: mishandles certain uses of INSERT INTO in situations involving embedded '\\0' characters in filenames",
|
||||
"Description": "ext/misc/zipfile.c in SQLite 3.30.1 mishandles certain uses of INSERT INTO in situations involving embedded '\\0' characters in filenames, leading to a memory-management error that can be detected by (for example) valgrind.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/1e490c4ca6b43a9cf8637d695907888349f69bec",
|
||||
"https://github.com/sqlite/sqlite/commit/d8f2d46cbc9925e034a68aaaf60aad788d9373c1",
|
||||
"https://security.netapp.com/advisory/ntap-20200204-0001/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19645",
|
||||
"PkgName": "sqlite-autoconf",
|
||||
"InstalledVersion": "3.27.2-3.ph1",
|
||||
"FixedVersion": "3.30.1-2.ph1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:9740df1ac227d21600b22524f869c9bec2d8c13446d1c8579a6195b6d855ae2b"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19645",
|
||||
"Title": "sqlite: infinite recursion via certain types of self-referential views in conjunction with ALTER TABLE statements",
|
||||
"Description": "alter.c in SQLite through 3.30.1 allows attackers to trigger infinite recursion via certain types of self-referential views in conjunction with ALTER TABLE statements.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/38096961c7cd109110ac21d3ed7dad7e0cb0ae06",
|
||||
"https://security.netapp.com/advisory/ntap-20191223-0001/"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
455
integration/testdata/photon-20.json.golden
vendored
455
integration/testdata/photon-20.json.golden
vendored
@@ -1,19 +1,45 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/photon-20.tar.gz (photon 2.0)",
|
||||
"Type": "photon",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-18276",
|
||||
"PkgName": "bash",
|
||||
"InstalledVersion": "4.4.12-3.ph2",
|
||||
"FixedVersion": "4.4.18-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-18276",
|
||||
"Title": "bash: when effective UID is not equal to its real UID the saved UID is not dropped",
|
||||
"Description": "An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. By default, if Bash is run with its effective UID not equal to its real UID, it will drop privileges by setting its effective UID to its real UID. However, it does so incorrectly. On Linux and other systems that support \"saved UID\" functionality, the saved UID is not dropped. An attacker with command execution in the shell can use \"enable -f\" for runtime loading of a new builtin, which can be a shared object that calls setuid() and therefore regains privileges. However, binaries running with an effective UID of 0 are unaffected.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/155498/Bash-5.0-Patch-11-Privilege-Escalation.html",
|
||||
"https://github.com/bminor/bash/commit/951bdaad7a18cc0dc1036bba86b18b90874d39ff",
|
||||
"https://www.youtube.com/watch?v=-wGtxJ8opa8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5481",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.59.0-7.ph2",
|
||||
"FixedVersion": "7.59.0-9.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5481",
|
||||
"Title": "curl: double free due to subsequent call of realloc()",
|
||||
"Description": "Double-free vulnerability in the FTP-kerberos code in cURL 7.52.0 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5481.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5481",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RGDVKSLY5JUNJRLYRUA6CXGQ2LM63XC3/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UA7KDM2WPM5CJDDGOEGFV6SSGD2J7RNT/"
|
||||
]
|
||||
@@ -23,10 +49,17 @@
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.59.0-7.ph2",
|
||||
"FixedVersion": "7.59.0-9.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5482",
|
||||
"Title": "curl: heap buffer overflow in function tftp_receive_packet()",
|
||||
"Description": "Heap buffer overflow in the TFTP protocol handler in cURL 7.19.4 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-5482.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-5562.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5482.html",
|
||||
@@ -40,10 +73,17 @@
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.59.0-7.ph2",
|
||||
"FixedVersion": "7.59.0-8.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-16890",
|
||||
"Title": "curl: NTLM type-2 heap out-of-bounds buffer read",
|
||||
"Description": "libcurl versions from 7.36.0 to before 7.64.0 is vulnerable to a heap buffer out-of-bounds read. The function handling incoming NTLM type-2 messages (`lib/vauth/ntlm.c:ntlm_decode_type2_target`) does not validate incoming data correctly and is subject to an integer overflow vulnerability. Using that overflow, a malicious or broken NTLM server could trick libcurl to accept a bad length + offset combination that would lead to a buffer read out-of-bounds.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2018-16890.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-3701.html",
|
||||
"http://www.securityfocus.com/bid/106947",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16890",
|
||||
"https://cert-portal.siemens.com/productcert/pdf/ssa-436177.pdf",
|
||||
@@ -62,13 +102,19 @@
|
||||
"PkgName": "curl-libs",
|
||||
"InstalledVersion": "7.59.0-7.ph2",
|
||||
"FixedVersion": "7.59.0-9.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5481",
|
||||
"Title": "curl: double free due to subsequent call of realloc()",
|
||||
"Description": "Double-free vulnerability in the FTP-kerberos code in cURL 7.52.0 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5481.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5481",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RGDVKSLY5JUNJRLYRUA6CXGQ2LM63XC3/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UA7KDM2WPM5CJDDGOEGFV6SSGD2J7RNT/"
|
||||
]
|
||||
@@ -78,10 +124,17 @@
|
||||
"PkgName": "curl-libs",
|
||||
"InstalledVersion": "7.59.0-7.ph2",
|
||||
"FixedVersion": "7.59.0-9.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5482",
|
||||
"Title": "curl: heap buffer overflow in function tftp_receive_packet()",
|
||||
"Description": "Heap buffer overflow in the TFTP protocol handler in cURL 7.19.4 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-5482.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-5562.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5482.html",
|
||||
@@ -95,10 +148,17 @@
|
||||
"PkgName": "curl-libs",
|
||||
"InstalledVersion": "7.59.0-7.ph2",
|
||||
"FixedVersion": "7.59.0-8.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-16890",
|
||||
"Title": "curl: NTLM type-2 heap out-of-bounds buffer read",
|
||||
"Description": "libcurl versions from 7.36.0 to before 7.64.0 is vulnerable to a heap buffer out-of-bounds read. The function handling incoming NTLM type-2 messages (`lib/vauth/ntlm.c:ntlm_decode_type2_target`) does not validate incoming data correctly and is subject to an integer overflow vulnerability. Using that overflow, a malicious or broken NTLM server could trick libcurl to accept a bad length + offset combination that would lead to a buffer read out-of-bounds.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2018-16890.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-3701.html",
|
||||
"http://www.securityfocus.com/bid/106947",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16890",
|
||||
"https://cert-portal.siemens.com/productcert/pdf/ssa-436177.pdf",
|
||||
@@ -117,6 +177,12 @@
|
||||
"PkgName": "e2fsprogs-libs",
|
||||
"InstalledVersion": "1.43.4-2.ph2",
|
||||
"FixedVersion": "1.43.4-3.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -128,11 +194,38 @@
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "e2fsprogs-libs",
|
||||
"InstalledVersion": "1.43.4-2.ph2",
|
||||
"FixedVersion": "1.43.4-4.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2018-20843",
|
||||
"PkgName": "expat-libs",
|
||||
"InstalledVersion": "2.2.4-1.ph2",
|
||||
"FixedVersion": "2.2.4-2.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2018-20843",
|
||||
"Title": "expat: large number of colons in input makes parser consume high amount of resources, leading to DoS",
|
||||
"Description": "In libexpat in Expat before 2.2.7, XML input including XML names that contain a large number of colons could make the XML parser consume a high amount of RAM and CPU resources while processing (enough to be usable for denial-of-service attacks).",
|
||||
"Severity": "HIGH",
|
||||
@@ -152,14 +245,39 @@
|
||||
"https://www.debian.org/security/2019/dsa-4472"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-20387",
|
||||
"PkgName": "libsolv",
|
||||
"InstalledVersion": "0.6.26-4.ph2",
|
||||
"FixedVersion": "0.6.26-5.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-20387",
|
||||
"Title": "libsolv: out-of-bounds read in repodata_schema2id in repodata.c",
|
||||
"Description": "repodata_schema2id in repodata.c in libsolv before 0.7.6 has a heap-based buffer over-read via a last schema whose length is less than the length of the input schema.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-20387",
|
||||
"https://github.com/openSUSE/libsolv/commit/fdb9c9c03508990e4583046b590c30d958f272da",
|
||||
"https://github.com/openSUSE/libsolv/compare/0.7.5...0.7.6",
|
||||
"https://lists.debian.org/debian-lts-announce/2020/01/msg00034.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-13115",
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.8.2-1.ph2",
|
||||
"FixedVersion": "1.9.0-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-13115",
|
||||
"Title": "libssh2: integer overflow in kex_method_diffie_hellman_group_exchange_sha256_key_exchange in kex.c leads to out-of-bounds write",
|
||||
"Description": "In libssh2 before 1.9.0, kex_method_diffie_hellman_group_exchange_sha256_key_exchange in kex.c has an integer overflow that could lead to an out-of-bounds read in the way packets are read from the server. A remote attacker who compromises a SSH server may be able to disclose sensitive information or cause a denial of service condition on the client system when a user connects to the server. This is related to an _libssh2_check_length mistake, and is different from the various issues fixed in 1.8.1, such as CVE-2019-3855.",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://blog.semmle.com/libssh2-integer-overflow/",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13115",
|
||||
@@ -170,22 +288,69 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph2",
|
||||
"FixedVersion": "1.0.2t-1.ph2",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"VulnerabilityID": "CVE-2019-17498",
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.8.2-1.ph2",
|
||||
"FixedVersion": "1.9.0-2.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17498",
|
||||
"Title": "libssh2: integer overflow in SSH_MSG_DISCONNECT logic in packet.c",
|
||||
"Description": "In libssh2 v1.9.0 and earlier versions, the SSH_MSG_DISCONNECT logic in packet.c has an integer overflow in a bounds check, enabling an attacker to specify an arbitrary (out-of-bounds) offset for a subsequent memory read. A crafted SSH server may be able to disclose sensitive information or cause a denial of service condition on the client system when a user connects to the server.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00026.html",
|
||||
"https://blog.semmle.com/libssh2-integer-overflow-CVE-2019-17498/",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17498",
|
||||
"https://github.com/kevinbackhouse/SecurityExploits/tree/8cbdbbe6363510f7d9ceec685373da12e6fc752d/libssh2/out_of_bounds_read_disconnect_CVE-2019-17498",
|
||||
"https://github.com/libssh2/libssh2/blob/42d37aa63129a1b2644bf6495198923534322d64/src/packet.c#L480",
|
||||
"https://github.com/libssh2/libssh2/pull/402/commits/1c6fa92b77e34d089493fe6d3e2c6c8775858b94",
|
||||
"https://lists.debian.org/debian-lts-announce/2019/11/msg00010.html",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TY7EEE34RFKCTXTMBQQWWSLXZWSCXNDB/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17594",
|
||||
"PkgName": "ncurses-libs",
|
||||
"InstalledVersion": "6.0-14.ph2",
|
||||
"FixedVersion": "6.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17594",
|
||||
"Title": "ncurses: heap-based buffer overflow in the _nc_find_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the _nc_find_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17594",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00017.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17595",
|
||||
"PkgName": "ncurses-libs",
|
||||
"InstalledVersion": "6.0-14.ph2",
|
||||
"FixedVersion": "6.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17595",
|
||||
"Title": "ncurses: heap-based buffer overflow in the fmt_entry function in tinfo/comp_hash.c",
|
||||
"Description": "There is a heap-based buffer over-read in the fmt_entry function in tinfo/comp_hash.c in the terminfo library in ncurses before 6.1-20191012.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00059.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00061.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17595",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00013.html",
|
||||
"https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00045.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -193,9 +358,14 @@
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph2",
|
||||
"FixedVersion": "1.0.2t-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
@@ -208,19 +378,262 @@
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph2",
|
||||
"FixedVersion": "1.0.2t-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19317",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.27.2-7.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19317",
|
||||
"Title": "sqlite: omits bits from the colUsed bitmask in the case of a generated column",
|
||||
"Description": "lookupName in resolve.c in SQLite 3.30.1 omits bits from the colUsed bitmask in the case of a generated column, which allows attackers to cause a denial of service or possibly have unspecified other impact.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/522ebfa7cee96fb325a22ea3a2464a63485886a8",
|
||||
"https://github.com/sqlite/sqlite/commit/73bacb7f93eab9f4bd5a65cbc4ae242acf63c9e3",
|
||||
"https://security.netapp.com/advisory/ntap-20191223-0001/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19603",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.27.2-7.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19603",
|
||||
"Title": "sqlite: mishandles certain SELECT statements with a nonexistent VIEW, leading to DoS",
|
||||
"Description": "SQLite 3.30.1 mishandles certain SELECT statements with a nonexistent VIEW, leading to an application crash.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/527cbd4a104cb93bf3994b3dd3619a6299a78b13",
|
||||
"https://security.netapp.com/advisory/ntap-20191223-0001/",
|
||||
"https://www.sqlite.org/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19646",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.27.2-7.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19646",
|
||||
"Title": "sqlite: pragma.c mishandles NOT NULL in an integrity_check PRAGMA command in certain cases of generated columns",
|
||||
"Description": "pragma.c in SQLite through 3.30.1 mishandles NOT NULL in an integrity_check PRAGMA command in certain cases of generated columns.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/926f796e8feec15f3836aa0a060ed906f8ae04d3",
|
||||
"https://github.com/sqlite/sqlite/commit/ebd70eedd5d6e6a890a670b5ee874a5eae86b4dd",
|
||||
"https://security.netapp.com/advisory/ntap-20191223-0001/",
|
||||
"https://www.sqlite.org/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-20218",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.30.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-20218",
|
||||
"Title": "sqlite: selectExpander in select.c proceeds with WITH stack unwinding even after a parsing error",
|
||||
"Description": "selectExpander in select.c in SQLite 3.30.1 proceeds with WITH stack unwinding even after a parsing error.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/a6c1a71cde082e09750465d5675699062922e387",
|
||||
"https://usn.ubuntu.com/4298-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-16168",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.27.2-5.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-16168",
|
||||
"Title": "sqlite: division by zero in whereLoopAddBtreeIndex in sqlite3.c",
|
||||
"Description": "In SQLite through 3.29.0, whereLoopAddBtreeIndex in sqlite3.c can crash a browser or other application because of missing validation of a sqlite_stat1 sz field, aka a \"severe division by zero in the query planner.\"",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-10/msg00032.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-10/msg00033.html",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XZARJHJJDBHI7CE5PZEBXS5HKK6HXKW2/",
|
||||
"https://security.netapp.com/advisory/ntap-20190926-0003/",
|
||||
"https://security.netapp.com/advisory/ntap-20200122-0003/",
|
||||
"https://usn.ubuntu.com/4205-1/",
|
||||
"https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg116312.html",
|
||||
"https://www.oracle.com/security-alerts/cpujan2020.html",
|
||||
"https://www.sqlite.org/src/info/e4598ecbdd18bd82945f6029013296690e719a62",
|
||||
"https://www.sqlite.org/src/timeline?c=98357d8c1263920b"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19244",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.31.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19244",
|
||||
"Title": "sqlite: allows a crash if a sub-select uses both DISTINCT and window functions and also has certain ORDER BY usage",
|
||||
"Description": "sqlite3Select in select.c in SQLite 3.30.1 allows a crash if a sub-select uses both DISTINCT and window functions, and also has certain ORDER BY usage.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/e59c562b3f6894f84c715772c4b116d7b5c01348",
|
||||
"https://usn.ubuntu.com/4205-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19880",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.30.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19880",
|
||||
"Title": "sqlite: invalid pointer dereference in exprListAppendList in window.c",
|
||||
"Description": "exprListAppendList in window.c in SQLite 3.30.1 allows attackers to trigger an invalid pointer dereference because constant integer values in ORDER BY clauses of window definitions are mishandled.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19880",
|
||||
"https://github.com/sqlite/sqlite/commit/75e95e1fcd52d3ec8282edb75ac8cd0814095d54",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0001/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19923",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.31.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19923",
|
||||
"Title": "sqlite: mishandling of certain uses of SELECT DISTINCT involving a LEFT JOIN in flattenSubquery in select.c leads to a NULL pointer dereference",
|
||||
"Description": "flattenSubquery in select.c in SQLite 3.30.1 mishandles certain uses of SELECT DISTINCT involving a LEFT JOIN in which the right-hand side is a view. This can cause a NULL pointer dereference (or incorrect results).",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19923",
|
||||
"https://github.com/sqlite/sqlite/commit/396afe6f6aa90a31303c183e11b2b2d4b7956b35",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0003/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19925",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.31.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19925",
|
||||
"Title": "sqlite: zipfileUpdate in ext/misc/zipfile.c mishandles a NULL pathname during an update of a ZIP archive",
|
||||
"Description": "zipfileUpdate in ext/misc/zipfile.c in SQLite 3.30.1 mishandles a NULL pathname during an update of a ZIP archive.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19925",
|
||||
"https://github.com/sqlite/sqlite/commit/54d501092d88c0cf89bec4279951f548fb0b8618",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0003/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19926",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.31.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19926",
|
||||
"Title": "sqlite: error mishandling because of incomplete fix of CVE-2019-19880",
|
||||
"Description": "multiSelect in select.c in SQLite 3.30.1 mishandles certain errors during parsing, as demonstrated by errors from sqlite3WindowRewrite() calls. NOTE: this vulnerability exists because of an incomplete fix for CVE-2019-19880.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19926",
|
||||
"https://github.com/sqlite/sqlite/commit/8428b3b437569338a9d1e10c4cd8154acbe33089",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0003/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19959",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.31.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19959",
|
||||
"Title": "sqlite: mishandles certain uses of INSERT INTO in situations involving embedded '\\0' characters in filenames",
|
||||
"Description": "ext/misc/zipfile.c in SQLite 3.30.1 mishandles certain uses of INSERT INTO in situations involving embedded '\\0' characters in filenames, leading to a memory-management error that can be detected by (for example) valgrind.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/1e490c4ca6b43a9cf8637d695907888349f69bec",
|
||||
"https://github.com/sqlite/sqlite/commit/d8f2d46cbc9925e034a68aaaf60aad788d9373c1",
|
||||
"https://security.netapp.com/advisory/ntap-20200204-0001/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19645",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph2",
|
||||
"FixedVersion": "3.30.1-1.ph2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:41cdb0d109d6a7cf33d6a439c3d6e586d7dba0be84606066693ea4573a4a9b66"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19645",
|
||||
"Title": "sqlite: infinite recursion via certain types of self-referential views in conjunction with ALTER TABLE statements",
|
||||
"Description": "alter.c in SQLite through 3.30.1 allows attackers to trigger infinite recursion via certain types of self-referential views in conjunction with ALTER TABLE statements.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/38096961c7cd109110ac21d3ed7dad7e0cb0ae06",
|
||||
"https://security.netapp.com/advisory/ntap-20191223-0001/"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
283
integration/testdata/photon-30.json.golden
vendored
283
integration/testdata/photon-30.json.golden
vendored
@@ -1,19 +1,45 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/photon-30.tar.gz (photon 3.0)",
|
||||
"Type": "photon",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-18276",
|
||||
"PkgName": "bash",
|
||||
"InstalledVersion": "4.4.18-1.ph3",
|
||||
"FixedVersion": "4.4.18-2.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-18276",
|
||||
"Title": "bash: when effective UID is not equal to its real UID the saved UID is not dropped",
|
||||
"Description": "An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. By default, if Bash is run with its effective UID not equal to its real UID, it will drop privileges by setting its effective UID to its real UID. However, it does so incorrectly. On Linux and other systems that support \"saved UID\" functionality, the saved UID is not dropped. An attacker with command execution in the shell can use \"enable -f\" for runtime loading of a new builtin, which can be a shared object that calls setuid() and therefore regains privileges. However, binaries running with an effective UID of 0 are unaffected.",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/155498/Bash-5.0-Patch-11-Privilege-Escalation.html",
|
||||
"https://github.com/bminor/bash/commit/951bdaad7a18cc0dc1036bba86b18b90874d39ff",
|
||||
"https://www.youtube.com/watch?v=-wGtxJ8opa8"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5481",
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.61.1-4.ph3",
|
||||
"FixedVersion": "7.61.1-5.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5481",
|
||||
"Title": "curl: double free due to subsequent call of realloc()",
|
||||
"Description": "Double-free vulnerability in the FTP-kerberos code in cURL 7.52.0 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5481.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5481",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RGDVKSLY5JUNJRLYRUA6CXGQ2LM63XC3/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UA7KDM2WPM5CJDDGOEGFV6SSGD2J7RNT/"
|
||||
]
|
||||
@@ -23,10 +49,17 @@
|
||||
"PkgName": "curl",
|
||||
"InstalledVersion": "7.61.1-4.ph3",
|
||||
"FixedVersion": "7.61.1-5.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5482",
|
||||
"Title": "curl: heap buffer overflow in function tftp_receive_packet()",
|
||||
"Description": "Heap buffer overflow in the TFTP protocol handler in cURL 7.19.4 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-5482.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-5562.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5482.html",
|
||||
@@ -40,13 +73,19 @@
|
||||
"PkgName": "curl-libs",
|
||||
"InstalledVersion": "7.61.1-4.ph3",
|
||||
"FixedVersion": "7.61.1-5.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5481",
|
||||
"Title": "curl: double free due to subsequent call of realloc()",
|
||||
"Description": "Double-free vulnerability in the FTP-kerberos code in cURL 7.52.0 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5481.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5481",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RGDVKSLY5JUNJRLYRUA6CXGQ2LM63XC3/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UA7KDM2WPM5CJDDGOEGFV6SSGD2J7RNT/"
|
||||
]
|
||||
@@ -56,10 +95,17 @@
|
||||
"PkgName": "curl-libs",
|
||||
"InstalledVersion": "7.61.1-4.ph3",
|
||||
"FixedVersion": "7.61.1-5.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5482",
|
||||
"Title": "curl: heap buffer overflow in function tftp_receive_packet()",
|
||||
"Description": "Heap buffer overflow in the TFTP protocol handler in cURL 7.19.4 to 7.65.3.",
|
||||
"Severity": "HIGH",
|
||||
"Severity": "CRITICAL",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-5482.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-5562.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00048.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00055.html",
|
||||
"https://curl.haxx.se/docs/CVE-2019-5482.html",
|
||||
@@ -73,6 +119,12 @@
|
||||
"PkgName": "e2fsprogs-libs",
|
||||
"InstalledVersion": "1.44.3-2.ph3",
|
||||
"FixedVersion": "1.44.3-3.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -85,22 +137,69 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph3",
|
||||
"FixedVersion": "1.0.2t-1.ph3",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "e2fsprogs-libs",
|
||||
"InstalledVersion": "1.44.3-2.ph3",
|
||||
"FixedVersion": "1.45.5-1.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-20387",
|
||||
"PkgName": "libsolv",
|
||||
"InstalledVersion": "0.6.26-5.ph3",
|
||||
"FixedVersion": "0.6.35-2.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-20387",
|
||||
"Title": "libsolv: out-of-bounds read in repodata_schema2id in repodata.c",
|
||||
"Description": "repodata_schema2id in repodata.c in libsolv before 0.7.6 has a heap-based buffer over-read via a last schema whose length is less than the length of the input schema.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-20387",
|
||||
"https://github.com/openSUSE/libsolv/commit/fdb9c9c03508990e4583046b590c30d958f272da",
|
||||
"https://github.com/openSUSE/libsolv/compare/0.7.5...0.7.6",
|
||||
"https://lists.debian.org/debian-lts-announce/2020/01/msg00034.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-17498",
|
||||
"PkgName": "libssh2",
|
||||
"InstalledVersion": "1.9.0-1.ph3",
|
||||
"FixedVersion": "1.9.0-2.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-17498",
|
||||
"Title": "libssh2: integer overflow in SSH_MSG_DISCONNECT logic in packet.c",
|
||||
"Description": "In libssh2 v1.9.0 and earlier versions, the SSH_MSG_DISCONNECT logic in packet.c has an integer overflow in a bounds check, enabling an attacker to specify an arbitrary (out-of-bounds) offset for a subsequent memory read. A crafted SSH server may be able to disclose sensitive information or cause a denial of service condition on the client system when a user connects to the server.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-11/msg00026.html",
|
||||
"https://blog.semmle.com/libssh2-integer-overflow-CVE-2019-17498/",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-17498",
|
||||
"https://github.com/kevinbackhouse/SecurityExploits/tree/8cbdbbe6363510f7d9ceec685373da12e6fc752d/libssh2/out_of_bounds_read_disconnect_CVE-2019-17498",
|
||||
"https://github.com/libssh2/libssh2/blob/42d37aa63129a1b2644bf6495198923534322d64/src/packet.c#L480",
|
||||
"https://github.com/libssh2/libssh2/pull/402/commits/1c6fa92b77e34d089493fe6d3e2c6c8775858b94",
|
||||
"https://lists.debian.org/debian-lts-announce/2019/11/msg00010.html",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TY7EEE34RFKCTXTMBQQWWSLXZWSCXNDB/"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -108,9 +207,14 @@
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph3",
|
||||
"FixedVersion": "1.0.2t-1.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1547",
|
||||
"Title": "openssl: side-channel weak encryption vulnerability",
|
||||
"Description": "Normally in OpenSSL EC groups always have a co-factor present and this is used in side channel resistant code paths. However, in some cases, it is possible to construct a group using explicit parameters (instead of using a named curve). In those cases it is possible that such a group does not have the cofactor present. This can occur even where all the parameters match a known named curve. If such a curve is used then OpenSSL falls back to non-side channel resistant code paths which may result in full key recovery during an ECDSA signature operation. In order to be vulnerable an attacker would have to have the ability to time the creation of a large number of signatures where explicit parameters with no co-factor present are in use by an application using libcrypto. For the avoidance of doubt libssl is not vulnerable because explicit parameters are never used. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://arxiv.org/abs/1909.01785",
|
||||
@@ -123,19 +227,158 @@
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1551",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph3",
|
||||
"FixedVersion": "1.0.2u-1.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1551",
|
||||
"Title": "openssl: Integer overflow in RSAZ modular exponentiation on x86_64",
|
||||
"Description": "There is an overflow bug in the x64_64 Montgomery squaring procedure used in exponentiation with 512-bit moduli. No EC algorithms are affected. Analysis suggests that attacks against 2-prime RSA1024, 3-prime RSA1536, and DSA1024 as a result of this defect would be very difficult to perform and are not believed likely. Attacks against DH512 are considered just feasible. However, for an attack the target would have to re-use the DH512 private key, which is not recommended anyway. Also applications directly using the low level API BN_mod_exp may be affected if they use BN_FLG_CONSTTIME. Fixed in OpenSSL 1.1.1e (Affected 1.1.1-1.1.1d). Fixed in OpenSSL 1.0.2u (Affected 1.0.2-1.0.2t).",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00030.html",
|
||||
"http://packetstormsecurity.com/files/155754/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1551",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=419102400a2811582a7a3d4a4e317d72e5ce0a8f",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=f1c5eea8a817075d31e43f5876993c6710238c98",
|
||||
"https://github.com/openssl/openssl/pull/10575",
|
||||
"https://seclists.org/bugtraq/2019/Dec/39",
|
||||
"https://seclists.org/bugtraq/2019/Dec/46",
|
||||
"https://security.netapp.com/advisory/ntap-20191210-0001/",
|
||||
"https://www.debian.org/security/2019/dsa-4594",
|
||||
"https://www.openssl.org/news/secadv/20191206.txt",
|
||||
"https://www.tenable.com/security/tns-2019-09"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-1563",
|
||||
"PkgName": "openssl",
|
||||
"InstalledVersion": "1.0.2s-1.ph3",
|
||||
"FixedVersion": "1.0.2t-1.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-1563",
|
||||
"Title": "openssl: information disclosure in PKCS7_dataDecode and CMS_decrypt_set1_pkey",
|
||||
"Description": "In situations where an attacker receives automated notification of the success or failure of a decryption attempt an attacker, after sending a very large number of messages to be decrypted, can recover a CMS/PKCS7 transported encryption key or decrypt any RSA encrypted message that was encrypted with the public RSA key, using a Bleichenbacher padding oracle attack. Applications are not affected if they use a certificate together with the private RSA key to the CMS_decrypt or PKCS7_decrypt functions to select the correct recipient info to decrypt. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c). Fixed in OpenSSL 1.1.0l (Affected 1.1.0-1.1.0k). Fixed in OpenSSL 1.0.2t (Affected 1.0.2-1.0.2s).",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://packetstormsecurity.com/files/154467/Slackware-Security-Advisory-openssl-Updates.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1563",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=08229ad838c50f644d7e928e2eef147b4308ad64",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=631f94db0065c78181ca9ba5546ebc8bb3884b97",
|
||||
"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f",
|
||||
"https://seclists.org/bugtraq/2019/Sep/25",
|
||||
"https://security.netapp.com/advisory/ntap-20190919-0002/",
|
||||
"https://www.openssl.org/news/secadv/20190910.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-16168",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph3",
|
||||
"FixedVersion": "3.27.2-5.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-16168",
|
||||
"Title": "sqlite: division by zero in whereLoopAddBtreeIndex in sqlite3.c",
|
||||
"Description": "In SQLite through 3.29.0, whereLoopAddBtreeIndex in sqlite3.c can crash a browser or other application because of missing validation of a sqlite_stat1 sz field, aka a \"severe division by zero in the query planner.\"",
|
||||
"Severity": "MEDIUM",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-10/msg00032.html",
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-10/msg00033.html",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XZARJHJJDBHI7CE5PZEBXS5HKK6HXKW2/",
|
||||
"https://security.netapp.com/advisory/ntap-20190926-0003/",
|
||||
"https://security.netapp.com/advisory/ntap-20200122-0003/",
|
||||
"https://usn.ubuntu.com/4205-1/",
|
||||
"https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg116312.html",
|
||||
"https://www.oracle.com/security-alerts/cpujan2020.html",
|
||||
"https://www.sqlite.org/src/info/e4598ecbdd18bd82945f6029013296690e719a62",
|
||||
"https://www.sqlite.org/src/timeline?c=98357d8c1263920b"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19244",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph3",
|
||||
"FixedVersion": "3.31.1-1.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19244",
|
||||
"Title": "sqlite: allows a crash if a sub-select uses both DISTINCT and window functions and also has certain ORDER BY usage",
|
||||
"Description": "sqlite3Select in select.c in SQLite 3.30.1 allows a crash if a sub-select uses both DISTINCT and window functions, and also has certain ORDER BY usage.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/e59c562b3f6894f84c715772c4b116d7b5c01348",
|
||||
"https://usn.ubuntu.com/4205-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19923",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph3",
|
||||
"FixedVersion": "3.31.1-1.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19923",
|
||||
"Title": "sqlite: mishandling of certain uses of SELECT DISTINCT involving a LEFT JOIN in flattenSubquery in select.c leads to a NULL pointer dereference",
|
||||
"Description": "flattenSubquery in select.c in SQLite 3.30.1 mishandles certain uses of SELECT DISTINCT involving a LEFT JOIN in which the right-hand side is a view. This can cause a NULL pointer dereference (or incorrect results).",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19923",
|
||||
"https://github.com/sqlite/sqlite/commit/396afe6f6aa90a31303c183e11b2b2d4b7956b35",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0003/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19926",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph3",
|
||||
"FixedVersion": "3.31.1-1.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19926",
|
||||
"Title": "sqlite: error mishandling because of incomplete fix of CVE-2019-19880",
|
||||
"Description": "multiSelect in select.c in SQLite 3.30.1 mishandles certain errors during parsing, as demonstrated by errors from sqlite3WindowRewrite() calls. NOTE: this vulnerability exists because of an incomplete fix for CVE-2019-19880.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19926",
|
||||
"https://github.com/sqlite/sqlite/commit/8428b3b437569338a9d1e10c4cd8154acbe33089",
|
||||
"https://security.netapp.com/advisory/ntap-20200114-0003/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-19959",
|
||||
"PkgName": "sqlite-libs",
|
||||
"InstalledVersion": "3.27.2-3.ph3",
|
||||
"FixedVersion": "3.31.1-1.ph3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:0f379947a276b7b051643960392fa66c2f0cb493bc1dcd471abb5545005949fd"
|
||||
},
|
||||
"SeveritySource": "photon",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-19959",
|
||||
"Title": "sqlite: mishandles certain uses of INSERT INTO in situations involving embedded '\\0' characters in filenames",
|
||||
"Description": "ext/misc/zipfile.c in SQLite 3.30.1 mishandles certain uses of INSERT INTO in situations involving embedded '\\0' characters in filenames, leading to a memory-management error that can be detected by (for example) valgrind.",
|
||||
"Severity": "HIGH",
|
||||
"References": [
|
||||
"https://github.com/sqlite/sqlite/commit/1e490c4ca6b43a9cf8637d695907888349f69bec",
|
||||
"https://github.com/sqlite/sqlite/commit/d8f2d46cbc9925e034a68aaaf60aad788d9373c1",
|
||||
"https://security.netapp.com/advisory/ntap-20200204-0001/"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
BIN
integration/testdata/trivy.db.gz
vendored
BIN
integration/testdata/trivy.db.gz
vendored
Binary file not shown.
13850
integration/testdata/ubi-7.json.golden
vendored
13850
integration/testdata/ubi-7.json.golden
vendored
File diff suppressed because it is too large
Load Diff
2154
integration/testdata/ubuntu-1604.json.golden
vendored
2154
integration/testdata/ubuntu-1604.json.golden
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,19 @@
|
||||
[
|
||||
{
|
||||
"Target": "testdata/fixtures/ubuntu-1804.tar.gz (ubuntu 18.04)",
|
||||
"Type": "ubuntu",
|
||||
"Vulnerabilities": [
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5094",
|
||||
"PkgName": "e2fsprogs",
|
||||
"InstalledVersion": "1.44.1-1ubuntu1.1",
|
||||
"FixedVersion": "1.44.1-1ubuntu1.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -18,11 +25,39 @@
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "e2fsprogs",
|
||||
"InstalledVersion": "1.44.1-1ubuntu1.1",
|
||||
"FixedVersion": "1.44.1-1ubuntu1.3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5094",
|
||||
"PkgName": "libcom-err2",
|
||||
"InstalledVersion": "1.44.1-1ubuntu1.1",
|
||||
"FixedVersion": "1.44.1-1ubuntu1.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -34,11 +69,39 @@
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libcom-err2",
|
||||
"InstalledVersion": "1.44.1-1ubuntu1.1",
|
||||
"FixedVersion": "1.44.1-1ubuntu1.3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5094",
|
||||
"PkgName": "libext2fs2",
|
||||
"InstalledVersion": "1.44.1-1ubuntu1.1",
|
||||
"FixedVersion": "1.44.1-1ubuntu1.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -50,11 +113,105 @@
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libext2fs2",
|
||||
"InstalledVersion": "1.44.1-1ubuntu1.1",
|
||||
"FixedVersion": "1.44.1-1ubuntu1.3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-13627",
|
||||
"PkgName": "libgcrypt20",
|
||||
"InstalledVersion": "1.8.1-4ubuntu1.1",
|
||||
"FixedVersion": "1.8.1-4ubuntu1.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-13627",
|
||||
"Title": "libgcrypt: ECDSA timing attack in the libgcrypt20 cryptographic library",
|
||||
"Description": "It was discovered that there was a ECDSA timing attack in the libgcrypt20 cryptographic library. Version affected: 1.8.4-5, 1.7.6-2+deb9u3, and 1.6.3-2+deb8u4. Versions fixed: 1.8.5-2 and 1.6.3-2+deb8u7.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00060.html",
|
||||
"http://www.openwall.com/lists/oss-security/2019/10/02/2",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13627",
|
||||
"https://dev.gnupg.org/T4683",
|
||||
"https://github.com/gpg/libgcrypt/releases/tag/libgcrypt-1.8.5",
|
||||
"https://lists.debian.org/debian-lts-announce/2019/09/msg00024.html",
|
||||
"https://minerva.crocs.fi.muni.cz/",
|
||||
"https://security-tracker.debian.org/tracker/CVE-2019-13627"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-12290",
|
||||
"PkgName": "libidn2-0",
|
||||
"InstalledVersion": "2.0.4-1.1build2",
|
||||
"FixedVersion": "2.0.4-1.1ubuntu0.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-12290",
|
||||
"Description": "GNU libidn2 before 2.2.0 fails to perform the roundtrip checks specified in RFC3490 Section 4.2 when converting A-labels to U-labels. This makes it possible in some circumstances for one domain to impersonate another. By creating a malicious domain that matches a target domain except for the inclusion of certain punycoded Unicode characters (that would be discarded when converted first to a Unicode label and then back to an ASCII label), arbitrary domains can be impersonated.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://gitlab.com/libidn/libidn2/commit/241e8f486134793cb0f4a5b0e5817a97883401f5",
|
||||
"https://gitlab.com/libidn/libidn2/commit/614117ef6e4c60e1950d742e3edf0a0ef8d389de",
|
||||
"https://gitlab.com/libidn/libidn2/merge_requests/71",
|
||||
"https://usn.ubuntu.com/4168-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-18224",
|
||||
"PkgName": "libidn2-0",
|
||||
"InstalledVersion": "2.0.4-1.1build2",
|
||||
"FixedVersion": "2.0.4-1.1ubuntu0.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-18224",
|
||||
"Title": "libidn2: heap-based buffer overflow in idn2_to_ascii_4i in lib/lookup.c",
|
||||
"Description": "idn2_to_ascii_4i in lib/lookup.c in GNU libidn2 before 2.1.1 has a heap-based buffer overflow via a long domain string.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12420",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18224",
|
||||
"https://github.com/libidn/libidn2/commit/e4d1558aa2c1c04a05066ee8600f37603890ba8c",
|
||||
"https://github.com/libidn/libidn2/compare/libidn2-2.1.0...libidn2-2.1.1",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JDQVQ2XPV5BTZUFINT7AFJSKNNBVURNJ/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MINU5RKDFE6TKAFY5DRFN3WSFDS4DYVS/",
|
||||
"https://usn.ubuntu.com/4168-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5094",
|
||||
"PkgName": "libss2",
|
||||
"InstalledVersion": "1.44.1-1ubuntu1.1",
|
||||
"FixedVersion": "1.44.1-1ubuntu1.2",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5094",
|
||||
"Title": "e2fsprogs: crafted ext4 partition leads to out-of-bounds write",
|
||||
"Description": "An exploitable code execution vulnerability exists in the quota file functionality of E2fsprogs 1.45.3. A specially crafted ext4 partition can cause an out-of-bounds write on the heap, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
@@ -66,43 +223,240 @@
|
||||
"https://www.debian.org/security/2019/dsa-4535"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-5188",
|
||||
"PkgName": "libss2",
|
||||
"InstalledVersion": "1.44.1-1ubuntu1.1",
|
||||
"FixedVersion": "1.44.1-1ubuntu1.3",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-5188",
|
||||
"Title": "e2fsprogs: Out-of-bounds write in e2fsck/rehash.c",
|
||||
"Description": "A code execution vulnerability exists in the directory rehashing functionality of E2fsprogs e2fsck 1.45.4. A specially crafted ext4 directory can cause an out-of-bounds write on the stack, resulting in code execution. An attacker can corrupt a partition to trigger this vulnerability.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00004.html",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-5188",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2AKETJ6BREDUHRWQTV35SPGG5C6H7KSI/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6DOBCYQKCTTWXBLMUPJ5TX3FY7JNCOKY/",
|
||||
"https://talosintelligence.com/vulnerability_reports/TALOS-2019-0973",
|
||||
"https://usn.ubuntu.com/4249-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-15718",
|
||||
"PkgName": "libsystemd0",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.28",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-15718",
|
||||
"Title": "systemd: systemd-resolved allows unprivileged users to configure DNS",
|
||||
"Description": "In systemd 240, bus_open_system_watch_bind_with_description in shared/bus-util.c (as used by systemd-resolved to connect to the system D-Bus instance), calls sd_bus_set_trusted, which disables access controls for incoming D-Bus messages. An unprivileged user can exploit this by executing D-Bus methods that should be restricted to privileged users, in order to change the system's DNS resolver settings.",
|
||||
"Severity": "LOW",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-15718.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-3592.html",
|
||||
"http://www.openwall.com/lists/oss-security/2019/09/03/1",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=1746057",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-15718",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BRE5IS24XTF5WNZGH2L7GSQJKARBOEGL/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HIKGKXZ5OEGOEYURHLJHEMFYNLEGAW5B/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U2WNHRJW4XI6H5YMDG4BUFGPAXWUMUVG/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2020-1712",
|
||||
"PkgName": "libsystemd0",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.38",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-1712",
|
||||
"Title": "systemd: use-after-free when asynchronous polkit queries are performed",
|
||||
"Description": "A heap use-after-free vulnerability was found in systemd, where asynchronous Polkit queries are performed while handling dbus messages. A local unprivileged attacker can abuse this flaw to crash systemd services or potentially execute code and elevate their privileges, by sending specially crafted dbus messages.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2020-1712.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-0575.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-20386",
|
||||
"PkgName": "libsystemd0",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.38",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-20386",
|
||||
"Title": "systemd: a memory leak was discovered in button_open in login/logind-button.c when udev events are received",
|
||||
"Description": "An issue was discovered in button_open in login/logind-button.c in systemd before 243. When executing the udevadm trigger command, a memory leak may occur.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00014.html",
|
||||
"https://github.com/systemd/systemd/commit/b2774a3ae692113e1f47a336a6c09bac9cfb49ad",
|
||||
"https://security.netapp.com/advisory/ntap-20200210-0002/",
|
||||
"https://usn.ubuntu.com/4269-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-3843",
|
||||
"PkgName": "libsystemd0",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.38",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3843",
|
||||
"Title": "systemd: services with DynamicUser can create SUID/SGID binaries",
|
||||
"Description": "It was discovered that a systemd service that uses DynamicUser property can create a SUID/SGID binary that would be allowed to run as the transient service UID/GID even after the service is terminated. A local attacker may use this flaw to access resources that will be owned by a potentially different service in the future, when the UID/GID will be recycled.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/108116",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3843",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5JXQAKSTMABZ46EVCRMW62DHWYHTTFES/",
|
||||
"https://security.netapp.com/advisory/ntap-20190619-0002/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-3844",
|
||||
"PkgName": "libsystemd0",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.38",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3844",
|
||||
"Title": "systemd: services with DynamicUser can get new privileges and create SGID binaries",
|
||||
"Description": "It was discovered that a systemd service that uses DynamicUser property can get new privileges through the execution of SUID binaries, which would allow to create binaries owned by the service transient group with the setgid bit set. A local attacker may use this flaw to access resources that will be owned by a potentially different service in the future, when the GID will be recycled.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/108096",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3844",
|
||||
"https://security.netapp.com/advisory/ntap-20190619-0002/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-15718",
|
||||
"PkgName": "libudev1",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.28",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-15718",
|
||||
"Title": "systemd: systemd-resolved allows unprivileged users to configure DNS",
|
||||
"Description": "In systemd 240, bus_open_system_watch_bind_with_description in shared/bus-util.c (as used by systemd-resolved to connect to the system D-Bus instance), calls sd_bus_set_trusted, which disables access controls for incoming D-Bus messages. An unprivileged user can exploit this by executing D-Bus methods that should be restricted to privileged users, in order to change the system's DNS resolver settings.",
|
||||
"Severity": "LOW",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2019-15718.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2019-3592.html",
|
||||
"http://www.openwall.com/lists/oss-security/2019/09/03/1",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=1746057",
|
||||
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-15718",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BRE5IS24XTF5WNZGH2L7GSQJKARBOEGL/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HIKGKXZ5OEGOEYURHLJHEMFYNLEGAW5B/",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U2WNHRJW4XI6H5YMDG4BUFGPAXWUMUVG/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2020-1712",
|
||||
"PkgName": "libudev1",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.38",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2020-1712",
|
||||
"Title": "systemd: use-after-free when asynchronous polkit queries are performed",
|
||||
"Description": "A heap use-after-free vulnerability was found in systemd, where asynchronous Polkit queries are performed while handling dbus messages. A local unprivileged attacker can abuse this flaw to crash systemd services or potentially execute code and elevate their privileges, by sending specially crafted dbus messages.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
"http://linux.oracle.com/cve/CVE-2020-1712.html",
|
||||
"http://linux.oracle.com/errata/ELSA-2020-0575.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-20386",
|
||||
"PkgName": "libudev1",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.38",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-20386",
|
||||
"Title": "systemd: a memory leak was discovered in button_open in login/logind-button.c when udev events are received",
|
||||
"Description": "An issue was discovered in button_open in login/logind-button.c in systemd before 243. When executing the udevadm trigger command, a memory leak may occur.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00014.html",
|
||||
"https://github.com/systemd/systemd/commit/b2774a3ae692113e1f47a336a6c09bac9cfb49ad",
|
||||
"https://security.netapp.com/advisory/ntap-20200210-0002/",
|
||||
"https://usn.ubuntu.com/4269-1/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-3843",
|
||||
"PkgName": "libudev1",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.38",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3843",
|
||||
"Title": "systemd: services with DynamicUser can create SUID/SGID binaries",
|
||||
"Description": "It was discovered that a systemd service that uses DynamicUser property can create a SUID/SGID binary that would be allowed to run as the transient service UID/GID even after the service is terminated. A local attacker may use this flaw to access resources that will be owned by a potentially different service in the future, when the UID/GID will be recycled.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/108116",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3843",
|
||||
"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5JXQAKSTMABZ46EVCRMW62DHWYHTTFES/",
|
||||
"https://security.netapp.com/advisory/ntap-20190619-0002/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-3844",
|
||||
"PkgName": "libudev1",
|
||||
"InstalledVersion": "237-3ubuntu10.25",
|
||||
"FixedVersion": "237-3ubuntu10.38",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-3844",
|
||||
"Title": "systemd: services with DynamicUser can get new privileges and create SGID binaries",
|
||||
"Description": "It was discovered that a systemd service that uses DynamicUser property can get new privileges through the execution of SUID binaries, which would allow to create binaries owned by the service transient group with the setgid bit set. A local attacker may use this flaw to access resources that will be owned by a potentially different service in the future, when the GID will be recycled.",
|
||||
"Severity": "LOW",
|
||||
"References": [
|
||||
"http://www.securityfocus.com/bid/108096",
|
||||
"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-3844",
|
||||
"https://security.netapp.com/advisory/ntap-20190619-0002/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"VulnerabilityID": "CVE-2019-11922",
|
||||
"PkgName": "libzstd1",
|
||||
"InstalledVersion": "1.3.3+dfsg-2ubuntu1",
|
||||
"FixedVersion": "1.3.3+dfsg-2ubuntu1.1",
|
||||
"Layer": {
|
||||
"DiffID": "sha256:6cebf3abed5fac58d2e792ce8461454e92c245d5312c42118f02e231a73b317f"
|
||||
},
|
||||
"SeveritySource": "ubuntu",
|
||||
"PrimaryURL": "https://avd.aquasec.com/nvd/cve-2019-11922",
|
||||
"Description": "A race condition in the one-pass compression functions of Zstandard prior to version 1.3.8 could allow an attacker to write bytes out of bounds if an output buffer smaller than the recommended size was used.",
|
||||
"Severity": "MEDIUM",
|
||||
"References": [
|
||||
|
||||
1400
integration/testdata/ubuntu-1804.json.golden
vendored
1400
integration/testdata/ubuntu-1804.json.golden
vendored
File diff suppressed because it is too large
Load Diff
569
internal/app.go
569
internal/app.go
@@ -1,292 +1,501 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
"github.com/spf13/afero"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/aquasecurity/trivy-db/pkg/db"
|
||||
"github.com/aquasecurity/trivy-db/pkg/types"
|
||||
"github.com/aquasecurity/trivy/internal/artifact"
|
||||
"github.com/aquasecurity/trivy/internal/client"
|
||||
"github.com/aquasecurity/trivy/internal/server"
|
||||
"github.com/aquasecurity/trivy/internal/standalone"
|
||||
tdb "github.com/aquasecurity/trivy/pkg/db"
|
||||
"github.com/aquasecurity/trivy/pkg/utils"
|
||||
"github.com/aquasecurity/trivy/pkg/vulnerability"
|
||||
)
|
||||
|
||||
// VersionInfo holds the trivy DB version Info
|
||||
type VersionInfo struct {
|
||||
Version string `json:",omitempty"`
|
||||
VulnerabilityDB *db.Metadata `json:",omitempty"`
|
||||
}
|
||||
|
||||
var (
|
||||
templateFlag = cli.StringFlag{
|
||||
Name: "template, t",
|
||||
Value: "",
|
||||
Usage: "output template",
|
||||
EnvVar: "TRIVY_TEMPLATE",
|
||||
Name: "template",
|
||||
Aliases: []string{"t"},
|
||||
Value: "",
|
||||
Usage: "output template",
|
||||
EnvVars: []string{"TRIVY_TEMPLATE"},
|
||||
}
|
||||
|
||||
formatFlag = cli.StringFlag{
|
||||
Name: "format, f",
|
||||
Value: "table",
|
||||
Usage: "format (table, json, template)",
|
||||
EnvVar: "TRIVY_FORMAT",
|
||||
Name: "format",
|
||||
Aliases: []string{"f"},
|
||||
Value: "table",
|
||||
Usage: "format (table, json, template)",
|
||||
EnvVars: []string{"TRIVY_FORMAT"},
|
||||
}
|
||||
|
||||
inputFlag = cli.StringFlag{
|
||||
Name: "input, i",
|
||||
Value: "",
|
||||
Usage: "input file path instead of image name",
|
||||
EnvVar: "TRIVY_INPUT",
|
||||
Name: "input",
|
||||
Aliases: []string{"i"},
|
||||
Value: "",
|
||||
Usage: "input file path instead of image name",
|
||||
EnvVars: []string{"TRIVY_INPUT"},
|
||||
}
|
||||
|
||||
severityFlag = cli.StringFlag{
|
||||
Name: "severity, s",
|
||||
Value: strings.Join(types.SeverityNames, ","),
|
||||
Usage: "severities of vulnerabilities to be displayed (comma separated)",
|
||||
EnvVar: "TRIVY_SEVERITY",
|
||||
Name: "severity",
|
||||
Aliases: []string{"s"},
|
||||
Value: strings.Join(types.SeverityNames, ","),
|
||||
Usage: "severities of vulnerabilities to be displayed (comma separated)",
|
||||
EnvVars: []string{"TRIVY_SEVERITY"},
|
||||
}
|
||||
|
||||
outputFlag = cli.StringFlag{
|
||||
Name: "output, o",
|
||||
Usage: "output file name",
|
||||
EnvVar: "TRIVY_OUTPUT",
|
||||
Name: "output",
|
||||
Aliases: []string{"o"},
|
||||
Usage: "output file name",
|
||||
EnvVars: []string{"TRIVY_OUTPUT"},
|
||||
}
|
||||
|
||||
exitCodeFlag = cli.IntFlag{
|
||||
Name: "exit-code",
|
||||
Usage: "Exit code when vulnerabilities were found",
|
||||
Value: 0,
|
||||
EnvVar: "TRIVY_EXIT_CODE",
|
||||
Name: "exit-code",
|
||||
Usage: "Exit code when vulnerabilities were found",
|
||||
Value: 0,
|
||||
EnvVars: []string{"TRIVY_EXIT_CODE"},
|
||||
}
|
||||
|
||||
skipUpdateFlag = cli.BoolFlag{
|
||||
Name: "skip-update",
|
||||
Usage: "skip db update",
|
||||
EnvVar: "TRIVY_SKIP_UPDATE",
|
||||
Name: "skip-update",
|
||||
Usage: "skip db update",
|
||||
EnvVars: []string{"TRIVY_SKIP_UPDATE"},
|
||||
}
|
||||
|
||||
downloadDBOnlyFlag = cli.BoolFlag{
|
||||
Name: "download-db-only",
|
||||
Usage: "download/update vulnerability database but don't run a scan",
|
||||
EnvVar: "TRIVY_DOWNLOAD_DB_ONLY",
|
||||
Name: "download-db-only",
|
||||
Usage: "download/update vulnerability database but don't run a scan",
|
||||
EnvVars: []string{"TRIVY_DOWNLOAD_DB_ONLY"},
|
||||
}
|
||||
|
||||
resetFlag = cli.BoolFlag{
|
||||
Name: "reset",
|
||||
Usage: "remove all caches and database",
|
||||
EnvVar: "TRIVY_RESET",
|
||||
Name: "reset",
|
||||
Usage: "remove all caches and database",
|
||||
EnvVars: []string{"TRIVY_RESET"},
|
||||
}
|
||||
|
||||
clearCacheFlag = cli.BoolFlag{
|
||||
Name: "clear-cache, c",
|
||||
Usage: "clear image caches without scanning",
|
||||
EnvVar: "TRIVY_CLEAR_CACHE",
|
||||
Name: "clear-cache",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "clear image caches without scanning",
|
||||
EnvVars: []string{"TRIVY_CLEAR_CACHE"},
|
||||
}
|
||||
|
||||
quietFlag = cli.BoolFlag{
|
||||
Name: "quiet, q",
|
||||
Usage: "suppress progress bar and log output",
|
||||
EnvVar: "TRIVY_QUIET",
|
||||
Name: "quiet",
|
||||
Aliases: []string{"q"},
|
||||
Usage: "suppress progress bar and log output",
|
||||
EnvVars: []string{"TRIVY_QUIET"},
|
||||
}
|
||||
|
||||
noProgressFlag = cli.BoolFlag{
|
||||
Name: "no-progress",
|
||||
Usage: "suppress progress bar",
|
||||
EnvVar: "TRIVY_NO_PROGRESS",
|
||||
Name: "no-progress",
|
||||
Usage: "suppress progress bar",
|
||||
EnvVars: []string{"TRIVY_NO_PROGRESS"},
|
||||
}
|
||||
|
||||
ignoreUnfixedFlag = cli.BoolFlag{
|
||||
Name: "ignore-unfixed",
|
||||
Usage: "display only fixed vulnerabilities",
|
||||
EnvVar: "TRIVY_IGNORE_UNFIXED",
|
||||
Name: "ignore-unfixed",
|
||||
Usage: "display only fixed vulnerabilities",
|
||||
EnvVars: []string{"TRIVY_IGNORE_UNFIXED"},
|
||||
}
|
||||
|
||||
debugFlag = cli.BoolFlag{
|
||||
Name: "debug, d",
|
||||
Usage: "debug mode",
|
||||
EnvVar: "TRIVY_DEBUG",
|
||||
Name: "debug",
|
||||
Aliases: []string{"d"},
|
||||
Usage: "debug mode",
|
||||
EnvVars: []string{"TRIVY_DEBUG"},
|
||||
}
|
||||
|
||||
removedPkgsFlag = cli.BoolFlag{
|
||||
Name: "removed-pkgs",
|
||||
Usage: "detect vulnerabilities of removed packages (only for Alpine)",
|
||||
EnvVars: []string{"TRIVY_REMOVED_PKGS"},
|
||||
}
|
||||
|
||||
vulnTypeFlag = cli.StringFlag{
|
||||
Name: "vuln-type",
|
||||
Value: "os,library",
|
||||
Usage: "comma-separated list of vulnerability types (os,library)",
|
||||
EnvVar: "TRIVY_VULN_TYPE",
|
||||
Name: "vuln-type",
|
||||
Value: "os,library",
|
||||
Usage: "comma-separated list of vulnerability types (os,library)",
|
||||
EnvVars: []string{"TRIVY_VULN_TYPE"},
|
||||
}
|
||||
|
||||
cacheDirFlag = cli.StringFlag{
|
||||
Name: "cache-dir",
|
||||
Value: utils.DefaultCacheDir(),
|
||||
Usage: "cache directory",
|
||||
EnvVar: "TRIVY_CACHE_DIR",
|
||||
Name: "cache-dir",
|
||||
Value: utils.DefaultCacheDir(),
|
||||
Usage: "cache directory",
|
||||
EnvVars: []string{"TRIVY_CACHE_DIR"},
|
||||
}
|
||||
|
||||
ignoreFileFlag = cli.StringFlag{
|
||||
Name: "ignorefile",
|
||||
Value: vulnerability.DefaultIgnoreFile,
|
||||
Usage: "specify .trivyignore file",
|
||||
EnvVar: "TRIVY_IGNOREFILE",
|
||||
Name: "ignorefile",
|
||||
Value: vulnerability.DefaultIgnoreFile,
|
||||
Usage: "specify .trivyignore file",
|
||||
EnvVars: []string{"TRIVY_IGNOREFILE"},
|
||||
}
|
||||
|
||||
timeoutFlag = cli.DurationFlag{
|
||||
Name: "timeout",
|
||||
Value: time.Second * 60,
|
||||
Usage: "docker timeout",
|
||||
EnvVar: "TRIVY_TIMEOUT",
|
||||
Name: "timeout",
|
||||
Value: time.Second * 120,
|
||||
Usage: "docker timeout",
|
||||
EnvVars: []string{"TRIVY_TIMEOUT"},
|
||||
}
|
||||
|
||||
lightFlag = cli.BoolFlag{
|
||||
Name: "light",
|
||||
Usage: "light mode: it's faster, but vulnerability descriptions and references are not displayed",
|
||||
EnvVar: "TRIVY_LIGHT",
|
||||
Name: "light",
|
||||
Usage: "light mode: it's faster, but vulnerability descriptions and references are not displayed",
|
||||
EnvVars: []string{"TRIVY_LIGHT"},
|
||||
}
|
||||
|
||||
token = cli.StringFlag{
|
||||
Name: "token",
|
||||
Usage: "for authentication",
|
||||
EnvVar: "TRIVY_TOKEN",
|
||||
Name: "token",
|
||||
Usage: "for authentication",
|
||||
EnvVars: []string{"TRIVY_TOKEN"},
|
||||
}
|
||||
|
||||
tokenHeader = cli.StringFlag{
|
||||
Name: "token-header",
|
||||
Value: "Trivy-Token",
|
||||
Usage: "specify a header name for token",
|
||||
EnvVar: "TRIVY_TOKEN_HEADER",
|
||||
Name: "token-header",
|
||||
Value: "Trivy-Token",
|
||||
Usage: "specify a header name for token",
|
||||
EnvVars: []string{"TRIVY_TOKEN_HEADER"},
|
||||
}
|
||||
|
||||
ignorePolicy = cli.StringFlag{
|
||||
Name: "ignore-policy",
|
||||
Usage: "specify the Rego file to evaluate each vulnerability",
|
||||
EnvVars: []string{"TRIVY_IGNORE_POLICY"},
|
||||
}
|
||||
|
||||
listAllPackages = cli.BoolFlag{
|
||||
Name: "list-all-pkgs",
|
||||
Usage: "enabling the option will output all packages regardless of vulnerability",
|
||||
EnvVars: []string{"TRIVY_LIST_ALL_PKGS"},
|
||||
}
|
||||
|
||||
skipFiles = cli.StringFlag{
|
||||
Name: "skip-files",
|
||||
Usage: "specify the file path to skip traversal",
|
||||
EnvVars: []string{"TRIVY_SKIP_FILES"},
|
||||
}
|
||||
|
||||
skipDirectories = cli.StringFlag{
|
||||
Name: "skip-dirs",
|
||||
Usage: "specify the directory where the traversal is skipped",
|
||||
EnvVars: []string{"TRIVY_SKIP_DIRS"},
|
||||
}
|
||||
|
||||
globalFlags = []cli.Flag{
|
||||
&quietFlag,
|
||||
&debugFlag,
|
||||
&cacheDirFlag,
|
||||
}
|
||||
|
||||
imageFlags = []cli.Flag{
|
||||
&templateFlag,
|
||||
&formatFlag,
|
||||
&inputFlag,
|
||||
&severityFlag,
|
||||
&outputFlag,
|
||||
&exitCodeFlag,
|
||||
&skipUpdateFlag,
|
||||
&downloadDBOnlyFlag,
|
||||
&resetFlag,
|
||||
&clearCacheFlag,
|
||||
&noProgressFlag,
|
||||
&ignoreUnfixedFlag,
|
||||
&removedPkgsFlag,
|
||||
&vulnTypeFlag,
|
||||
&ignoreFileFlag,
|
||||
&timeoutFlag,
|
||||
&lightFlag,
|
||||
&ignorePolicy,
|
||||
&listAllPackages,
|
||||
&skipFiles,
|
||||
&skipDirectories,
|
||||
}
|
||||
|
||||
// deprecated options
|
||||
deprecatedFlags = []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "only-update",
|
||||
Usage: "deprecated",
|
||||
EnvVars: []string{"TRIVY_ONLY_UPDATE"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "refresh",
|
||||
Usage: "deprecated",
|
||||
EnvVars: []string{"TRIVY_REFRESH"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "auto-refresh",
|
||||
Usage: "deprecated",
|
||||
EnvVars: []string{"TRIVY_AUTO_REFRESH"},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// NewApp is the factory method to return Trivy CLI
|
||||
func NewApp(version string) *cli.App {
|
||||
cli.AppHelpTemplate = `NAME:
|
||||
{{.Name}}{{if .Usage}} - {{.Usage}}{{end}}
|
||||
USAGE:
|
||||
{{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
|
||||
VERSION:
|
||||
{{.Version}}{{end}}{{end}}{{if .Description}}
|
||||
DESCRIPTION:
|
||||
{{.Description}}{{end}}{{if len .Authors}}
|
||||
AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
|
||||
{{range $index, $author := .Authors}}{{if $index}}
|
||||
{{end}}{{$author}}{{end}}{{end}}{{if .VisibleCommands}}
|
||||
OPTIONS:
|
||||
{{range $index, $option := .VisibleFlags}}{{if $index}}
|
||||
{{end}}{{$option}}{{end}}{{end}}
|
||||
`
|
||||
cli.VersionPrinter = func(c *cli.Context) {
|
||||
showVersion(c.String("cache-dir"), c.String("format"), c.App.Version, c.App.Writer)
|
||||
}
|
||||
|
||||
app := cli.NewApp()
|
||||
app.Name = "trivy"
|
||||
app.Version = version
|
||||
app.ArgsUsage = "image_name"
|
||||
|
||||
app.ArgsUsage = "target"
|
||||
app.Usage = "A simple and comprehensive vulnerability scanner for containers"
|
||||
|
||||
app.EnableBashCompletion = true
|
||||
|
||||
app.Flags = []cli.Flag{
|
||||
templateFlag,
|
||||
formatFlag,
|
||||
inputFlag,
|
||||
severityFlag,
|
||||
outputFlag,
|
||||
exitCodeFlag,
|
||||
skipUpdateFlag,
|
||||
downloadDBOnlyFlag,
|
||||
resetFlag,
|
||||
clearCacheFlag,
|
||||
quietFlag,
|
||||
noProgressFlag,
|
||||
ignoreUnfixedFlag,
|
||||
debugFlag,
|
||||
vulnTypeFlag,
|
||||
cacheDirFlag,
|
||||
ignoreFileFlag,
|
||||
timeoutFlag,
|
||||
lightFlag,
|
||||
flags := append(globalFlags, setHidden(deprecatedFlags, true)...)
|
||||
flags = append(flags, setHidden(imageFlags, true)...)
|
||||
|
||||
// deprecated options
|
||||
cli.StringFlag{
|
||||
Name: "only-update",
|
||||
Usage: "deprecated",
|
||||
EnvVar: "TRIVY_ONLY_UPDATE",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "refresh",
|
||||
Usage: "deprecated",
|
||||
EnvVar: "TRIVY_REFRESH",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "auto-refresh",
|
||||
Usage: "deprecated",
|
||||
EnvVar: "TRIVY_AUTO_REFRESH",
|
||||
},
|
||||
}
|
||||
|
||||
app.Commands = []cli.Command{
|
||||
app.Flags = flags
|
||||
app.Commands = []*cli.Command{
|
||||
NewImageCommand(),
|
||||
NewFilesystemCommand(),
|
||||
NewRepositoryCommand(),
|
||||
NewClientCommand(),
|
||||
NewServerCommand(),
|
||||
}
|
||||
|
||||
app.Action = standalone.Run
|
||||
app.Action = artifact.ImageRun
|
||||
return app
|
||||
}
|
||||
|
||||
func NewClientCommand() cli.Command {
|
||||
return cli.Command{
|
||||
Name: "client",
|
||||
Aliases: []string{"c"},
|
||||
Usage: "client mode",
|
||||
Action: client.Run,
|
||||
func setHidden(flags []cli.Flag, hidden bool) []cli.Flag {
|
||||
var newFlags []cli.Flag
|
||||
for _, flag := range flags {
|
||||
var f cli.Flag
|
||||
switch pf := flag.(type) {
|
||||
case *cli.StringFlag:
|
||||
stringFlag := *pf
|
||||
stringFlag.Hidden = hidden
|
||||
f = &stringFlag
|
||||
case *cli.BoolFlag:
|
||||
boolFlag := *pf
|
||||
boolFlag.Hidden = hidden
|
||||
f = &boolFlag
|
||||
case *cli.IntFlag:
|
||||
intFlag := *pf
|
||||
intFlag.Hidden = hidden
|
||||
f = &intFlag
|
||||
case *cli.DurationFlag:
|
||||
durationFlag := *pf
|
||||
durationFlag.Hidden = hidden
|
||||
f = &durationFlag
|
||||
}
|
||||
newFlags = append(newFlags, f)
|
||||
}
|
||||
return newFlags
|
||||
}
|
||||
|
||||
func showVersion(cacheDir, outputFormat, version string, outputWriter io.Writer) {
|
||||
var dbMeta *db.Metadata
|
||||
|
||||
metadata, _ := tdb.NewMetadata(afero.NewOsFs(), cacheDir).Get() // nolint: errcheck
|
||||
if !metadata.UpdatedAt.IsZero() && !metadata.NextUpdate.IsZero() && metadata.Version != 0 {
|
||||
dbMeta = &db.Metadata{
|
||||
Version: metadata.Version,
|
||||
Type: metadata.Type,
|
||||
NextUpdate: metadata.NextUpdate.UTC(),
|
||||
UpdatedAt: metadata.UpdatedAt.UTC(),
|
||||
DownloadedAt: metadata.DownloadedAt.UTC(),
|
||||
}
|
||||
}
|
||||
|
||||
switch outputFormat {
|
||||
case "json":
|
||||
b, _ := json.Marshal(VersionInfo{ // nolint: errcheck
|
||||
Version: version,
|
||||
VulnerabilityDB: dbMeta,
|
||||
})
|
||||
fmt.Fprintln(outputWriter, string(b))
|
||||
default:
|
||||
output := fmt.Sprintf("Version: %s\n", version)
|
||||
if dbMeta != nil {
|
||||
var dbType string
|
||||
switch dbMeta.Type {
|
||||
case 0:
|
||||
dbType = "Full"
|
||||
case 1:
|
||||
dbType = "Light"
|
||||
}
|
||||
output += fmt.Sprintf(`Vulnerability DB:
|
||||
Type: %s
|
||||
Version: %d
|
||||
UpdatedAt: %s
|
||||
NextUpdate: %s
|
||||
DownloadedAt: %s
|
||||
`, dbType, dbMeta.Version, dbMeta.UpdatedAt.UTC(), dbMeta.NextUpdate.UTC(), dbMeta.DownloadedAt.UTC())
|
||||
}
|
||||
fmt.Fprintf(outputWriter, output)
|
||||
}
|
||||
}
|
||||
|
||||
// NewImageCommand is the factory method to add image command
|
||||
func NewImageCommand() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "image",
|
||||
Aliases: []string{"i"},
|
||||
ArgsUsage: "image_name",
|
||||
Usage: "scan an image",
|
||||
Action: artifact.ImageRun,
|
||||
Flags: imageFlags,
|
||||
}
|
||||
}
|
||||
|
||||
// NewFilesystemCommand is the factory method to add filesystem command
|
||||
func NewFilesystemCommand() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "filesystem",
|
||||
Aliases: []string{"fs"},
|
||||
ArgsUsage: "dir",
|
||||
Usage: "scan local filesystem",
|
||||
Action: artifact.FilesystemRun,
|
||||
Flags: []cli.Flag{
|
||||
templateFlag,
|
||||
formatFlag,
|
||||
inputFlag,
|
||||
severityFlag,
|
||||
outputFlag,
|
||||
exitCodeFlag,
|
||||
clearCacheFlag,
|
||||
quietFlag,
|
||||
ignoreUnfixedFlag,
|
||||
debugFlag,
|
||||
vulnTypeFlag,
|
||||
ignoreFileFlag,
|
||||
cacheDirFlag,
|
||||
timeoutFlag,
|
||||
&templateFlag,
|
||||
&formatFlag,
|
||||
&inputFlag,
|
||||
&severityFlag,
|
||||
&outputFlag,
|
||||
&exitCodeFlag,
|
||||
&skipUpdateFlag,
|
||||
&clearCacheFlag,
|
||||
&quietFlag,
|
||||
&ignoreUnfixedFlag,
|
||||
&debugFlag,
|
||||
&removedPkgsFlag,
|
||||
&vulnTypeFlag,
|
||||
&ignoreFileFlag,
|
||||
&cacheDirFlag,
|
||||
&timeoutFlag,
|
||||
&noProgressFlag,
|
||||
&ignorePolicy,
|
||||
&listAllPackages,
|
||||
&skipFiles,
|
||||
&skipDirectories,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewRepositoryCommand is the factory method to add repository command
|
||||
func NewRepositoryCommand() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "repository",
|
||||
Aliases: []string{"repo"},
|
||||
ArgsUsage: "repo_url",
|
||||
Usage: "scan remote repository",
|
||||
Action: artifact.RepositoryRun,
|
||||
Flags: []cli.Flag{
|
||||
&templateFlag,
|
||||
&formatFlag,
|
||||
&inputFlag,
|
||||
&severityFlag,
|
||||
&outputFlag,
|
||||
&exitCodeFlag,
|
||||
&skipUpdateFlag,
|
||||
&clearCacheFlag,
|
||||
&quietFlag,
|
||||
&ignoreUnfixedFlag,
|
||||
&debugFlag,
|
||||
&removedPkgsFlag,
|
||||
&vulnTypeFlag,
|
||||
&ignoreFileFlag,
|
||||
&cacheDirFlag,
|
||||
&timeoutFlag,
|
||||
&noProgressFlag,
|
||||
&ignorePolicy,
|
||||
&listAllPackages,
|
||||
&skipFiles,
|
||||
&skipDirectories,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewClientCommand is the factory method to add client command
|
||||
func NewClientCommand() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "client",
|
||||
Aliases: []string{"c"},
|
||||
ArgsUsage: "image_name",
|
||||
Usage: "client mode",
|
||||
Action: client.Run,
|
||||
Flags: []cli.Flag{
|
||||
&templateFlag,
|
||||
&formatFlag,
|
||||
&inputFlag,
|
||||
&severityFlag,
|
||||
&outputFlag,
|
||||
&exitCodeFlag,
|
||||
&clearCacheFlag,
|
||||
&quietFlag,
|
||||
&ignoreUnfixedFlag,
|
||||
&debugFlag,
|
||||
&removedPkgsFlag,
|
||||
&vulnTypeFlag,
|
||||
&ignoreFileFlag,
|
||||
&cacheDirFlag,
|
||||
&timeoutFlag,
|
||||
&ignorePolicy,
|
||||
|
||||
// original flags
|
||||
token,
|
||||
tokenHeader,
|
||||
cli.StringFlag{
|
||||
Name: "remote",
|
||||
Value: "http://localhost:4954",
|
||||
Usage: "server address",
|
||||
EnvVar: "TRIVY_REMOTE",
|
||||
&token,
|
||||
&tokenHeader,
|
||||
&cli.StringFlag{
|
||||
Name: "remote",
|
||||
Value: "http://localhost:4954",
|
||||
Usage: "server address",
|
||||
EnvVars: []string{"TRIVY_REMOTE"},
|
||||
},
|
||||
cli.StringSliceFlag{
|
||||
Name: "custom-headers",
|
||||
Usage: "custom headers",
|
||||
EnvVar: "TRIVY_CUSTOM_HEADERS",
|
||||
&cli.StringSliceFlag{
|
||||
Name: "custom-headers",
|
||||
Usage: "custom headers",
|
||||
EnvVars: []string{"TRIVY_CUSTOM_HEADERS"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func NewServerCommand() cli.Command {
|
||||
return cli.Command{
|
||||
// NewServerCommand is the factory method to add server command
|
||||
func NewServerCommand() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Aliases: []string{"s"},
|
||||
Usage: "server mode",
|
||||
Action: server.Run,
|
||||
Flags: []cli.Flag{
|
||||
skipUpdateFlag,
|
||||
downloadDBOnlyFlag,
|
||||
resetFlag,
|
||||
quietFlag,
|
||||
debugFlag,
|
||||
cacheDirFlag,
|
||||
&skipUpdateFlag,
|
||||
&downloadDBOnlyFlag,
|
||||
&resetFlag,
|
||||
&quietFlag,
|
||||
&debugFlag,
|
||||
&cacheDirFlag,
|
||||
|
||||
// original flags
|
||||
token,
|
||||
tokenHeader,
|
||||
cli.StringFlag{
|
||||
Name: "listen",
|
||||
Value: "localhost:4954",
|
||||
Usage: "listen address",
|
||||
EnvVar: "TRIVY_LISTEN",
|
||||
&token,
|
||||
&tokenHeader,
|
||||
&cli.StringFlag{
|
||||
Name: "listen",
|
||||
Value: "localhost:4954",
|
||||
Usage: "listen address",
|
||||
EnvVars: []string{"TRIVY_LISTEN"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
122
internal/app_test.go
Normal file
122
internal/app_test.go
Normal file
@@ -0,0 +1,122 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/aquasecurity/trivy-db/pkg/db"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_showVersion(t *testing.T) {
|
||||
type args struct {
|
||||
cacheDir string
|
||||
outputFormat string
|
||||
version string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
createDB bool
|
||||
expectedOutput string
|
||||
}{
|
||||
{
|
||||
name: "happy path, table output",
|
||||
args: args{
|
||||
outputFormat: "table",
|
||||
version: "v1.2.3",
|
||||
},
|
||||
expectedOutput: `Version: v1.2.3
|
||||
Vulnerability DB:
|
||||
Type: Light
|
||||
Version: 42
|
||||
UpdatedAt: 2020-03-16 23:40:20 +0000 UTC
|
||||
NextUpdate: 2020-03-16 23:57:00 +0000 UTC
|
||||
DownloadedAt: 2020-03-16 23:40:20 +0000 UTC
|
||||
`,
|
||||
createDB: true,
|
||||
},
|
||||
{
|
||||
name: "happy path, JSON output",
|
||||
args: args{
|
||||
outputFormat: "json",
|
||||
version: "1.2.3",
|
||||
},
|
||||
expectedOutput: `{"Version":"1.2.3","VulnerabilityDB":{"Version":42,"Type":1,"NextUpdate":"2020-03-16T23:57:00Z","UpdatedAt":"2020-03-16T23:40:20Z","DownloadedAt":"2020-03-16T23:40:20Z"}}
|
||||
`,
|
||||
createDB: true,
|
||||
},
|
||||
{
|
||||
name: "sad path, no DB is available",
|
||||
args: args{
|
||||
outputFormat: "json",
|
||||
version: "1.2.3",
|
||||
},
|
||||
expectedOutput: `{"Version":"1.2.3"}
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "sad path, bogus cache dir",
|
||||
args: args{
|
||||
outputFormat: "json",
|
||||
version: "1.2.3",
|
||||
cacheDir: "/foo/bar/bogus",
|
||||
},
|
||||
expectedOutput: `{"Version":"1.2.3"}
|
||||
`,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
var cacheDir string
|
||||
switch {
|
||||
case tt.args.cacheDir != "":
|
||||
cacheDir = tt.args.cacheDir
|
||||
default:
|
||||
cacheDir, _ = ioutil.TempDir("", "Test_showVersion-*")
|
||||
defer os.RemoveAll(cacheDir)
|
||||
}
|
||||
|
||||
if tt.createDB {
|
||||
fs := afero.NewOsFs()
|
||||
err := os.MkdirAll(filepath.Join(cacheDir, "db"), os.ModePerm)
|
||||
require.NoError(t, err)
|
||||
metadataFile := filepath.Join(cacheDir, "db", "metadata.json")
|
||||
|
||||
b, err := json.Marshal(db.Metadata{
|
||||
Version: 42,
|
||||
Type: 1,
|
||||
NextUpdate: time.Unix(1584403020, 0),
|
||||
UpdatedAt: time.Unix(1584402020, 0),
|
||||
DownloadedAt: time.Unix(1584402020, 0),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
err = afero.WriteFile(fs, metadataFile, b, 0600)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
fw := new(bytes.Buffer)
|
||||
showVersion(cacheDir, tt.args.outputFormat, tt.args.version, fw)
|
||||
assert.Equal(t, tt.expectedOutput, fw.String(), tt.name)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestNewCommands(t *testing.T) {
|
||||
NewApp("test")
|
||||
NewClientCommand()
|
||||
NewFilesystemCommand()
|
||||
NewImageCommand()
|
||||
NewRepositoryCommand()
|
||||
NewServerCommand()
|
||||
}
|
||||
81
internal/artifact/config/config.go
Normal file
81
internal/artifact/config/config.go
Normal file
@@ -0,0 +1,81 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/aquasecurity/trivy/internal/config"
|
||||
)
|
||||
|
||||
// Config holds the artifact config
|
||||
type Config struct {
|
||||
config.GlobalConfig
|
||||
config.ArtifactConfig
|
||||
config.DBConfig
|
||||
config.ImageConfig
|
||||
config.ReportConfig
|
||||
|
||||
// deprecated
|
||||
onlyUpdate string
|
||||
// deprecated
|
||||
refresh bool
|
||||
// deprecated
|
||||
autoRefresh bool
|
||||
}
|
||||
|
||||
// New is the factory method to return config
|
||||
func New(c *cli.Context) (Config, error) {
|
||||
gc, err := config.NewGlobalConfig(c)
|
||||
if err != nil {
|
||||
return Config{}, xerrors.Errorf("failed to initialize global options: %w", err)
|
||||
}
|
||||
|
||||
return Config{
|
||||
GlobalConfig: gc,
|
||||
ArtifactConfig: config.NewArtifactConfig(c),
|
||||
DBConfig: config.NewDBConfig(c),
|
||||
ImageConfig: config.NewImageConfig(c),
|
||||
ReportConfig: config.NewReportConfig(c),
|
||||
|
||||
onlyUpdate: c.String("only-update"),
|
||||
refresh: c.Bool("refresh"),
|
||||
autoRefresh: c.Bool("auto-refresh"),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Init initializes the artifact config
|
||||
func (c *Config) Init(image bool) error {
|
||||
if err := c.ReportConfig.Init(c.Logger); err != nil {
|
||||
return err
|
||||
}
|
||||
if c.onlyUpdate != "" || c.refresh || c.autoRefresh {
|
||||
c.Logger.Warn("--only-update, --refresh and --auto-refresh are unnecessary and ignored now. These commands will be removed in the next version.")
|
||||
}
|
||||
if err := c.DBConfig.Init(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// --clear-cache, --download-db-only and --reset don't conduct the scan
|
||||
if c.skipScan() {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := c.ArtifactConfig.Init(c.Context, c.Logger); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if image {
|
||||
if err := c.ImageConfig.Init(c.Context.Args(), c.Logger); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Config) skipScan() bool {
|
||||
if c.ClearCache || c.DownloadDBOnly || c.Reset {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
242
internal/artifact/config/config_test.go
Normal file
242
internal/artifact/config/config_test.go
Normal file
@@ -0,0 +1,242 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zaptest/observer"
|
||||
|
||||
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
|
||||
"github.com/aquasecurity/trivy/internal/config"
|
||||
)
|
||||
|
||||
func TestConfig_Init(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
globalConfig config.GlobalConfig
|
||||
dbConfig config.DBConfig
|
||||
imageConfig config.ImageConfig
|
||||
reportConfig config.ReportConfig
|
||||
args []string
|
||||
logs []string
|
||||
want Config
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "happy path",
|
||||
reportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
VulnType: []string{"os"},
|
||||
},
|
||||
args: []string{"--severity", "CRITICAL", "--vuln-type", "os", "--quiet", "alpine:3.10"},
|
||||
want: Config{
|
||||
GlobalConfig: config.GlobalConfig{
|
||||
Quiet: true,
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "alpine:3.10",
|
||||
},
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
VulnType: []string{"os"},
|
||||
Output: os.Stdout,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "happy path: reset",
|
||||
args: []string{"--reset"},
|
||||
want: Config{
|
||||
DBConfig: config.DBConfig{
|
||||
Reset: true,
|
||||
},
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "happy path with an unknown severity",
|
||||
args: []string{"--severity", "CRITICAL,INVALID", "centos:7"},
|
||||
logs: []string{
|
||||
"unknown severity option: unknown severity: INVALID",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical, dbTypes.SeverityUnknown},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "centos:7",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "deprecated options",
|
||||
args: []string{"--only-update", "alpine", "--severity", "LOW", "debian:buster"},
|
||||
logs: []string{
|
||||
"--only-update, --refresh and --auto-refresh are unnecessary and ignored now. These commands will be removed in the next version.",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityLow},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "debian:buster",
|
||||
},
|
||||
onlyUpdate: "alpine",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid option combination: --template enabled without --format",
|
||||
args: []string{"--template", "@contrib/gitlab.tpl", "gitlab/gitlab-ce:12.7.2-ce.0"},
|
||||
logs: []string{
|
||||
"--template is ignored because --format template is not specified. Use --template option with --format template option.",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
Template: "@contrib/gitlab.tpl",
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gitlab/gitlab-ce:12.7.2-ce.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid option combination: --template and --format json",
|
||||
args: []string{"--format", "json", "--template", "@contrib/gitlab.tpl", "gitlab/gitlab-ce:12.7.2-ce.0"},
|
||||
logs: []string{
|
||||
"--template is ignored because --format json is specified. Use --template option with --format template option.",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
Template: "@contrib/gitlab.tpl",
|
||||
Format: "json",
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gitlab/gitlab-ce:12.7.2-ce.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid option combination: --format template without --template",
|
||||
args: []string{"--format", "template", "--severity", "MEDIUM", "gitlab/gitlab-ce:12.7.2-ce.0"},
|
||||
logs: []string{
|
||||
"--format template is ignored because --template not is specified. Specify --template option when you use --format template.",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityMedium},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
Format: "template",
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gitlab/gitlab-ce:12.7.2-ce.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with latest tag",
|
||||
args: []string{"--auto-refresh", "gcr.io/distroless/base"},
|
||||
logs: []string{
|
||||
"--only-update, --refresh and --auto-refresh are unnecessary and ignored now. These commands will be removed in the next version.",
|
||||
"You should avoid using the :latest tag as it is cached. You need to specify '--clear-cache' option when :latest image is changed",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gcr.io/distroless/base",
|
||||
},
|
||||
autoRefresh: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "sad: skip and download db",
|
||||
args: []string{"--skip-update", "--download-db-only", "alpine:3.10"},
|
||||
wantErr: "--skip-update and --download-db-only options can not be specified both",
|
||||
},
|
||||
{
|
||||
name: "sad: multiple image names",
|
||||
args: []string{"centos:7", "alpine:3.10"},
|
||||
logs: []string{
|
||||
"multiple targets cannot be specified",
|
||||
},
|
||||
wantErr: "arguments error",
|
||||
},
|
||||
{
|
||||
name: "sad: invalid image name",
|
||||
args: []string{`!"#$%&'()`},
|
||||
wantErr: "could not parse reference",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
core, obs := observer.New(zap.InfoLevel)
|
||||
logger := zap.New(core)
|
||||
|
||||
app := cli.NewApp()
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("quiet", false, "")
|
||||
set.Bool("no-progress", false, "")
|
||||
set.Bool("reset", false, "")
|
||||
set.Bool("skip-update", false, "")
|
||||
set.Bool("download-db-only", false, "")
|
||||
set.Bool("auto-refresh", false, "")
|
||||
set.String("severity", "CRITICAL", "")
|
||||
set.String("vuln-type", "os,library", "")
|
||||
set.String("only-update", "", "")
|
||||
set.String("template", "", "")
|
||||
set.String("format", "", "")
|
||||
|
||||
ctx := cli.NewContext(app, set, nil)
|
||||
_ = set.Parse(tt.args)
|
||||
|
||||
c, err := New(ctx)
|
||||
require.NoError(t, err, err)
|
||||
|
||||
c.GlobalConfig.Logger = logger.Sugar()
|
||||
err = c.Init(true)
|
||||
|
||||
// tests log messages
|
||||
var gotMessages []string
|
||||
for _, entry := range obs.AllUntimed() {
|
||||
gotMessages = append(gotMessages, entry.Message)
|
||||
}
|
||||
assert.Equal(t, tt.logs, gotMessages, tt.name)
|
||||
|
||||
// test the error
|
||||
switch {
|
||||
case tt.wantErr != "":
|
||||
assert.Contains(t, err.Error(), tt.wantErr, tt.name)
|
||||
return
|
||||
default:
|
||||
assert.NoError(t, err, tt.name)
|
||||
}
|
||||
|
||||
tt.want.GlobalConfig.Context = ctx
|
||||
tt.want.GlobalConfig.Logger = logger.Sugar()
|
||||
assert.Equal(t, tt.want, c, tt.name)
|
||||
})
|
||||
}
|
||||
}
|
||||
37
internal/artifact/fs.go
Normal file
37
internal/artifact/fs.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package artifact
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/trivy/internal/artifact/config"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
)
|
||||
|
||||
func filesystemScanner(ctx context.Context, dir string, ac cache.ArtifactCache, lac cache.LocalArtifactCache, timeout time.Duration) (
|
||||
scanner.Scanner, func(), error) {
|
||||
s, cleanup, err := initializeFilesystemScanner(ctx, dir, ac, lac)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, func() {}, xerrors.Errorf("unable to initialize a filesystem scanner: %w", err)
|
||||
}
|
||||
return s, cleanup, nil
|
||||
}
|
||||
|
||||
// FilesystemRun runs scan on filesystem
|
||||
func FilesystemRun(cliCtx *cli.Context) error {
|
||||
c, err := config.New(cliCtx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// initialize config
|
||||
if err = c.Init(false); err != nil {
|
||||
return xerrors.Errorf("failed to initialize options: %w", err)
|
||||
}
|
||||
|
||||
return run(c, filesystemScanner)
|
||||
}
|
||||
51
internal/artifact/image.go
Normal file
51
internal/artifact/image.go
Normal file
@@ -0,0 +1,51 @@
|
||||
package artifact
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/trivy/internal/artifact/config"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
)
|
||||
|
||||
func archiveScanner(ctx context.Context, input string, ac cache.ArtifactCache, lac cache.LocalArtifactCache, timeout time.Duration) (
|
||||
scanner.Scanner, func(), error) {
|
||||
s, err := initializeArchiveScanner(ctx, input, ac, lac, timeout)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, func() {}, xerrors.Errorf("unable to initialize the archive scanner: %w", err)
|
||||
}
|
||||
return s, func() {}, nil
|
||||
}
|
||||
|
||||
func dockerScanner(ctx context.Context, imageName string, ac cache.ArtifactCache, lac cache.LocalArtifactCache, timeout time.Duration) (
|
||||
scanner.Scanner, func(), error) {
|
||||
s, cleanup, err := initializeDockerScanner(ctx, imageName, ac, lac, timeout)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, func() {}, xerrors.Errorf("unable to initialize a docker scanner: %w", err)
|
||||
}
|
||||
return s, cleanup, nil
|
||||
}
|
||||
|
||||
// ImageRun runs scan on docker image
|
||||
func ImageRun(cliCtx *cli.Context) error {
|
||||
c, err := config.New(cliCtx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// initialize config
|
||||
if err := c.Init(true); err != nil {
|
||||
return xerrors.Errorf("failed to initialize options: %w", err)
|
||||
}
|
||||
|
||||
if c.Input != "" {
|
||||
// scan tar file
|
||||
return run(c, archiveScanner)
|
||||
}
|
||||
|
||||
return run(c, dockerScanner)
|
||||
}
|
||||
40
internal/artifact/inject.go
Normal file
40
internal/artifact/inject.go
Normal file
@@ -0,0 +1,40 @@
|
||||
// +build wireinject
|
||||
|
||||
package artifact
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
"github.com/aquasecurity/trivy/pkg/vulnerability"
|
||||
"github.com/google/wire"
|
||||
)
|
||||
|
||||
func initializeDockerScanner(ctx context.Context, imageName string, artifactCache cache.ArtifactCache, localArtifactCache cache.LocalArtifactCache,
|
||||
timeout time.Duration) (scanner.Scanner, func(), error) {
|
||||
wire.Build(scanner.StandaloneDockerSet)
|
||||
return scanner.Scanner{}, nil, nil
|
||||
}
|
||||
|
||||
func initializeArchiveScanner(ctx context.Context, filePath string, artifactCache cache.ArtifactCache, localArtifactCache cache.LocalArtifactCache,
|
||||
timeout time.Duration) (scanner.Scanner, error) {
|
||||
wire.Build(scanner.StandaloneArchiveSet)
|
||||
return scanner.Scanner{}, nil
|
||||
}
|
||||
|
||||
func initializeFilesystemScanner(ctx context.Context, dir string, artifactCache cache.ArtifactCache, localArtifactCache cache.LocalArtifactCache) (scanner.Scanner, func(), error) {
|
||||
wire.Build(scanner.StandaloneFilesystemSet)
|
||||
return scanner.Scanner{}, nil, nil
|
||||
}
|
||||
|
||||
func initializeRepositoryScanner(ctx context.Context, url string, artifactCache cache.ArtifactCache, localArtifactCache cache.LocalArtifactCache) (scanner.Scanner, func(), error) {
|
||||
wire.Build(scanner.StandaloneRepositorySet)
|
||||
return scanner.Scanner{}, nil, nil
|
||||
}
|
||||
|
||||
func initializeVulnerabilityClient() vulnerability.Client {
|
||||
wire.Build(vulnerability.SuperSet)
|
||||
return vulnerability.Client{}
|
||||
}
|
||||
37
internal/artifact/repository.go
Normal file
37
internal/artifact/repository.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package artifact
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/trivy/internal/artifact/config"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
)
|
||||
|
||||
func repositoryScanner(ctx context.Context, dir string, ac cache.ArtifactCache, lac cache.LocalArtifactCache, timeout time.Duration) (
|
||||
scanner.Scanner, func(), error) {
|
||||
s, cleanup, err := initializeRepositoryScanner(ctx, dir, ac, lac)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, func() {}, xerrors.Errorf("unable to initialize a filesystem scanner: %w", err)
|
||||
}
|
||||
return s, cleanup, nil
|
||||
}
|
||||
|
||||
// RepositoryRun runs scan on repository
|
||||
func RepositoryRun(cliCtx *cli.Context) error {
|
||||
c, err := config.New(cliCtx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// initialize config
|
||||
if err = c.Init(false); err != nil {
|
||||
return xerrors.Errorf("failed to initialize options: %w", err)
|
||||
}
|
||||
|
||||
return run(c, repositoryScanner)
|
||||
}
|
||||
116
internal/artifact/run.go
Normal file
116
internal/artifact/run.go
Normal file
@@ -0,0 +1,116 @@
|
||||
package artifact
|
||||
|
||||
import (
|
||||
"context"
|
||||
l "log"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/trivy-db/pkg/db"
|
||||
"github.com/aquasecurity/trivy/internal/artifact/config"
|
||||
"github.com/aquasecurity/trivy/internal/operation"
|
||||
"github.com/aquasecurity/trivy/pkg/log"
|
||||
"github.com/aquasecurity/trivy/pkg/report"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
"github.com/aquasecurity/trivy/pkg/utils"
|
||||
)
|
||||
|
||||
// InitializeScanner type to define initialize function signature
|
||||
type InitializeScanner func(context.Context, string, cache.ArtifactCache, cache.LocalArtifactCache, time.Duration) (
|
||||
scanner.Scanner, func(), error)
|
||||
|
||||
// nolint: gocyclo
|
||||
// TODO: refactror and fix cyclometic complexity
|
||||
func run(c config.Config, initializeScanner InitializeScanner) error {
|
||||
if err := log.InitLogger(c.Debug, c.Quiet); err != nil {
|
||||
l.Fatal(err)
|
||||
}
|
||||
|
||||
// configure cache dir
|
||||
utils.SetCacheDir(c.CacheDir)
|
||||
cacheClient, err := cache.NewFSCache(c.CacheDir)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("unable to initialize the cache: %w", err)
|
||||
}
|
||||
defer cacheClient.Close()
|
||||
|
||||
cacheOperation := operation.NewCache(cacheClient)
|
||||
log.Logger.Debugf("cache dir: %s", utils.CacheDir())
|
||||
|
||||
if c.Reset {
|
||||
return cacheOperation.Reset()
|
||||
}
|
||||
if c.ClearCache {
|
||||
return cacheOperation.ClearImages()
|
||||
}
|
||||
|
||||
// download the database file
|
||||
noProgress := c.Quiet || c.NoProgress
|
||||
if err = operation.DownloadDB(c.AppVersion, c.CacheDir, noProgress, c.Light, c.SkipUpdate); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if c.DownloadDBOnly {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err = db.Init(c.CacheDir); err != nil {
|
||||
return xerrors.Errorf("error in vulnerability DB initialize: %w", err)
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
target := c.Target
|
||||
if c.Input != "" {
|
||||
target = c.Input
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), c.Timeout)
|
||||
defer cancel()
|
||||
scanner, cleanup, err := initializeScanner(ctx, target, cacheClient, cacheClient, c.Timeout)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("unable to initialize a scanner: %w", err)
|
||||
}
|
||||
defer cleanup()
|
||||
|
||||
scanOptions := types.ScanOptions{
|
||||
VulnType: c.VulnType,
|
||||
ScanRemovedPackages: c.ScanRemovedPkgs, // this is valid only for image subcommand
|
||||
ListAllPackages: c.ListAllPkgs,
|
||||
SkipFiles: c.SkipFiles,
|
||||
SkipDirectories: c.SkipDirectories,
|
||||
}
|
||||
log.Logger.Debugf("Vulnerability type: %s", scanOptions.VulnType)
|
||||
|
||||
results, err := scanner.ScanArtifact(ctx, scanOptions)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("error in image scan: %w", err)
|
||||
}
|
||||
|
||||
vulnClient := initializeVulnerabilityClient()
|
||||
for i := range results {
|
||||
vulnClient.FillInfo(results[i].Vulnerabilities, results[i].Type)
|
||||
vulns, err := vulnClient.Filter(ctx, results[i].Vulnerabilities,
|
||||
c.Severities, c.IgnoreUnfixed, c.IgnoreFile, c.IgnorePolicy)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("unable to filter vulnerabilities: %w", err)
|
||||
}
|
||||
results[i].Vulnerabilities = vulns
|
||||
}
|
||||
|
||||
if err = report.WriteResults(c.Format, c.Output, c.Severities, results, c.Template, c.Light); err != nil {
|
||||
return xerrors.Errorf("unable to write results: %w", err)
|
||||
}
|
||||
|
||||
if c.ExitCode != 0 {
|
||||
for _, result := range results {
|
||||
if len(result.Vulnerabilities) > 0 {
|
||||
os.Exit(c.ExitCode)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
96
internal/artifact/wire_gen.go
Normal file
96
internal/artifact/wire_gen.go
Normal file
@@ -0,0 +1,96 @@
|
||||
// Code generated by Wire. DO NOT EDIT.
|
||||
|
||||
//go:generate wire
|
||||
//+build !wireinject
|
||||
|
||||
package artifact
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aquasecurity/fanal/applier"
|
||||
image2 "github.com/aquasecurity/fanal/artifact/image"
|
||||
local2 "github.com/aquasecurity/fanal/artifact/local"
|
||||
"github.com/aquasecurity/fanal/artifact/remote"
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/fanal/image"
|
||||
"github.com/aquasecurity/trivy-db/pkg/db"
|
||||
"github.com/aquasecurity/trivy/pkg/detector/library"
|
||||
"github.com/aquasecurity/trivy/pkg/detector/ospkg"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner/local"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
"github.com/aquasecurity/trivy/pkg/vulnerability"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Injectors from inject.go:
|
||||
|
||||
func initializeDockerScanner(ctx context.Context, imageName string, artifactCache cache.ArtifactCache, localArtifactCache cache.LocalArtifactCache, timeout time.Duration) (scanner.Scanner, func(), error) {
|
||||
applierApplier := applier.NewApplier(localArtifactCache)
|
||||
detector := ospkg.Detector{}
|
||||
driverFactory := library.DriverFactory{}
|
||||
libraryDetector := library.NewDetector(driverFactory)
|
||||
localScanner := local.NewScanner(applierApplier, detector, libraryDetector)
|
||||
dockerOption, err := types.GetDockerOption(timeout)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, nil, err
|
||||
}
|
||||
imageImage, cleanup, err := image.NewDockerImage(ctx, imageName, dockerOption)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, nil, err
|
||||
}
|
||||
artifact := image2.NewArtifact(imageImage, artifactCache)
|
||||
scannerScanner := scanner.NewScanner(localScanner, artifact)
|
||||
return scannerScanner, func() {
|
||||
cleanup()
|
||||
}, nil
|
||||
}
|
||||
|
||||
func initializeArchiveScanner(ctx context.Context, filePath string, artifactCache cache.ArtifactCache, localArtifactCache cache.LocalArtifactCache, timeout time.Duration) (scanner.Scanner, error) {
|
||||
applierApplier := applier.NewApplier(localArtifactCache)
|
||||
detector := ospkg.Detector{}
|
||||
driverFactory := library.DriverFactory{}
|
||||
libraryDetector := library.NewDetector(driverFactory)
|
||||
localScanner := local.NewScanner(applierApplier, detector, libraryDetector)
|
||||
imageImage, err := image.NewArchiveImage(filePath)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, err
|
||||
}
|
||||
artifact := image2.NewArtifact(imageImage, artifactCache)
|
||||
scannerScanner := scanner.NewScanner(localScanner, artifact)
|
||||
return scannerScanner, nil
|
||||
}
|
||||
|
||||
func initializeFilesystemScanner(ctx context.Context, dir string, artifactCache cache.ArtifactCache, localArtifactCache cache.LocalArtifactCache) (scanner.Scanner, func(), error) {
|
||||
applierApplier := applier.NewApplier(localArtifactCache)
|
||||
detector := ospkg.Detector{}
|
||||
driverFactory := library.DriverFactory{}
|
||||
libraryDetector := library.NewDetector(driverFactory)
|
||||
localScanner := local.NewScanner(applierApplier, detector, libraryDetector)
|
||||
artifact := local2.NewArtifact(dir, artifactCache)
|
||||
scannerScanner := scanner.NewScanner(localScanner, artifact)
|
||||
return scannerScanner, func() {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func initializeRepositoryScanner(ctx context.Context, url string, artifactCache cache.ArtifactCache, localArtifactCache cache.LocalArtifactCache) (scanner.Scanner, func(), error) {
|
||||
applierApplier := applier.NewApplier(localArtifactCache)
|
||||
detector := ospkg.Detector{}
|
||||
driverFactory := library.DriverFactory{}
|
||||
libraryDetector := library.NewDetector(driverFactory)
|
||||
localScanner := local.NewScanner(applierApplier, detector, libraryDetector)
|
||||
artifact, cleanup, err := remote.NewArtifact(url, artifactCache)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, nil, err
|
||||
}
|
||||
scannerScanner := scanner.NewScanner(localScanner, artifact)
|
||||
return scannerScanner, func() {
|
||||
cleanup()
|
||||
}, nil
|
||||
}
|
||||
|
||||
func initializeVulnerabilityClient() vulnerability.Client {
|
||||
config := db.Config{}
|
||||
client := vulnerability.NewClient(config)
|
||||
return client
|
||||
}
|
||||
@@ -2,95 +2,56 @@ package config
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/genuinetools/reg/registry"
|
||||
"github.com/urfave/cli"
|
||||
"go.uber.org/zap"
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
|
||||
"github.com/aquasecurity/trivy/pkg/log"
|
||||
"github.com/aquasecurity/trivy/internal/config"
|
||||
)
|
||||
|
||||
// Config holds the Trivy client config
|
||||
type Config struct {
|
||||
context *cli.Context
|
||||
logger *zap.SugaredLogger
|
||||
|
||||
Quiet bool
|
||||
Debug bool
|
||||
|
||||
CacheDir string
|
||||
ClearCache bool
|
||||
|
||||
Input string
|
||||
output string
|
||||
Format string
|
||||
Template string
|
||||
|
||||
Timeout time.Duration
|
||||
vulnType string
|
||||
severities string
|
||||
IgnoreFile string
|
||||
IgnoreUnfixed bool
|
||||
ExitCode int
|
||||
config.GlobalConfig
|
||||
config.ArtifactConfig
|
||||
config.ImageConfig
|
||||
config.ReportConfig
|
||||
|
||||
RemoteAddr string
|
||||
token string
|
||||
tokenHeader string
|
||||
customHeaders []string
|
||||
CustomHeaders http.Header
|
||||
|
||||
// these variables are generated by Init()
|
||||
ImageName string
|
||||
VulnType []string
|
||||
Output *os.File
|
||||
Severities []dbTypes.Severity
|
||||
AppVersion string
|
||||
// this field is populated in Init()
|
||||
CustomHeaders http.Header
|
||||
}
|
||||
|
||||
// New is the factory method for Config
|
||||
func New(c *cli.Context) (Config, error) {
|
||||
debug := c.Bool("debug")
|
||||
quiet := c.Bool("quiet")
|
||||
logger, err := log.NewLogger(debug, quiet)
|
||||
gc, err := config.NewGlobalConfig(c)
|
||||
if err != nil {
|
||||
return Config{}, xerrors.New("failed to create a logger")
|
||||
return Config{}, xerrors.Errorf("failed to initialize global options: %w", err)
|
||||
}
|
||||
|
||||
return Config{
|
||||
context: c,
|
||||
logger: logger,
|
||||
|
||||
Quiet: quiet,
|
||||
Debug: debug,
|
||||
|
||||
CacheDir: c.String("cache-dir"),
|
||||
ClearCache: c.Bool("clear-cache"),
|
||||
|
||||
Input: c.String("input"),
|
||||
output: c.String("output"),
|
||||
Format: c.String("format"),
|
||||
Template: c.String("template"),
|
||||
|
||||
Timeout: c.Duration("timeout"),
|
||||
vulnType: c.String("vuln-type"),
|
||||
severities: c.String("severity"),
|
||||
IgnoreFile: c.String("ignorefile"),
|
||||
IgnoreUnfixed: c.Bool("ignore-unfixed"),
|
||||
ExitCode: c.Int("exit-code"),
|
||||
|
||||
RemoteAddr: c.String("remote"),
|
||||
token: c.String("token"),
|
||||
tokenHeader: c.String("token-header"),
|
||||
customHeaders: c.StringSlice("custom-headers"),
|
||||
GlobalConfig: gc,
|
||||
ArtifactConfig: config.NewArtifactConfig(c),
|
||||
ImageConfig: config.NewImageConfig(c),
|
||||
ReportConfig: config.NewReportConfig(c),
|
||||
RemoteAddr: c.String("remote"),
|
||||
token: c.String("token"),
|
||||
tokenHeader: c.String("token-header"),
|
||||
customHeaders: c.StringSlice("custom-headers"),
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Init initializes the config
|
||||
func (c *Config) Init() (err error) {
|
||||
c.Severities = c.splitSeverity(c.severities)
|
||||
c.VulnType = strings.Split(c.vulnType, ",")
|
||||
c.AppVersion = c.context.App.Version
|
||||
// --clear-cache doesn't conduct the scan
|
||||
if c.ClearCache {
|
||||
return nil
|
||||
}
|
||||
|
||||
c.CustomHeaders = splitCustomHeaders(c.customHeaders)
|
||||
|
||||
// add token to custom headers
|
||||
@@ -98,59 +59,21 @@ func (c *Config) Init() (err error) {
|
||||
c.CustomHeaders.Set(c.tokenHeader, c.token)
|
||||
}
|
||||
|
||||
// --clear-cache doesn't conduct the scan
|
||||
if c.ClearCache {
|
||||
return nil
|
||||
if err := c.ReportConfig.Init(c.Logger); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
args := c.context.Args()
|
||||
if c.Input == "" && len(args) == 0 {
|
||||
c.logger.Error(`trivy requires at least 1 argument or --input option`)
|
||||
cli.ShowAppHelp(c.context)
|
||||
return xerrors.New("arguments error")
|
||||
} else if len(args) > 1 {
|
||||
c.logger.Error(`multiple images cannot be specified`)
|
||||
return xerrors.New("arguments error")
|
||||
if err := c.ArtifactConfig.Init(c.Context, c.Logger); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c.Output = os.Stdout
|
||||
if c.output != "" {
|
||||
if c.Output, err = os.Create(c.output); err != nil {
|
||||
return xerrors.Errorf("failed to create an output file: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
if c.Input == "" {
|
||||
c.ImageName = args[0]
|
||||
}
|
||||
|
||||
// Check whether 'latest' tag is used
|
||||
if c.ImageName != "" {
|
||||
image, err := registry.ParseImage(c.ImageName)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("invalid image: %w", err)
|
||||
}
|
||||
if image.Tag == "latest" {
|
||||
c.logger.Warn("You should avoid using the :latest tag as it is cached. You need to specify '--clear-cache' option when :latest image is changed")
|
||||
}
|
||||
if err := c.ImageConfig.Init(c.Context.Args(), c.Logger); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Config) splitSeverity(severity string) []dbTypes.Severity {
|
||||
c.logger.Debugf("Severities: %s", severity)
|
||||
var severities []dbTypes.Severity
|
||||
for _, s := range strings.Split(severity, ",") {
|
||||
severity, err := dbTypes.NewSeverity(s)
|
||||
if err != nil {
|
||||
c.logger.Warnf("unknown severity option: %s", err)
|
||||
}
|
||||
severities = append(severities, severity)
|
||||
}
|
||||
return severities
|
||||
}
|
||||
|
||||
func splitCustomHeaders(headers []string) http.Header {
|
||||
result := make(http.Header)
|
||||
for _, header := range headers {
|
||||
|
||||
@@ -6,193 +6,228 @@ import (
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zaptest/observer"
|
||||
|
||||
dbTypes "github.com/aquasecurity/trivy-db/pkg/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/urfave/cli"
|
||||
"github.com/aquasecurity/trivy/internal/config"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
func TestConfig_Init(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
args []string
|
||||
want Config
|
||||
name string
|
||||
globalConfig config.GlobalConfig
|
||||
imageConfig config.ImageConfig
|
||||
reportConfig config.ReportConfig
|
||||
args []string
|
||||
logs []string
|
||||
want Config
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "happy path",
|
||||
args: []string{"-quiet", "--cache-dir", "/tmp/test"},
|
||||
reportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
VulnType: []string{"os"},
|
||||
},
|
||||
args: []string{"--severity", "CRITICAL", "--vuln-type", "os", "--quiet", "alpine:3.10"},
|
||||
want: Config{
|
||||
Quiet: true,
|
||||
CacheDir: "/tmp/test",
|
||||
GlobalConfig: config.GlobalConfig{
|
||||
Quiet: true,
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "alpine:3.10",
|
||||
},
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
VulnType: []string{"os"},
|
||||
Output: os.Stdout,
|
||||
},
|
||||
CustomHeaders: http.Header{},
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
app := &cli.App{}
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("quiet", false, "")
|
||||
set.String("cache-dir", "", "")
|
||||
|
||||
c := cli.NewContext(app, set, nil)
|
||||
_ = set.Parse(tt.args)
|
||||
|
||||
got, err := New(c)
|
||||
|
||||
// avoid to compare these values because these values are pointer
|
||||
tt.want.context = c
|
||||
tt.want.logger = got.logger
|
||||
|
||||
assert.NoError(t, err, tt.name)
|
||||
assert.Equal(t, tt.want, got, tt.name)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfig_Init(t *testing.T) {
|
||||
type fields struct {
|
||||
context *cli.Context
|
||||
Quiet bool
|
||||
NoProgress bool
|
||||
Debug bool
|
||||
CacheDir string
|
||||
Reset bool
|
||||
DownloadDBOnly bool
|
||||
SkipUpdate bool
|
||||
ClearCache bool
|
||||
Input string
|
||||
output string
|
||||
Format string
|
||||
Template string
|
||||
Timeout time.Duration
|
||||
vulnType string
|
||||
Light bool
|
||||
severities string
|
||||
IgnoreFile string
|
||||
IgnoreUnfixed bool
|
||||
ExitCode int
|
||||
ImageName string
|
||||
VulnType []string
|
||||
Output *os.File
|
||||
Severities []dbTypes.Severity
|
||||
AppVersion string
|
||||
onlyUpdate string
|
||||
refresh bool
|
||||
autoRefresh bool
|
||||
token string
|
||||
tokenHeader string
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
fields fields
|
||||
args []string
|
||||
logs []string
|
||||
want Config
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "happy path",
|
||||
fields: fields{
|
||||
severities: "CRITICAL",
|
||||
vulnType: "os",
|
||||
Quiet: true,
|
||||
token: "foobar",
|
||||
tokenHeader: "Trivy-Token",
|
||||
},
|
||||
args: []string{"alpine:3.10"},
|
||||
name: "happy path with token and token header",
|
||||
args: []string{"--token", "secret", "--token-header", "X-Trivy-Token", "alpine:3.11"},
|
||||
want: Config{
|
||||
AppVersion: "0.0.0",
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
severities: "CRITICAL",
|
||||
ImageName: "alpine:3.10",
|
||||
VulnType: []string{"os"},
|
||||
vulnType: "os",
|
||||
Output: os.Stdout,
|
||||
Quiet: true,
|
||||
token: "foobar",
|
||||
tokenHeader: "Trivy-Token",
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "alpine:3.11",
|
||||
},
|
||||
token: "secret",
|
||||
tokenHeader: "X-Trivy-Token",
|
||||
CustomHeaders: http.Header{
|
||||
"Trivy-Token": []string{"foobar"},
|
||||
"X-Trivy-Token": []string{"secret"},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "happy path with an unknown severity",
|
||||
fields: fields{
|
||||
severities: "CRITICAL,INVALID",
|
||||
vulnType: "os,library",
|
||||
name: "happy path with good custom headers",
|
||||
args: []string{"--custom-headers", "foo:bar", "alpine:3.11"},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "alpine:3.11",
|
||||
},
|
||||
customHeaders: []string{"foo:bar"},
|
||||
CustomHeaders: http.Header{
|
||||
"Foo": []string{"bar"},
|
||||
},
|
||||
},
|
||||
args: []string{"centos:7"},
|
||||
},
|
||||
{
|
||||
name: "happy path with bad custom headers",
|
||||
args: []string{"--custom-headers", "foobaz", "alpine:3.11"},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "alpine:3.11",
|
||||
},
|
||||
customHeaders: []string{"foobaz"},
|
||||
CustomHeaders: http.Header{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "happy path with an unknown severity",
|
||||
args: []string{"--severity", "CRITICAL,INVALID", "centos:7"},
|
||||
logs: []string{
|
||||
"unknown severity option: unknown severity: INVALID",
|
||||
},
|
||||
want: Config{
|
||||
AppVersion: "0.0.0",
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical, dbTypes.SeverityUnknown},
|
||||
severities: "CRITICAL,INVALID",
|
||||
ImageName: "centos:7",
|
||||
VulnType: []string{"os", "library"},
|
||||
vulnType: "os,library",
|
||||
Output: os.Stdout,
|
||||
CustomHeaders: make(http.Header),
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical, dbTypes.SeverityUnknown},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "centos:7",
|
||||
},
|
||||
CustomHeaders: http.Header{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid option combination: --template enabled without --format",
|
||||
args: []string{"--template", "@contrib/gitlab.tpl", "gitlab/gitlab-ce:12.7.2-ce.0"},
|
||||
logs: []string{
|
||||
"--template is ignored because --format template is not specified. Use --template option with --format template option.",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
Template: "@contrib/gitlab.tpl",
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gitlab/gitlab-ce:12.7.2-ce.0",
|
||||
},
|
||||
CustomHeaders: http.Header{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid option combination: --template and --format json",
|
||||
args: []string{"--format", "json", "--template", "@contrib/gitlab.tpl", "gitlab/gitlab-ce:12.7.2-ce.0"},
|
||||
logs: []string{
|
||||
"--template is ignored because --format json is specified. Use --template option with --format template option.",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
Template: "@contrib/gitlab.tpl",
|
||||
Format: "json",
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gitlab/gitlab-ce:12.7.2-ce.0",
|
||||
},
|
||||
CustomHeaders: http.Header{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid option combination: --format template without --template",
|
||||
args: []string{"--format", "template", "--severity", "MEDIUM", "gitlab/gitlab-ce:12.7.2-ce.0"},
|
||||
logs: []string{
|
||||
"--format template is ignored because --template not is specified. Specify --template option when you use --format template.",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityMedium},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
Format: "template",
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gitlab/gitlab-ce:12.7.2-ce.0",
|
||||
},
|
||||
CustomHeaders: http.Header{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "invalid option combination: --format template without --template",
|
||||
args: []string{"--format", "template", "--severity", "MEDIUM", "gitlab/gitlab-ce:12.7.2-ce.0"},
|
||||
logs: []string{
|
||||
"--format template is ignored because --template not is specified. Specify --template option when you use --format template.",
|
||||
},
|
||||
want: Config{
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityMedium},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
Format: "template",
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gitlab/gitlab-ce:12.7.2-ce.0",
|
||||
},
|
||||
CustomHeaders: http.Header{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with latest tag",
|
||||
fields: fields{
|
||||
onlyUpdate: "alpine",
|
||||
severities: "LOW",
|
||||
vulnType: "os,library",
|
||||
},
|
||||
args: []string{"gcr.io/distroless/base"},
|
||||
logs: []string{
|
||||
"You should avoid using the :latest tag as it is cached. You need to specify '--clear-cache' option when :latest image is changed",
|
||||
},
|
||||
want: Config{
|
||||
AppVersion: "0.0.0",
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityLow},
|
||||
severities: "LOW",
|
||||
ImageName: "gcr.io/distroless/base",
|
||||
VulnType: []string{"os", "library"},
|
||||
vulnType: "os,library",
|
||||
Output: os.Stdout,
|
||||
CustomHeaders: make(http.Header),
|
||||
ReportConfig: config.ReportConfig{
|
||||
Severities: []dbTypes.Severity{dbTypes.SeverityCritical},
|
||||
Output: os.Stdout,
|
||||
VulnType: []string{"os", "library"},
|
||||
},
|
||||
ArtifactConfig: config.ArtifactConfig{
|
||||
Target: "gcr.io/distroless/base",
|
||||
},
|
||||
CustomHeaders: http.Header{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "sad: multiple image names",
|
||||
fields: fields{
|
||||
severities: "MEDIUM",
|
||||
},
|
||||
args: []string{"centos:7", "alpine:3.10"},
|
||||
logs: []string{
|
||||
"multiple images cannot be specified",
|
||||
"multiple targets cannot be specified",
|
||||
},
|
||||
wantErr: "arguments error",
|
||||
},
|
||||
{
|
||||
name: "sad: no image name",
|
||||
fields: fields{
|
||||
severities: "MEDIUM",
|
||||
},
|
||||
logs: []string{
|
||||
"trivy requires at least 1 argument or --input option",
|
||||
},
|
||||
wantErr: "arguments error",
|
||||
},
|
||||
{
|
||||
name: "sad: invalid image name",
|
||||
fields: fields{
|
||||
severities: "HIGH",
|
||||
},
|
||||
name: "sad: invalid image name",
|
||||
args: []string{`!"#$%&'()`},
|
||||
wantErr: "invalid image: parsing image",
|
||||
wantErr: "could not parse reference",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
@@ -202,33 +237,25 @@ func TestConfig_Init(t *testing.T) {
|
||||
|
||||
app := cli.NewApp()
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("quiet", false, "")
|
||||
set.Bool("no-progress", false, "")
|
||||
set.Bool("clear-cache", false, "")
|
||||
set.String("severity", "CRITICAL", "")
|
||||
set.String("vuln-type", "os,library", "")
|
||||
set.String("template", "", "")
|
||||
set.String("format", "", "")
|
||||
set.String("token", "", "")
|
||||
set.String("token-header", "", "")
|
||||
set.Var(&cli.StringSlice{}, "custom-headers", "")
|
||||
|
||||
ctx := cli.NewContext(app, set, nil)
|
||||
_ = set.Parse(tt.args)
|
||||
|
||||
c := &Config{
|
||||
context: ctx,
|
||||
logger: logger.Sugar(),
|
||||
Quiet: tt.fields.Quiet,
|
||||
Debug: tt.fields.Debug,
|
||||
CacheDir: tt.fields.CacheDir,
|
||||
ClearCache: tt.fields.ClearCache,
|
||||
Input: tt.fields.Input,
|
||||
output: tt.fields.output,
|
||||
Format: tt.fields.Format,
|
||||
Template: tt.fields.Template,
|
||||
Timeout: tt.fields.Timeout,
|
||||
vulnType: tt.fields.vulnType,
|
||||
severities: tt.fields.severities,
|
||||
IgnoreFile: tt.fields.IgnoreFile,
|
||||
IgnoreUnfixed: tt.fields.IgnoreUnfixed,
|
||||
ExitCode: tt.fields.ExitCode,
|
||||
ImageName: tt.fields.ImageName,
|
||||
Output: tt.fields.Output,
|
||||
token: tt.fields.token,
|
||||
tokenHeader: tt.fields.tokenHeader,
|
||||
}
|
||||
c, err := New(ctx)
|
||||
require.NoError(t, err, err)
|
||||
|
||||
err := c.Init()
|
||||
c.GlobalConfig.Logger = logger.Sugar()
|
||||
err = c.Init()
|
||||
|
||||
// tests log messages
|
||||
var gotMessages []string
|
||||
@@ -240,16 +267,15 @@ func TestConfig_Init(t *testing.T) {
|
||||
// test the error
|
||||
switch {
|
||||
case tt.wantErr != "":
|
||||
require.NotNil(t, err, tt.name)
|
||||
assert.Contains(t, err.Error(), tt.wantErr, tt.name)
|
||||
return
|
||||
default:
|
||||
assert.NoError(t, err, tt.name)
|
||||
}
|
||||
|
||||
tt.want.context = ctx
|
||||
tt.want.logger = logger.Sugar()
|
||||
assert.Equal(t, &tt.want, c, tt.name)
|
||||
tt.want.GlobalConfig.Context = ctx
|
||||
tt.want.GlobalConfig.Logger = logger.Sugar()
|
||||
assert.Equal(t, tt.want, c, tt.name)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,18 +3,26 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client/library"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client/ospkg"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
"github.com/aquasecurity/trivy/pkg/vulnerability"
|
||||
"github.com/google/wire"
|
||||
)
|
||||
|
||||
func initializeScanner(cacheClient cache.Cache, ospkgCustomHeaders ospkg.CustomHeaders, libraryCustomHeaders library.CustomHeaders,
|
||||
ospkgURL ospkg.RemoteURL, libURL library.RemoteURL) scanner.Scanner {
|
||||
wire.Build(scanner.ClientSet)
|
||||
return scanner.Scanner{}
|
||||
func initializeDockerScanner(ctx context.Context, imageName string, artifactCache cache.ArtifactCache, customHeaders client.CustomHeaders,
|
||||
url client.RemoteURL, timeout time.Duration) (scanner.Scanner, func(), error) {
|
||||
wire.Build(scanner.RemoteDockerSet)
|
||||
return scanner.Scanner{}, nil, nil
|
||||
}
|
||||
|
||||
func initializeArchiveScanner(ctx context.Context, filePath string, artifactCache cache.ArtifactCache, customHeaders client.CustomHeaders,
|
||||
url client.RemoteURL, timeout time.Duration) (scanner.Scanner, error) {
|
||||
wire.Build(scanner.RemoteArchiveSet)
|
||||
return scanner.Scanner{}, nil
|
||||
}
|
||||
|
||||
func initializeVulnerabilityClient() vulnerability.Client {
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/trivy/internal/client/config"
|
||||
"github.com/aquasecurity/trivy/internal/operation"
|
||||
"github.com/aquasecurity/trivy/pkg/cache"
|
||||
"github.com/aquasecurity/trivy/pkg/log"
|
||||
"github.com/aquasecurity/trivy/pkg/report"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client/library"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client/ospkg"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
"github.com/aquasecurity/trivy/pkg/utils"
|
||||
)
|
||||
|
||||
// Run runs the scan
|
||||
func Run(cliCtx *cli.Context) error {
|
||||
c, err := config.New(cliCtx)
|
||||
if err != nil {
|
||||
@@ -25,6 +26,8 @@ func Run(cliCtx *cli.Context) error {
|
||||
return run(c)
|
||||
}
|
||||
|
||||
// nolint: gocyclo
|
||||
// TODO: refactror and fix cyclometic complexity
|
||||
func run(c config.Config) (err error) {
|
||||
if err = log.InitLogger(c.Debug, c.Quiet); err != nil {
|
||||
return xerrors.Errorf("failed to initialize a logger: %w", err)
|
||||
@@ -37,36 +40,58 @@ func run(c config.Config) (err error) {
|
||||
|
||||
// configure cache dir
|
||||
utils.SetCacheDir(c.CacheDir)
|
||||
cacheClient := cache.Initialize(c.CacheDir)
|
||||
cacheOperation := operation.NewCache(cacheClient)
|
||||
log.Logger.Debugf("cache dir: %s", utils.CacheDir())
|
||||
|
||||
if c.ClearCache {
|
||||
return cacheOperation.ClearImages()
|
||||
log.Logger.Warn("A client doesn't have image cache")
|
||||
return nil
|
||||
}
|
||||
|
||||
var scanner scanner.Scanner
|
||||
ctx, cancel := context.WithTimeout(context.Background(), c.Timeout)
|
||||
defer cancel()
|
||||
remoteCache := cache.NewRemoteCache(cache.RemoteURL(c.RemoteAddr), c.CustomHeaders)
|
||||
|
||||
cleanup := func() {}
|
||||
if c.Input != "" {
|
||||
// scan tar file
|
||||
scanner, err = initializeArchiveScanner(ctx, c.Input, remoteCache,
|
||||
client.CustomHeaders(c.CustomHeaders), client.RemoteURL(c.RemoteAddr), c.Timeout)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("unable to initialize the archive scanner: %w", err)
|
||||
}
|
||||
} else {
|
||||
// scan an image in Docker Engine or Docker Registry
|
||||
scanner, cleanup, err = initializeDockerScanner(ctx, c.Target, remoteCache,
|
||||
client.CustomHeaders(c.CustomHeaders), client.RemoteURL(c.RemoteAddr), c.Timeout)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("unable to initialize the docker scanner: %w", err)
|
||||
}
|
||||
}
|
||||
defer cleanup()
|
||||
|
||||
scanOptions := types.ScanOptions{
|
||||
VulnType: c.VulnType,
|
||||
Timeout: c.Timeout,
|
||||
RemoteURL: c.RemoteAddr,
|
||||
VulnType: c.VulnType,
|
||||
ScanRemovedPackages: c.ScanRemovedPkgs,
|
||||
}
|
||||
log.Logger.Debugf("Vulnerability type: %s", scanOptions.VulnType)
|
||||
|
||||
scanner := initializeScanner(cacheClient,
|
||||
ospkg.CustomHeaders(c.CustomHeaders), library.CustomHeaders(c.CustomHeaders),
|
||||
ospkg.RemoteURL(c.RemoteAddr), library.RemoteURL(c.RemoteAddr))
|
||||
results, err := scanner.ScanImage(c.ImageName, c.Input, scanOptions)
|
||||
results, err := scanner.ScanArtifact(ctx, scanOptions)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("error in image scan: %w", err)
|
||||
}
|
||||
|
||||
vulnClient := initializeVulnerabilityClient()
|
||||
for i := range results {
|
||||
results[i].Vulnerabilities = vulnClient.Filter(results[i].Vulnerabilities,
|
||||
c.Severities, c.IgnoreUnfixed, c.IgnoreFile)
|
||||
vulns, err := vulnClient.Filter(ctx, results[i].Vulnerabilities,
|
||||
c.Severities, c.IgnoreUnfixed, c.IgnoreFile, c.IgnorePolicy)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
results[i].Vulnerabilities = vulns
|
||||
}
|
||||
|
||||
if err = report.WriteResults(c.Format, c.Output, results, c.Template, false); err != nil {
|
||||
if err = report.WriteResults(c.Format, c.Output, c.Severities, results, c.Template, false); err != nil {
|
||||
return xerrors.Errorf("unable to write results: %w", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,31 +6,52 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
image2 "github.com/aquasecurity/fanal/artifact/image"
|
||||
"github.com/aquasecurity/fanal/cache"
|
||||
"github.com/aquasecurity/fanal/image"
|
||||
"github.com/aquasecurity/trivy-db/pkg/db"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client/library"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client/ospkg"
|
||||
"github.com/aquasecurity/trivy/pkg/rpc/client"
|
||||
"github.com/aquasecurity/trivy/pkg/scanner"
|
||||
library2 "github.com/aquasecurity/trivy/pkg/scanner/library"
|
||||
ospkg2 "github.com/aquasecurity/trivy/pkg/scanner/ospkg"
|
||||
"github.com/aquasecurity/trivy/pkg/types"
|
||||
"github.com/aquasecurity/trivy/pkg/vulnerability"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Injectors from inject.go:
|
||||
|
||||
func initializeScanner(cacheClient cache.Cache, ospkgCustomHeaders ospkg.CustomHeaders, libraryCustomHeaders library.CustomHeaders, ospkgURL ospkg.RemoteURL, libURL library.RemoteURL) scanner.Scanner {
|
||||
osDetector := ospkg.NewProtobufClient(ospkgURL)
|
||||
detector := ospkg.NewDetector(ospkgCustomHeaders, osDetector)
|
||||
ospkgScanner := ospkg2.NewScanner(detector)
|
||||
libDetector := library.NewProtobufClient(libURL)
|
||||
libraryDetector := library.NewDetector(libraryCustomHeaders, libDetector)
|
||||
libraryScanner := library2.NewScanner(libraryDetector)
|
||||
scannerScanner := scanner.NewScanner(cacheClient, ospkgScanner, libraryScanner)
|
||||
return scannerScanner
|
||||
func initializeDockerScanner(ctx context.Context, imageName string, artifactCache cache.ArtifactCache, customHeaders client.CustomHeaders, url client.RemoteURL, timeout time.Duration) (scanner.Scanner, func(), error) {
|
||||
scannerScanner := client.NewProtobufClient(url)
|
||||
clientScanner := client.NewScanner(customHeaders, scannerScanner)
|
||||
dockerOption, err := types.GetDockerOption(timeout)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, nil, err
|
||||
}
|
||||
imageImage, cleanup, err := image.NewDockerImage(ctx, imageName, dockerOption)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, nil, err
|
||||
}
|
||||
artifact := image2.NewArtifact(imageImage, artifactCache)
|
||||
scanner2 := scanner.NewScanner(clientScanner, artifact)
|
||||
return scanner2, func() {
|
||||
cleanup()
|
||||
}, nil
|
||||
}
|
||||
|
||||
func initializeArchiveScanner(ctx context.Context, filePath string, artifactCache cache.ArtifactCache, customHeaders client.CustomHeaders, url client.RemoteURL, timeout time.Duration) (scanner.Scanner, error) {
|
||||
scannerScanner := client.NewProtobufClient(url)
|
||||
clientScanner := client.NewScanner(customHeaders, scannerScanner)
|
||||
imageImage, err := image.NewArchiveImage(filePath)
|
||||
if err != nil {
|
||||
return scanner.Scanner{}, err
|
||||
}
|
||||
artifact := image2.NewArtifact(imageImage, artifactCache)
|
||||
scanner2 := scanner.NewScanner(clientScanner, artifact)
|
||||
return scanner2, nil
|
||||
}
|
||||
|
||||
func initializeVulnerabilityClient() vulnerability.Client {
|
||||
config := db.Config{}
|
||||
client := vulnerability.NewClient(config)
|
||||
return client
|
||||
vulnerabilityClient := vulnerability.NewClient(config)
|
||||
return vulnerabilityClient
|
||||
}
|
||||
|
||||
63
internal/config/artifact.go
Normal file
63
internal/config/artifact.go
Normal file
@@ -0,0 +1,63 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// ArtifactConfig holds the config for a artifact scanning
|
||||
type ArtifactConfig struct {
|
||||
Input string
|
||||
Timeout time.Duration
|
||||
ClearCache bool
|
||||
|
||||
skipDirectories string
|
||||
SkipDirectories []string
|
||||
skipFiles string
|
||||
SkipFiles []string
|
||||
|
||||
// this field is populated in Init()
|
||||
Target string
|
||||
}
|
||||
|
||||
// NewArtifactConfig is the factory method to return artifact config
|
||||
func NewArtifactConfig(c *cli.Context) ArtifactConfig {
|
||||
return ArtifactConfig{
|
||||
Input: c.String("input"),
|
||||
Timeout: c.Duration("timeout"),
|
||||
ClearCache: c.Bool("clear-cache"),
|
||||
skipFiles: c.String("skip-files"),
|
||||
skipDirectories: c.String("skip-dirs"),
|
||||
}
|
||||
}
|
||||
|
||||
// Init initialize the CLI context for artifact scanning
|
||||
func (c *ArtifactConfig) Init(ctx *cli.Context, logger *zap.SugaredLogger) (err error) {
|
||||
if c.Input == "" && ctx.Args().Len() == 0 {
|
||||
logger.Debug(`trivy requires at least 1 argument or --input option`)
|
||||
_ = cli.ShowSubcommandHelp(ctx) // nolint: errcheck
|
||||
os.Exit(0)
|
||||
} else if ctx.Args().Len() > 1 {
|
||||
logger.Error(`multiple targets cannot be specified`)
|
||||
return xerrors.New("arguments error")
|
||||
}
|
||||
|
||||
if c.Input == "" {
|
||||
c.Target = ctx.Args().First()
|
||||
}
|
||||
|
||||
if c.skipDirectories != "" {
|
||||
c.SkipDirectories = strings.Split(c.skipDirectories, ",")
|
||||
}
|
||||
|
||||
if c.skipFiles != "" {
|
||||
c.SkipFiles = strings.Split(c.skipFiles, ",")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
73
internal/config/artifact_test.go
Normal file
73
internal/config/artifact_test.go
Normal file
@@ -0,0 +1,73 @@
|
||||
package config_test
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"testing"
|
||||
|
||||
"github.com/aquasecurity/trivy/internal/config"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zaptest/observer"
|
||||
)
|
||||
|
||||
func TestArtifactConfig_Init(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
args []string
|
||||
logs []string
|
||||
want config.ArtifactConfig
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "happy path",
|
||||
args: []string{"alpine:3.10"},
|
||||
want: config.ArtifactConfig{
|
||||
Target: "alpine:3.10",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "sad: multiple image names",
|
||||
args: []string{"centos:7", "alpine:3.10"},
|
||||
logs: []string{
|
||||
"multiple targets cannot be specified",
|
||||
},
|
||||
wantErr: "arguments error",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
core, obs := observer.New(zap.DebugLevel)
|
||||
logger := zap.New(core)
|
||||
|
||||
app := cli.NewApp()
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
ctx := cli.NewContext(app, set, nil)
|
||||
_ = set.Parse(tt.args)
|
||||
|
||||
c := config.NewArtifactConfig(ctx)
|
||||
|
||||
err := c.Init(ctx, logger.Sugar())
|
||||
|
||||
// tests log messages
|
||||
var gotMessages []string
|
||||
for _, entry := range obs.AllUntimed() {
|
||||
gotMessages = append(gotMessages, entry.Message)
|
||||
}
|
||||
assert.Equal(t, tt.logs, gotMessages, tt.name)
|
||||
|
||||
// test the error
|
||||
switch {
|
||||
case tt.wantErr != "":
|
||||
require.NotNil(t, err)
|
||||
assert.Contains(t, err.Error(), tt.wantErr, tt.name)
|
||||
return
|
||||
default:
|
||||
assert.NoError(t, err, tt.name)
|
||||
}
|
||||
|
||||
assert.Equal(t, tt.want, c, tt.name)
|
||||
})
|
||||
}
|
||||
}
|
||||
34
internal/config/db.go
Normal file
34
internal/config/db.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli/v2"
|
||||
"golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// DBConfig holds the config for trivy DB
|
||||
type DBConfig struct {
|
||||
Reset bool
|
||||
DownloadDBOnly bool
|
||||
SkipUpdate bool
|
||||
Light bool
|
||||
NoProgress bool
|
||||
}
|
||||
|
||||
// NewDBConfig is the factory method to return the DBConfig
|
||||
func NewDBConfig(c *cli.Context) DBConfig {
|
||||
return DBConfig{
|
||||
Reset: c.Bool("reset"),
|
||||
DownloadDBOnly: c.Bool("download-db-only"),
|
||||
SkipUpdate: c.Bool("skip-update"),
|
||||
Light: c.Bool("light"),
|
||||
NoProgress: c.Bool("no-progress"),
|
||||
}
|
||||
}
|
||||
|
||||
// Init initialize the DBConfig
|
||||
func (c *DBConfig) Init() (err error) {
|
||||
if c.SkipUpdate && c.DownloadDBOnly {
|
||||
return xerrors.New("--skip-update and --download-db-only options can not be specified both")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
88
internal/config/db_test.go
Normal file
88
internal/config/db_test.go
Normal file
@@ -0,0 +1,88 @@
|
||||
package config_test
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/aquasecurity/trivy/internal/config"
|
||||
)
|
||||
|
||||
func TestNewDBConfig(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
args []string
|
||||
want config.DBConfig
|
||||
}{
|
||||
{
|
||||
name: "happy path",
|
||||
args: []string{"--reset", "--skip-update"},
|
||||
want: config.DBConfig{
|
||||
Reset: true,
|
||||
SkipUpdate: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
app := &cli.App{}
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("reset", false, "")
|
||||
set.Bool("skip-update", false, "")
|
||||
|
||||
c := cli.NewContext(app, set, nil)
|
||||
_ = set.Parse(tt.args)
|
||||
|
||||
got := config.NewDBConfig(c)
|
||||
assert.Equal(t, tt.want, got, tt.name)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestDBConfig_Init(t *testing.T) {
|
||||
type fields struct {
|
||||
Reset bool
|
||||
DownloadDBOnly bool
|
||||
SkipUpdate bool
|
||||
Light bool
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
fields fields
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "happy path",
|
||||
fields: fields{
|
||||
Light: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "sad path",
|
||||
fields: fields{
|
||||
DownloadDBOnly: true,
|
||||
SkipUpdate: true,
|
||||
},
|
||||
wantErr: "--skip-update and --download-db-only options can not be specified both",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
c := &config.DBConfig{
|
||||
Reset: tt.fields.Reset,
|
||||
DownloadDBOnly: tt.fields.DownloadDBOnly,
|
||||
SkipUpdate: tt.fields.SkipUpdate,
|
||||
Light: tt.fields.Light,
|
||||
}
|
||||
|
||||
err := c.Init()
|
||||
if tt.wantErr != "" {
|
||||
assert.EqualError(t, err, tt.wantErr, err)
|
||||
} else {
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
40
internal/config/global.go
Normal file
40
internal/config/global.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/aquasecurity/trivy/pkg/log"
|
||||
)
|
||||
|
||||
// GlobalConfig holds the global config for trivy
|
||||
type GlobalConfig struct {
|
||||
Context *cli.Context
|
||||
Logger *zap.SugaredLogger
|
||||
|
||||
AppVersion string
|
||||
Quiet bool
|
||||
Debug bool
|
||||
CacheDir string
|
||||
}
|
||||
|
||||
// NewGlobalConfig is the factory method to return GlobalConfig
|
||||
func NewGlobalConfig(c *cli.Context) (GlobalConfig, error) {
|
||||
quiet := c.Bool("quiet")
|
||||
debug := c.Bool("debug")
|
||||
logger, err := log.NewLogger(debug, quiet)
|
||||
if err != nil {
|
||||
return GlobalConfig{}, xerrors.New("failed to create a logger")
|
||||
}
|
||||
|
||||
return GlobalConfig{
|
||||
Context: c,
|
||||
Logger: logger,
|
||||
|
||||
AppVersion: c.App.Version,
|
||||
Quiet: quiet,
|
||||
Debug: debug,
|
||||
CacheDir: c.String("cache-dir"),
|
||||
}, nil
|
||||
}
|
||||
46
internal/config/global_test.go
Normal file
46
internal/config/global_test.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package config_test
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
||||
"github.com/aquasecurity/trivy/internal/config"
|
||||
)
|
||||
|
||||
func TestNewGlobalConfig(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
args []string
|
||||
want config.GlobalConfig
|
||||
}{
|
||||
{
|
||||
name: "happy path",
|
||||
args: []string{"--quiet", "--debug"},
|
||||
want: config.GlobalConfig{
|
||||
Quiet: true,
|
||||
Debug: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
app := &cli.App{}
|
||||
set := flag.NewFlagSet("test", 0)
|
||||
set.Bool("debug", false, "")
|
||||
set.Bool("quiet", false, "")
|
||||
|
||||
c := cli.NewContext(app, set, nil)
|
||||
_ = set.Parse(tt.args)
|
||||
|
||||
got, err := config.NewGlobalConfig(c)
|
||||
require.NoError(t, err, err)
|
||||
assert.Equal(t, tt.want.Quiet, got.Quiet, tt.name)
|
||||
assert.Equal(t, tt.want.Debug, got.Debug, tt.name)
|
||||
assert.Equal(t, tt.want.CacheDir, got.CacheDir, tt.name)
|
||||
})
|
||||
}
|
||||
}
|
||||
40
internal/config/image.go
Normal file
40
internal/config/image.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
"github.com/urfave/cli/v2"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// ImageConfig holds the config for scanning images
|
||||
type ImageConfig struct {
|
||||
ScanRemovedPkgs bool
|
||||
ListAllPkgs bool
|
||||
}
|
||||
|
||||
// NewImageConfig is the factory method to return imageConfig
|
||||
func NewImageConfig(c *cli.Context) ImageConfig {
|
||||
return ImageConfig{
|
||||
ScanRemovedPkgs: c.Bool("removed-pkgs"),
|
||||
ListAllPkgs: c.Bool("list-all-pkgs"),
|
||||
}
|
||||
}
|
||||
|
||||
// Init initializes the imageConfig
|
||||
func (c *ImageConfig) Init(args cli.Args, logger *zap.SugaredLogger) (err error) {
|
||||
imageName := args.First()
|
||||
|
||||
// Check whether 'latest' tag is used
|
||||
if imageName != "" {
|
||||
ref, err := name.ParseReference(imageName)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("invalid image: %w", err)
|
||||
}
|
||||
if ref.Identifier() == "latest" {
|
||||
logger.Warn("You should avoid using the :latest tag as it is cached. You need to specify '--clear-cache' option when :latest image is changed")
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user