Skip to content

Commit 0556d5d

Browse files
authored
Merge pull request #28 from evgenyz/main
Use latest claircore with fixes for filesystem layer
2 parents a6de959 + 430113a commit 0556d5d

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ to scan the underlying system and generate vulnerabilities report.
4343

4444
The `--root-path` argument defines root directory of the target file system.
4545

46-
> [!CAUTION]
47-
> Currently the tool fails if there is a problem with accessing files (https://github.com/ComplianceAsCode/cvetool/issues/9).
48-
> **At this moment it is not possible to get a report for the local system**.
49-
5046
## Scan a Container Image
5147

5248
Run
@@ -71,9 +67,12 @@ Run
7167
```
7268
$ mkdir -p ./rhel10-vm
7369
$ guestmount -a ~/.local/share/gnome-boxes/images/rhel10.0 -i --ro ./rhel10-vm
70+
```
71+
to mount the file system, and then
72+
```
7473
$ ./cvetool scan --root-path=./rhel10-vm --db-path=./matcher.db
7574
```
76-
to mount the file system, scan and generate vulnerabilities report.
75+
to scan and generate vulnerabilities report.
7776

7877
# Report Formats
7978

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/hashicorp/go-version v1.7.0
1111
github.com/jackc/pgx/v5 v5.7.6
1212
github.com/klauspost/compress v1.18.1
13-
github.com/quay/claircore v1.5.45
13+
github.com/quay/claircore v1.5.46-0.20251103030235-52da6d5c69b1
1414
github.com/quay/zlog v1.1.9
1515
github.com/remind101/migrate v0.0.0-20170729031349-52c1edff7319
1616
github.com/rs/zerolog v1.34.0
@@ -50,7 +50,7 @@ require (
5050
github.com/prometheus/client_model v0.6.2 // indirect
5151
github.com/prometheus/common v0.66.1 // indirect
5252
github.com/prometheus/procfs v0.16.1 // indirect
53-
github.com/quay/claircore/toolkit v1.2.4 // indirect
53+
github.com/quay/claircore/toolkit v1.3.0 // indirect
5454
github.com/quay/claircore/updater/driver v1.0.0 // indirect
5555
github.com/quay/goval-parser v0.8.8 // indirect
5656
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9Z
118118
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
119119
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
120120
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
121-
github.com/quay/claircore v1.5.45 h1:I1tzV+wQo6RJeL3TqR06KFjdvlWzkarxlYXUdACGRnM=
122-
github.com/quay/claircore v1.5.45/go.mod h1:yrM+K0mQ//wzZi0Bq9cIku0rQz/fV/sCjXbY8IkC4Y8=
121+
github.com/quay/claircore v1.5.46-0.20251103030235-52da6d5c69b1 h1:k/EWPPCvN6sjqPHB0v6hgD9TIBcLFuoFk+KlemdW6JQ=
122+
github.com/quay/claircore v1.5.46-0.20251103030235-52da6d5c69b1/go.mod h1:esClvBUiOAZdaG1kfAywh/mKNgcw4W0otauoLLgoiRw=
123123
github.com/quay/claircore/toolkit v1.0.0/go.mod h1:3ELtgf92x7o1JCTSKVOAqhcnCTXc4s5qiGaEDx62i20=
124-
github.com/quay/claircore/toolkit v1.2.4 h1:Ld7rve32pUOrfR+7jJA9nGHeZ8nPejpEgNWkJ7OPJZM=
125-
github.com/quay/claircore/toolkit v1.2.4/go.mod h1:m6ZRpxJClVAraNpIYyCsW/ULF/33ye7KkGTyNTMwvDY=
124+
github.com/quay/claircore/toolkit v1.3.0 h1:QncygaArnuSKbkPESD2zMDz5xJLWlJxAGPZ69XCYA5o=
125+
github.com/quay/claircore/toolkit v1.3.0/go.mod h1:REVn3WdU+9yMurWa+h9mfuiPWYzKqSaKIGWZ4Xanj5g=
126126
github.com/quay/claircore/updater/driver v1.0.0 h1:w7dAUjO3GBK6RjNyTZ2Kwz0l/Wuic3ykKJWPB80uA94=
127127
github.com/quay/claircore/updater/driver v1.0.0/go.mod h1:My5aY1wBpgxcWaHQZ0VoPmmj/EzuH7fq4ntzJbos4OI=
128128
github.com/quay/goval-parser v0.8.8 h1:Uf+f9iF2GIR5GPUY2pGoa9il2+4cdES44ZlM0mWm4cA=

image/filesystem.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (i *fileSystemImage) getLayers(ctx context.Context) ([]*claircore.Layer, er
2525

2626
desc := &claircore.LayerDescription{
2727
Digest: fmt.Sprintf("sha256:%s", strings.Repeat("1", 64)),
28-
URI: i.rootDir,
28+
URI: "file://" + i.rootDir,
2929
MediaType: "application/vnd.claircore.filesystem",
3030
}
3131

0 commit comments

Comments
 (0)