Skip to content

Commit f3e4f55

Browse files
committed
fix(Dockerfile): move to ubi-micro [OSD-8579]
the previous solution was ok, but the current one is more compatible with the security team - bump golang to latest (1.17) - fix secuirty vuln found with 'trivy image scan' - use ubi-micro to allow code-scanning using 'clair' - did a 'go mod vendor && go mod tidy' - gofmt a file using 'gofmt -w <filename>' related to #14
1 parent cbe9f67 commit f3e4f55

File tree

462 files changed

+54216
-25370
lines changed

Some content is hidden

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

462 files changed

+54216
-25370
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: golang:1.14.1
5+
- image: golang:1.17.6
66
steps:
77
- checkout
88
- run: |
@@ -11,7 +11,7 @@ jobs:
1111
1212
lint:
1313
docker:
14-
- image: golang:1.14.1
14+
- image: golang:1.17.6
1515
steps:
1616
- checkout
1717
- run: |
@@ -20,7 +20,7 @@ jobs:
2020
2121
test:
2222
docker:
23-
- image: golang:1.14.1
23+
- image: golang:1.17.6
2424
steps:
2525
- checkout
2626
- run: |

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.14.1-alpine3.11 as builder
1+
FROM golang:1.17.6-alpine3.15 as builder
22

33
RUN apk add --update --no-cache ca-certificates tzdata git make bash && update-ca-certificates
44

@@ -7,7 +7,7 @@ WORKDIR /opt
77

88
RUN git update-index --refresh; make token-refresher
99

10-
FROM scratch as runner
10+
FROM redhat/ubi8-micro:8.5-596 as runner
1111

1212
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
1313
COPY --from=builder /opt/token-refresher /bin/token-refresher

go.mod

Lines changed: 109 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,139 @@
11
module github.com/observatorium/token-refresher
22

3-
go 1.14
3+
go 1.17
44

