Skip to content

Commit f13a74c

Browse files
committed
Docker Scout pass (#178)
* Scout pass * Trigger integrations tests with workflow dispatch * Bump alpine 3.19.1 * Scout pass * Set minimum curl version * Fx packages * Upgrade Cosmos SDK * Add GH Action for Docker Scout
1 parent 40b76f6 commit f13a74c

7 files changed

Lines changed: 316 additions & 248 deletions

File tree

.github/workflows/docker-scout.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: Docker Scout
3+
4+
on:
5+
push:
6+
branches:
7+
- '*'
8+
tags:
9+
- '*'
10+
workflow_dispatch:
11+
12+
jobs:
13+
14+
build:
15+
name: Docker Scout
16+
runs-on: ubuntu-latest
17+
environment: CI
18+
19+
steps:
20+
- name: Check out code
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
fetch-tags: true
25+
26+
- name: Login to Docker Hub
27+
uses: docker/login-action@v3
28+
with:
29+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
30+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
31+
32+
- name: Set up Docker buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Extract metadata for docker
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: burnt/xion
40+
tags: |
41+
type=semver,pattern={{version}},priority=1000
42+
type=sha,priority=700
43+
44+
- name: Build Docker image
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: .
48+
push: false
49+
load: true
50+
tags: ${{ steps.meta.outputs.tags }}
51+
cache-from: type=gha
52+
cache-to: type=gha,mode=max
53+
target: xion-release
54+
55+
- name: Run Docker Scout
56+
uses: docker/scout-action@v1
57+
with:
58+
command: cves
59+
only-fixed: true
60+
image: ${{ steps.meta.outputs.tags }}

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99

1010
pull_request:
1111

12+
workflow_dispatch:
13+
1214
env:
1315
CARGO_TERM_COLOR: always
1416
REGISTRY: ghcr.io

Dockerfile

Lines changed: 27 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
# docker build . -t cosmwasm/xiond:latest
2-
# docker run --rm -it cosmwasm/xiond:latest /bin/sh
31
FROM golang:1.21-alpine3.19 AS go-builder
42
ARG arch=x86_64
53

64
ENV WASMVM_VERSION=v1.5.2
75
ENV WASMVM_CHECKSUM_AARCH64=e78b224c15964817a3b75a40e59882b4d0e06fd055b39514d61646689cef8c6e
86
ENV WASMVM_CHECKSUM_x86_64=e660a38efb2930b34ee6f6b0bb12730adccb040b6ab701b8f82f34453a426ae7
97

10-
# this comes from standard alpine nightly file
11-
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
12-
# with some changes to support our toolchain, etc
13-
RUN set -eux; apk add --no-cache ca-certificates build-base;
8+
RUN set -euxo pipefail \
9+
&& apk add --no-cache \
10+
ca-certificates \
11+
build-base \
12+
git
1413

15-
RUN apk add git
1614
# NOTE: add these to run with LEDGER_ENABLED=true
1715
# RUN apk add libusb-dev linux-headers
1816

@@ -48,88 +46,53 @@ RUN echo "Ensuring binary is statically linked ..." \
4846
&& (file /code/build/xiond | grep "statically linked")
4947

5048
# --------------------------------------------------------
51-
FROM alpine:3.19 AS xion-dev
49+
FROM alpine:3.19.1 AS xion-base
5250
COPY --from=go-builder /code/build/xiond /usr/bin/xiond
5351

54-
# rest server
52+
# api
5553
EXPOSE 1317
56-
# tendermint grpc
54+
# grpc
5755
EXPOSE 9090
58-
# tendermint p2p
56+
# p2p
5957
EXPOSE 26656
60-
# tendermint rpc
58+
# rpc
6159
EXPOSE 26657
62-
# tendermint prometheus
60+
# prometheus
6361
EXPOSE 26660
6462

6563
RUN mkdir /xion
6664

6765
RUN set -euxo pipefail \
66+
&& echo http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
6867
&& apk add --no-cache \
69-
bash \
70-
curl \
71-
htop \
72-
jq \
73-
lz4 \
74-
tini
68+
bash \
69+
curl>8.6.0-r0 \
70+
htop \
71+
jq \
72+
lz4 \
73+
tini
7574

76-
RUN set -euxo pipefail \
77-
&& addgroup -S xiond \
78-
&& adduser \
79-
--disabled-password \
80-
--gecos xiond \
81-
--ingroup xiond \
82-
xiond
83-
84-
RUN set -eux \
85-
&& chown -R xiond:xiond /home/xiond \
86-
&& chown -R xiond:xiond /xion
87-
88-
USER xiond:xiond
75+
# --------------------------------------------------------
76+
FROM xion-base AS xion-dev
8977

9078
COPY ./docker/entrypoint.sh /home/xiond/entrypoint.sh
91-
9279
CMD ["/home/xiond/entrypoint.sh"]
9380

9481
# --------------------------------------------------------
95-
FROM alpine:3.19 AS xion-release
96-
97-
COPY --from=go-builder /code/build/xiond /usr/bin/xiond
98-
99-
# rest server
100-
EXPOSE 1317
101-
# tendermint grpc
102-
EXPOSE 9090
103-
# tendermint p2p
104-
EXPOSE 26656
105-
# tendermint rpc
106-
EXPOSE 26657
107-
# tendermint prometheus
108-
EXPOSE 26660
109-
110-
RUN set -euxo pipefail \
111-
&& apk add --no-cache \
112-
aria2 \
113-
aws-cli \
114-
bash \
115-
curl \
116-
htop \
117-
jq \
118-
lz4 \
119-
tini
82+
FROM xion-base as xion-release
12083

12184
RUN set -euxo pipefail \
12285
&& addgroup -S xiond \
12386
&& adduser \
124-
--disabled-password \
125-
--gecos xiond \
126-
--ingroup xiond \
127-
xiond
87+
--disabled-password \
88+
--gecos xiond \
89+
--ingroup xiond \
90+
xiond
12891

12992
RUN set -eux \
130-
&& chown -R xiond:xiond /home/xiond
93+
&& chown -R xiond:xiond /home/xiond \
94+
&& chown -R xiond:xiond /xion
13195

13296
USER xiond:xiond
133-
WORKDIR /home/xiond/.xiond
13497

13598
CMD ["/usr/bin/xiond", "version"]

go.mod

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ go 1.21
44

55
require (
66
github.com/CosmWasm/wasmvm v1.5.2
7-
github.com/cosmos/cosmos-proto v1.0.0-beta.3
8-
github.com/cosmos/cosmos-sdk v0.47.6
7+
github.com/cosmos/cosmos-proto v1.0.0-beta.4
8+
github.com/cosmos/cosmos-sdk v0.47.10
99
github.com/cosmos/gogogateway v1.2.0 // indirect
1010
github.com/cosmos/gogoproto v1.4.10
1111
github.com/cosmos/iavl v0.20.1 // indirect
1212
github.com/cosmos/ibc-go/v7 v7.3.1
1313
github.com/cosmos/ics23/go v0.10.0 // indirect
1414
github.com/docker/distribution v2.8.2+incompatible // indirect
15-
github.com/dvsekhvalnov/jose2go v1.5.0
15+
github.com/dvsekhvalnov/jose2go v1.6.0
1616
github.com/golang/protobuf v1.5.3
1717
github.com/google/gofuzz v1.2.0 // indirect
1818
github.com/gorilla/mux v1.8.0
@@ -24,19 +24,19 @@ require (
2424
github.com/spf13/cast v1.5.1
2525
github.com/spf13/cobra v1.8.0
2626
github.com/spf13/pflag v1.0.5 // indirect
27-
github.com/stretchr/testify v1.8.4
27+
github.com/stretchr/testify v1.9.0
2828
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d
29-
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect
30-
google.golang.org/grpc v1.59.0
29+
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect
30+
google.golang.org/grpc v1.60.1
3131
gopkg.in/yaml.v2 v2.4.0
3232
)
3333

3434
require (
3535
cosmossdk.io/api v0.3.1
3636
cosmossdk.io/core v0.6.1
3737
cosmossdk.io/depinject v1.0.0-alpha.4
38-
cosmossdk.io/errors v1.0.0
39-
cosmossdk.io/math v1.2.0
38+
cosmossdk.io/errors v1.0.1
39+
cosmossdk.io/math v1.3.0
4040
cosmossdk.io/tools/rosetta v0.2.1
4141
github.com/CosmWasm/wasmd v0.45.0
4242
github.com/armon/go-metrics v0.4.1
@@ -47,26 +47,31 @@ require (
4747
github.com/go-webauthn/webauthn v0.9.1
4848
github.com/golang/mock v1.6.0
4949
github.com/larry0x/abstract-account v0.0.0-20240202022305-255071ed91ee
50-
github.com/lestrrat-go/jwx/v2 v2.0.19
50+
github.com/lestrrat-go/jwx/v2 v2.0.21
5151
github.com/osmosis-labs/fee-abstraction/v7 v7.0.0-20240302094915-ba36778366d0
5252
github.com/spf13/viper v1.16.0
53-
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97
54-
gotest.tools/v3 v3.5.0
55-
sigs.k8s.io/yaml v1.3.0
53+
google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0
54+
gotest.tools/v3 v3.5.1
55+
sigs.k8s.io/yaml v1.4.0
5656
)
5757

5858
require (
59+
github.com/go-logr/logr v1.2.4 // indirect
60+
github.com/go-logr/stdr v1.2.2 // indirect
5961
github.com/goccy/go-json v0.10.2 // indirect
6062
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
63+
go.opentelemetry.io/otel v1.19.0 // indirect
64+
go.opentelemetry.io/otel/metric v1.19.0 // indirect
65+
go.opentelemetry.io/otel/trace v1.19.0 // indirect
6166
)
6267

6368
require (
64-
cloud.google.com/go v0.110.8 // indirect
65-
cloud.google.com/go/compute v1.23.0 // indirect
69+
cloud.google.com/go v0.111.0 // indirect
70+
cloud.google.com/go/compute v1.23.3 // indirect
6671
cloud.google.com/go/compute/metadata v0.2.3 // indirect
67-
cloud.google.com/go/iam v1.1.2 // indirect
72+
cloud.google.com/go/iam v1.1.5 // indirect
6873
cloud.google.com/go/storage v1.30.1 // indirect
69-
cosmossdk.io/log v1.2.1 // indirect
74+
cosmossdk.io/log v1.3.1 // indirect
7075
filippo.io/edwards25519 v1.0.0 // indirect
7176
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
7277
github.com/99designs/keyring v1.2.2 // indirect
@@ -118,9 +123,9 @@ require (
118123
github.com/google/go-cmp v0.6.0 // indirect
119124
github.com/google/go-tpm v0.9.0 // indirect
120125
github.com/google/orderedcode v0.0.1 // indirect
121-
github.com/google/s2a-go v0.1.4 // indirect
126+
github.com/google/s2a-go v0.1.7 // indirect
122127
github.com/google/uuid v1.4.0 // indirect
123-
github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect
128+
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
124129
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
125130
github.com/gorilla/handlers v1.5.1 // indirect
126131
github.com/gorilla/websocket v1.5.0 // indirect
@@ -147,7 +152,7 @@ require (
147152
github.com/kr/text v0.2.0 // indirect
148153
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
149154
github.com/lestrrat-go/httpcc v1.0.1 // indirect
150-
github.com/lestrrat-go/httprc v1.0.4 // indirect
155+
github.com/lestrrat-go/httprc v1.0.5 // indirect
151156
github.com/lestrrat-go/iter v1.0.2 // indirect
152157
github.com/lestrrat-go/jwx v1.2.28
153158
github.com/lestrrat-go/option v1.0.1 // indirect
@@ -157,7 +162,7 @@ require (
157162
github.com/magiconair/properties v1.8.7 // indirect
158163
github.com/manifoldco/promptui v0.9.0 // indirect
159164
github.com/mattn/go-colorable v0.1.13 // indirect
160-
github.com/mattn/go-isatty v0.0.19 // indirect
165+
github.com/mattn/go-isatty v0.0.20 // indirect
161166
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
162167
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
163168
github.com/minio/highwayhash v1.0.2 // indirect
@@ -175,7 +180,7 @@ require (
175180
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
176181
github.com/rogpeppe/go-internal v1.11.0 // indirect
177182
github.com/rs/cors v1.8.3 // indirect
178-
github.com/rs/zerolog v1.30.0 // indirect
183+
github.com/rs/zerolog v1.32.0 // indirect
179184
github.com/sasha-s/go-deadlock v0.3.1 // indirect
180185
github.com/segmentio/asm v1.2.0 // indirect
181186
github.com/spf13/afero v1.9.5 // indirect
@@ -189,19 +194,18 @@ require (
189194
github.com/zondax/ledger-go v0.14.3 // indirect
190195
go.etcd.io/bbolt v1.3.8 // indirect
191196
go.opencensus.io v0.24.0 // indirect
192-
golang.org/x/crypto v0.17.0 // indirect
197+
golang.org/x/crypto v0.21.0 // indirect
193198
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
194-
golang.org/x/net v0.18.0 // indirect
195-
golang.org/x/oauth2 v0.11.0 // indirect
196-
golang.org/x/sync v0.3.0 // indirect
197-
golang.org/x/sys v0.15.0 // indirect
198-
golang.org/x/term v0.15.0 // indirect
199+
golang.org/x/net v0.21.0 // indirect
200+
golang.org/x/oauth2 v0.13.0 // indirect
201+
golang.org/x/sync v0.4.0 // indirect
202+
golang.org/x/sys v0.18.0 // indirect
203+
golang.org/x/term v0.18.0 // indirect
199204
golang.org/x/text v0.14.0 // indirect
200-
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
201-
google.golang.org/api v0.128.0 // indirect
202-
google.golang.org/appengine v1.6.7 // indirect
203-
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
204-
google.golang.org/protobuf v1.31.0 // indirect
205+
google.golang.org/api v0.149.0 // indirect
206+
google.golang.org/appengine v1.6.8 // indirect
207+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
208+
google.golang.org/protobuf v1.32.0 // indirect
205209
gopkg.in/ini.v1 v1.67.0 // indirect
206210
gopkg.in/yaml.v3 v3.0.1 // indirect
207211
nhooyr.io/websocket v1.8.6 // indirect

0 commit comments

Comments
 (0)