Skip to content

Commit 094db23

Browse files
committed
refactor: Fix fanal import paths and remove dotfiles
1 parent b6f615b commit 094db23

File tree

233 files changed

+614
-3614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+614
-3614
lines changed

.github/workflows/test.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
wget https://github.com/tinygo-org/tinygo/releases/download/v${TINYGO_VERSION}/tinygo_${TINYGO_VERSION}_amd64.deb
4444
sudo dpkg -i tinygo_${TINYGO_VERSION}_amd64.deb
4545
46+
- name: Install dependencies
47+
run: sudo apt-get update && sudo apt-get install libdb-dev
48+
4649
- name: Run unit tests
4750
run: make test
4851

@@ -59,6 +62,9 @@ jobs:
5962
- name: Check out code into the Go module directory
6063
uses: actions/checkout@v3
6164

65+
- name: Install dependencies
66+
run: sudo apt-get update && sudo apt-get install libdb-dev
67+
6268
- name: Run integration tests
6369
run: make test-integration
6470

examples/misconf/go-testing/main_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"github.com/stretchr/testify/assert"
88
"github.com/stretchr/testify/require"
99

10-
"github.com/aquasecurity/fanal/external"
11-
"github.com/aquasecurity/fanal/types"
10+
"github.com/aquasecurity/trivy/pkg/fanal/external"
11+
"github.com/aquasecurity/trivy/pkg/fanal/types"
1212
)
1313