55
require (
66
github.com/campoy/embedmd v1.0.0
7-
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 // indirect
87
github.com/coreos/go-oidc v2.2.1+incompatible
8+
github.com/go-kit/kit v0.10.0
9+
github.com/metalmatze/signal v0.0.0-20201002154727-d0c16e42a3cf
10+
github.com/observatorium/observatorium v0.1.2-0.20201001162514-585e9d38dea7
11+
github.com/observatorium/up v0.0.0-20200603110215-8a20b4e48ac0
12+
github.com/oklog/run v1.1.0
13+
github.com/prometheus/client_golang v1.5.1
14+
github.com/spf13/pflag v1.0.5
15+
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
16+
)
17+
18+
require (
19+
cloud.google.com/go v0.46.3 // indirect
20+
github.com/BurntSushi/toml v0.3.1 // indirect
21+
github.com/OneOfOne/xxhash v1.2.7 // indirect
22+
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
23+
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
24+
github.com/beevik/etree v1.1.0 // indirect
25+
github.com/beorn7/perks v1.0.1 // indirect
26+
github.com/brancz/gojsontoyaml v0.0.0-20191212081931-bf2969bbd742 // indirect
27+
github.com/brancz/kube-rbac-proxy v0.5.0 // indirect
28+
github.com/cespare/xxhash v1.1.0 // indirect
29+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
30+
github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41 // indirect
31+
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
32+
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
33+
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
34+
github.com/dexidp/dex v0.0.0-20200512115545-709d4169d646 // indirect
35+
github.com/fatih/color v1.9.0 // indirect
36+
github.com/felixge/httpsnoop v1.0.1 // indirect
937
github.com/fsnotify/fsnotify v1.4.9 // indirect
38+
github.com/ghodss/yaml v1.0.0 // indirect
1039
github.com/go-chi/chi v4.0.4+incompatible // indirect
11-
github.com/go-kit/kit v0.10.0
40+
github.com/go-logfmt/logfmt v0.5.0 // indirect
41+
github.com/go-pluto/styx v0.0.0-20200109161911-78a77eb717b4 // indirect
42+
github.com/go-sql-driver/mysql v1.5.0 // indirect
43+
github.com/gobwas/glob v0.2.3 // indirect
44+
github.com/gogo/protobuf v1.3.1 // indirect
45+
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
46+
github.com/golang/protobuf v1.4.0 // indirect
47+
github.com/golang/snappy v0.0.1 // indirect
48+
github.com/google/go-jsonnet v0.15.1-0.20200310221949-724650d358b6 // indirect
49+
github.com/google/uuid v1.1.1 // indirect
50+
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
51+
github.com/gorilla/handlers v1.4.2 // indirect
52+
github.com/gorilla/mux v1.7.3 // indirect
53+
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
54+
github.com/grpc-ecosystem/grpc-gateway v1.14.3 // indirect
55+
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69 // indirect
56+
github.com/hashicorp/errwrap v1.0.0 // indirect
57+
github.com/hashicorp/go-multierror v1.0.0 // indirect
58+
github.com/hashicorp/hcl v1.0.0 // indirect
59+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
60+
github.com/instrumenta/kubeval v0.0.0-20200515185822-7721cbec724c // indirect
61+
github.com/jonboulle/clockwork v0.1.0 // indirect
62+
github.com/json-iterator/go v1.1.9 // indirect
63+
github.com/jsonnet-bundler/jsonnet-bundler v0.3.1 // indirect
64+
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
1265
github.com/kr/text v0.2.0 // indirect
66+
github.com/lib/pq v1.3.0 // indirect
67+
github.com/magiconair/properties v1.8.1 // indirect
1368
github.com/mattn/go-colorable v0.1.6 // indirect
69+
github.com/mattn/go-isatty v0.0.12 // indirect
1470
github.com/mattn/go-runewidth v0.0.4 // indirect
1571
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
16-
github.com/metalmatze/signal v0.0.0-20201002154727-d0c16e42a3cf
72+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
1773
github.com/mitchellh/mapstructure v1.3.2 // indirect
18-
github.com/observatorium/observatorium v0.1.2-0.20201001162514-585e9d38dea7
19-
github.com/observatorium/up v0.0.0-20200603110215-8a20b4e48ac0
20-
github.com/oklog/run v1.1.0
74+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
75+
github.com/modern-go/reflect2 v1.0.1 // indirect
76+
github.com/olekukonko/tablewriter v0.0.1 // indirect
2177
github.com/onsi/gomega v1.7.1 // indirect
78+
github.com/open-policy-agent/opa v0.23.2 // indirect
2279
github.com/opencontainers/runc v1.0.0-rc9 // indirect
2380
github.com/pelletier/go-toml v1.8.0 // indirect
24-
github.com/prometheus/client_golang v1.5.1
81+
github.com/peterh/liner v0.0.0-20170211195444-bf27d3ba8e1d // indirect
82+
github.com/pkg/errors v0.9.1 // indirect
83+
github.com/pmezard/go-difflib v1.0.0 // indirect
84+
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
85+
github.com/prometheus/client_model v0.2.0 // indirect
86+
github.com/prometheus/common v0.9.1 // indirect
87+
github.com/prometheus/procfs v0.0.11 // indirect
88+
github.com/prometheus/prometheus v1.8.2-0.20200305080338-7164b58945bb // indirect
89+
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
90+
github.com/russellhaering/goxmldsig v0.0.0-20180430223755-7acd5e4a6ef7 // indirect
91+
github.com/russross/blackfriday/v2 v2.0.1 // indirect
2592
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
93+
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
2694
github.com/sirupsen/logrus v1.6.0 // indirect
95+
github.com/spf13/afero v1.2.2 // indirect
2796
github.com/spf13/cast v1.3.1 // indirect
2897
github.com/spf13/cobra v1.0.0 // indirect
2998
github.com/spf13/jwalterweatherman v1.1.0 // indirect
30-
github.com/spf13/pflag v1.0.5
3199
github.com/spf13/viper v1.7.0 // indirect
100+
github.com/subosito/gotenv v1.2.0 // indirect
101+
github.com/urfave/cli v1.22.2 // indirect
102+
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
103+
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
104+
github.com/xeipuuv/gojsonschema v0.0.0-20180816142147-da425ebb7609 // indirect
105+
github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b // indirect
106+
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 // indirect
107+
go.opencensus.io v0.22.2 // indirect
32108
go.uber.org/atomic v1.5.1 // indirect
33-
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect
109+
go.uber.org/automaxprocs v1.2.0 // indirect
110+
go.uber.org/multierr v1.3.0 // indirect
111+
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee // indirect
112+
go.uber.org/zap v1.13.0 // indirect
113+
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
34114
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
35-
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
115+
golang.org/x/mod v0.2.0 // indirect
116+
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
36117
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect
37-
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 // indirect
118+
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
119+
golang.org/x/text v0.3.6 // indirect
38120
golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 // indirect
121+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
122+
google.golang.org/api v0.17.0 // indirect
39123
google.golang.org/appengine v1.6.5 // indirect
124+
google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36 // indirect
125+
google.golang.org/grpc v1.27.1 // indirect
126+
google.golang.org/protobuf v1.21.0 // indirect
127+
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
128+
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
129+
gopkg.in/fsnotify.v1 v1.4.7 // indirect
40130
gopkg.in/ini.v1 v1.57.0 // indirect
131+
gopkg.in/ldap.v2 v2.5.1 // indirect
41132
gopkg.in/square/go-jose.v2 v2.5.0 // indirect
133+
gopkg.in/yaml.v2 v2.3.0 // indirect
134+
honnef.co/go/tools v0.0.1-2019.2.3 // indirect
135+
k8s.io/apimachinery v0.18.0 // indirect
136+
k8s.io/component-base v0.18.0 // indirect
137+
k8s.io/klog v1.0.0 // indirect
138+
sigs.k8s.io/yaml v1.2.0 // indirect
42139
)

0 commit comments

Comments
 (0)