1414
func TestPolicy(t *testing.T) {

go.mod

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ require (
66
github.com/CycloneDX/cyclonedx-go v0.6.0
77
github.com/Masterminds/sprig/v3 v3.2.2
88
github.com/NYTimes/gziphandler v1.1.1
9+
github.com/alicebob/miniredis/v2 v2.21.0
910
github.com/aquasecurity/bolt-fixtures v0.0.0-20200903104109-d34e7f983986
10-
github.com/aquasecurity/fanal v0.0.0-20220615115521-e411bc995c6d
1111
github.com/aquasecurity/go-dep-parser v0.0.0-20220607141748-ab2deea55bdf
1212
github.com/aquasecurity/go-gem-version v0.0.0-20201115065557-8eed6fe000ce
1313
github.com/aquasecurity/go-npm-version v0.0.0-20201110091526-0b796d180798
1414
github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46
1515
github.com/aquasecurity/go-version v0.0.0-20210121072130-637058cfe492
1616
github.com/aquasecurity/table v1.5.1
17+
github.com/aquasecurity/testdocker v0.0.0-20210911155206-e1e85f5a1516
1718
github.com/aquasecurity/trivy-db v0.0.0-20220602091213-39d8a6798e07
1819
github.com/aquasecurity/trivy-kubernetes v0.3.1-0.20220613131930-79b2cb425b18
1920
github.com/caarlos0/env/v6 v6.9.3
@@ -23,6 +24,7 @@ require (
2324
github.com/docker/go-connections v0.4.0
2425
github.com/fatih/color v1.13.0
2526
github.com/go-redis/redis/v8 v8.11.5
27+
github.com/golang-jwt/jwt v3.2.2+incompatible
2628
github.com/golang/protobuf v1.5.2
2729
github.com/google/go-containerregistry v0.7.1-0.20211214010025-a65b7844a475
2830
github.com/google/uuid v1.3.0
@@ -31,13 +33,15 @@ require (
3133
github.com/knqyf263/go-apk-version v0.0.0-20200609155635-041fdbb8563f
3234
github.com/knqyf263/go-deb-version v0.0.0-20190517075300-09fca494f03d
3335
github.com/knqyf263/go-rpm-version v0.0.0-20170716094938-74609b86c936
36+
github.com/kylelemons/godebug v1.1.0
3437
github.com/mailru/easyjson v0.7.6
3538
github.com/masahiro331/go-mvn-version v0.0.0-20210429150710-d3157d602a08
3639
github.com/mitchellh/hashstructure/v2 v2.0.2
3740
github.com/open-policy-agent/opa v0.41.0
3841
github.com/owenrumney/go-sarif/v2 v2.1.1
3942
github.com/package-url/packageurl-go v0.1.1-0.20220203205134-d70459300c8a
4043
github.com/samber/lo v1.21.0
44+
github.com/sosedoff/gitkit v0.3.0
4145
github.com/stretchr/testify v1.7.2
4246
github.com/testcontainers/testcontainers-go v0.13.0
4347
github.com/tetratelabs/wazero v0.0.0-20220606011721-119b069ba23e
@@ -52,21 +56,27 @@ require (
5256
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
5357
)
5458

59+
require (
60+
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
61+
github.com/gofrs/uuid v4.0.0+incompatible // indirect
62+
github.com/yuin/gopher-lua v0.0.0-20210529063254-f4c35e4016d9 // indirect
63+
)
64+
5565
require (
5666
cloud.google.com/go v0.99.0 // indirect
5767
cloud.google.com/go/storage v1.14.0 // indirect
58-
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect
68+
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible
5969
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
6070
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
61-
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
62-
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
63-
github.com/Azure/go-autorest/autorest/azure/auth v0.5.11 // indirect
71+
github.com/Azure/go-autorest/autorest v0.11.27
72+
github.com/Azure/go-autorest/autorest/adal v0.9.20
73+
github.com/Azure/go-autorest/autorest/azure/auth v0.5.11
6474
github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 // indirect
6575
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
6676
github.com/Azure/go-autorest/logger v0.2.1 // indirect
6777
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
6878
github.com/BurntSushi/toml v1.1.0 // indirect
69-
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible // indirect
79+
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible
7080
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
7181
github.com/Masterminds/goutils v1.1.1 // indirect
7282
github.com/Masterminds/semver v1.5.0 // indirect
@@ -85,9 +95,9 @@ require (
8595
github.com/alecthomas/chroma v0.10.0 // indirect
8696
github.com/apparentlymart/go-cidr v1.1.0 // indirect
8797
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
88-
github.com/aquasecurity/defsec v0.68.1 // indirect
98+
github.com/aquasecurity/defsec v0.68.1
8999
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
90-
github.com/aws/aws-sdk-go v1.44.25 // indirect
100+
github.com/aws/aws-sdk-go v1.44.25
91101
github.com/beorn7/perks v1.0.1 // indirect
92102
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
93103
github.com/blang/semver v3.5.1+incompatible // indirect
@@ -99,12 +109,12 @@ require (
99109
github.com/container-orchestrated-devices/container-device-interface v0.3.1 // indirect
100110
github.com/containerd/cgroups v1.0.3 // indirect
101111
github.com/containerd/console v1.0.3 // indirect
102-
github.com/containerd/containerd v1.6.4 // indirect
112+
github.com/containerd/containerd v1.6.4
103113
github.com/containerd/continuity v0.3.0 // indirect
104114
github.com/containerd/fifo v1.0.0 // indirect
105115
github.com/containerd/go-cni v1.1.6 // indirect
106116
github.com/containerd/imgcrypt v1.1.5-0.20220421044638-8ba028dca028 // indirect
107-
github.com/containerd/nerdctl v0.20.0 // indirect
117+
github.com/containerd/nerdctl v0.20.0
108118
github.com/containerd/stargz-snapshotter v0.11.4 // indirect
109119
github.com/containerd/stargz-snapshotter/estargz v0.11.4 // indirect
110120
github.com/containerd/ttrpc v1.1.1-0.20220420014843-944ef4a40df3 // indirect
@@ -131,7 +141,7 @@ require (
131141
github.com/go-errors/errors v1.0.1 // indirect
132142
github.com/go-git/gcfg v1.5.0 // indirect
133143
github.com/go-git/go-billy/v5 v5.3.1 // indirect
134-
github.com/go-git/go-git/v5 v5.4.2 // indirect
144+
github.com/go-git/go-git/v5 v5.4.2
135145
github.com/go-gorp/gorp/v3 v3.0.2 // indirect
136146
github.com/go-logr/logr v1.2.3 // indirect
137147
github.com/go-openapi/jsonpointer v0.19.5 // indirect
@@ -172,8 +182,8 @@ require (
172182
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
173183
github.com/klauspost/compress v1.15.1 // indirect
174184
github.com/klauspost/cpuid/v2 v2.0.6 // indirect
175-
github.com/knqyf263/go-rpmdb v0.0.0-20220607073645-842f01763e21 // indirect
176-
github.com/knqyf263/nested v0.0.1 // indirect
185+
github.com/knqyf263/go-rpmdb v0.0.0-20220607073645-842f01763e21
186+
github.com/knqyf263/nested v0.0.1
177187
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
178188
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
179189
github.com/liamg/iamgo v0.0.6 // indirect
@@ -195,7 +205,7 @@ require (
195205
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
196206
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
197207
github.com/mitchellh/reflectwalk v1.0.2 // indirect
198-
github.com/moby/buildkit v0.10.3 // indirect
208+
github.com/moby/buildkit v0.10.3
199209
github.com/moby/locker v1.0.1 // indirect
200210
github.com/moby/spdystream v0.2.0 // indirect
201211
github.com/moby/sys/mount v0.3.2 // indirect
@@ -214,8 +224,8 @@ require (
214224
github.com/multiformats/go-varint v0.0.6 // indirect
215225
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
216226
github.com/olekukonko/tablewriter v0.0.5 // indirect
217-
github.com/opencontainers/go-digest v1.0.0 // indirect
218-
github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1 // indirect
227+
github.com/opencontainers/go-digest v1.0.0
228+
github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1
219229
github.com/opencontainers/runc v1.1.2 // indirect
220230
github.com/opencontainers/runtime-spec v1.0.3-0.20220311020903-6969a0a09ab1 // indirect
221231
github.com/opencontainers/runtime-tools v0.0.0-20190417131837-cd1349b7c47e // indirect
@@ -235,7 +245,7 @@ require (
235245
github.com/rubenv/sql-migrate v1.1.1 // indirect
236246
github.com/russross/blackfriday v1.6.0 // indirect
237247
github.com/russross/blackfriday/v2 v2.1.0 // indirect
238-
github.com/saracen/walker v0.0.0-20191201085201-324a081bae7e // indirect
248+
github.com/saracen/walker v0.0.0-20191201085201-324a081bae7e
239249
github.com/sergi/go-diff v1.1.0 // indirect
240250
github.com/shopspring/decimal v1.2.0 // indirect
241251
github.com/sirupsen/logrus v1.8.1 // indirect
@@ -261,17 +271,17 @@ require (
261271
github.com/yashtewari/glob-intersection v0.1.0 // indirect
262272
github.com/zclconf/go-cty v1.10.0 // indirect
263273
github.com/zclconf/go-cty-yaml v1.0.2 // indirect
264-
go.etcd.io/bbolt v1.3.6 // indirect
274+
go.etcd.io/bbolt v1.3.6
265275
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 // indirect
266276
go.opencensus.io v0.23.0 // indirect
267277
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
268278
go.uber.org/atomic v1.7.0 // indirect
269279
go.uber.org/multierr v1.7.0 // indirect
270280
golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9
271-
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
281+
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
272282
golang.org/x/net v0.0.0-20220516133312-45b265872317 // indirect
273283
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
274-
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect
284+
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
275285
golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e // indirect
276286
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
277287
golang.org/x/text v0.3.7 // indirect

0 commit comments

Comments
 (0)