2020-04-30 17:37:41 +02:00
|
|
|
name: Continuous integration
|
|
|
|
|
2020-09-28 12:29:59 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-08-31 18:53:24 +02:00
|
|
|
- v2
|
2020-09-28 12:29:59 +02:00
|
|
|
pull_request:
|
2022-03-28 14:38:27 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
debug_enabled:
|
|
|
|
description: 'To run with tmate enter "debug_enabled"'
|
|
|
|
required: false
|
|
|
|
default: "false"
|
2020-05-14 13:35:55 +02:00
|
|
|
|
2020-04-30 17:37:41 +02:00
|
|
|
jobs:
|
2020-05-14 13:35:55 +02:00
|
|
|
lint:
|
|
|
|
name: Lint
|
|
|
|
runs-on: ubuntu-latest
|
2020-05-14 22:13:35 +02:00
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
2020-05-14 13:35:55 +02:00
|
|
|
steps:
|
2022-05-10 23:10:16 +02:00
|
|
|
- name: Set up Go 1.18
|
2021-02-17 17:51:14 +01:00
|
|
|
uses: actions/setup-go@v2
|
2020-05-14 22:13:35 +02:00
|
|
|
with:
|
update go to 1.18.4
go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip,
encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath
packages, as well as bug fixes to the compiler, the go command, the linker,
the runtime, and the runtime/metrics package. See the Go 1.18.4 milestone on the
issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved
This update addresses:
CVE-2022-1705, CVE-2022-1962, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631,
CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, and CVE-2022-32148.
Full diff: https://github.com/golang/go/compare/go1.18.3...go1.18.4
From the security announcement;
https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE
We have just released Go versions 1.18.4 and 1.17.12, minor point releases. These
minor releases include 9 security fixes following the security policy:
- net/http: improper sanitization of Transfer-Encoding header
The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating
a "chunked" encoding. This could potentially allow for request smuggling, but
only if combined with an intermediate server that also improperly failed to
reject the header as invalid.
This is CVE-2022-1705 and https://go.dev/issue/53188.
- When `httputil.ReverseProxy.ServeHTTP` was called with a `Request.Header` map
containing a nil value for the X-Forwarded-For header, ReverseProxy would set
the client IP as the value of the X-Forwarded-For header, contrary to its
documentation. In the more usual case where a Director function set the
X-Forwarded-For header value to nil, ReverseProxy would leave the header
unmodified as expected.
This is https://go.dev/issue/53423 and CVE-2022-32148.
Thanks to Christian Mehlmauer for reporting this issue.
- compress/gzip: stack exhaustion in Reader.Read
Calling Reader.Read on an archive containing a large number of concatenated
0-length compressed files can cause a panic due to stack exhaustion.
This is CVE-2022-30631 and Go issue https://go.dev/issue/53168.
- encoding/xml: stack exhaustion in Unmarshal
Calling Unmarshal on a XML document into a Go struct which has a nested field
that uses the any field tag can cause a panic due to stack exhaustion.
This is CVE-2022-30633 and Go issue https://go.dev/issue/53611.
- encoding/xml: stack exhaustion in Decoder.Skip
Calling Decoder.Skip when parsing a deeply nested XML document can cause a
panic due to stack exhaustion. The Go Security team discovered this issue, and
it was independently reported by Juho Nurminen of Mattermost.
This is CVE-2022-28131 and Go issue https://go.dev/issue/53614.
- encoding/gob: stack exhaustion in Decoder.Decode
Calling Decoder.Decode on a message which contains deeply nested structures
can cause a panic due to stack exhaustion.
This is CVE-2022-30635 and Go issue https://go.dev/issue/53615.
- path/filepath: stack exhaustion in Glob
Calling Glob on a path which contains a large number of path separators can
cause a panic due to stack exhaustion.
Thanks to Juho Nurminen of Mattermost for reporting this issue.
This is CVE-2022-30632 and Go issue https://go.dev/issue/53416.
- io/fs: stack exhaustion in Glob
Calling Glob on a path which contains a large number of path separators can
cause a panic due to stack exhaustion.
This is CVE-2022-30630 and Go issue https://go.dev/issue/53415.
- go/parser: stack exhaustion in all Parse* functions
Calling any of the Parse functions on Go source code which contains deeply
nested types or declarations can cause a panic due to stack exhaustion.
Thanks to Juho Nurminen of Mattermost for reporting this issue.
This is CVE-2022-1962 and Go issue https://go.dev/issue/53616.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-13 12:40:24 +02:00
|
|
|
go-version: 1.18.4
|
2020-05-14 22:13:35 +02:00
|
|
|
id: go
|
|
|
|
|
2020-05-14 13:35:55 +02:00
|
|
|
- name: Checkout code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2022-03-16 23:03:51 +01:00
|
|
|
- name: Validate go-mod, license headers and docs are up-to-date
|
2020-08-17 15:18:47 +02:00
|
|
|
run: make validate
|
|
|
|
|
2020-05-14 13:35:55 +02:00
|
|
|
- name: Run golangci-lint
|
2021-01-26 17:35:21 +01:00
|
|
|
env:
|
2021-08-31 18:53:24 +02:00
|
|
|
BUILD_TAGS: e2e
|
2022-02-17 18:01:46 +01:00
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
|
|
|
args: --timeout=180s
|
2020-05-14 22:13:35 +02:00
|
|
|
|
2021-02-26 11:31:35 +01:00
|
|
|
# only on main branch, costs too much for the gain on every PR
|
|
|
|
validate-cross-build:
|
2021-04-13 15:19:20 +02:00
|
|
|
name: Validate cross build
|
2021-02-26 11:31:35 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.ref == 'refs/heads/main'
|
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
|
|
|
steps:
|
2022-05-10 23:10:16 +02:00
|
|
|
- name: Set up Go 1.18
|
2021-02-26 11:31:35 +01:00
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
update go to 1.18.4
go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip,
encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath
packages, as well as bug fixes to the compiler, the go command, the linker,
the runtime, and the runtime/metrics package. See the Go 1.18.4 milestone on the
issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved
This update addresses:
CVE-2022-1705, CVE-2022-1962, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631,
CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, and CVE-2022-32148.
Full diff: https://github.com/golang/go/compare/go1.18.3...go1.18.4
From the security announcement;
https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE
We have just released Go versions 1.18.4 and 1.17.12, minor point releases. These
minor releases include 9 security fixes following the security policy:
- net/http: improper sanitization of Transfer-Encoding header
The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating
a "chunked" encoding. This could potentially allow for request smuggling, but
only if combined with an intermediate server that also improperly failed to
reject the header as invalid.
This is CVE-2022-1705 and https://go.dev/issue/53188.
- When `httputil.ReverseProxy.ServeHTTP` was called with a `Request.Header` map
containing a nil value for the X-Forwarded-For header, ReverseProxy would set
the client IP as the value of the X-Forwarded-For header, contrary to its
documentation. In the more usual case where a Director function set the
X-Forwarded-For header value to nil, ReverseProxy would leave the header
unmodified as expected.
This is https://go.dev/issue/53423 and CVE-2022-32148.
Thanks to Christian Mehlmauer for reporting this issue.
- compress/gzip: stack exhaustion in Reader.Read
Calling Reader.Read on an archive containing a large number of concatenated
0-length compressed files can cause a panic due to stack exhaustion.
This is CVE-2022-30631 and Go issue https://go.dev/issue/53168.
- encoding/xml: stack exhaustion in Unmarshal
Calling Unmarshal on a XML document into a Go struct which has a nested field
that uses the any field tag can cause a panic due to stack exhaustion.
This is CVE-2022-30633 and Go issue https://go.dev/issue/53611.
- encoding/xml: stack exhaustion in Decoder.Skip
Calling Decoder.Skip when parsing a deeply nested XML document can cause a
panic due to stack exhaustion. The Go Security team discovered this issue, and
it was independently reported by Juho Nurminen of Mattermost.
This is CVE-2022-28131 and Go issue https://go.dev/issue/53614.
- encoding/gob: stack exhaustion in Decoder.Decode
Calling Decoder.Decode on a message which contains deeply nested structures
can cause a panic due to stack exhaustion.
This is CVE-2022-30635 and Go issue https://go.dev/issue/53615.
- path/filepath: stack exhaustion in Glob
Calling Glob on a path which contains a large number of path separators can
cause a panic due to stack exhaustion.
Thanks to Juho Nurminen of Mattermost for reporting this issue.
This is CVE-2022-30632 and Go issue https://go.dev/issue/53416.
- io/fs: stack exhaustion in Glob
Calling Glob on a path which contains a large number of path separators can
cause a panic due to stack exhaustion.
This is CVE-2022-30630 and Go issue https://go.dev/issue/53415.
- go/parser: stack exhaustion in all Parse* functions
Calling any of the Parse functions on Go source code which contains deeply
nested types or declarations can cause a panic due to stack exhaustion.
Thanks to Juho Nurminen of Mattermost for reporting this issue.
This is CVE-2022-1962 and Go issue https://go.dev/issue/53616.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-13 12:40:24 +02:00
|
|
|
go-version: 1.18.4
|
2021-02-26 11:31:35 +01:00
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Checkout code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: go-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
|
|
|
# Ensure we don't discover cross platform build issues at release time.
|
|
|
|
# Time used to build linux here is gained back in the build for local E2E step
|
|
|
|
- name: Build packages
|
2021-08-31 18:53:24 +02:00
|
|
|
run: make -f builder.Makefile cross
|
2021-02-26 11:31:35 +01:00
|
|
|
|
2021-12-09 10:30:05 +01:00
|
|
|
build-plugin:
|
|
|
|
name: Build and tests in plugin mode
|
2020-04-30 17:37:41 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-05-14 13:35:55 +02:00
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
2020-04-30 17:37:41 +02:00
|
|
|
steps:
|
2022-05-10 23:10:16 +02:00
|
|
|
- name: Set up Go 1.18
|
2021-02-17 17:51:14 +01:00
|
|
|
uses: actions/setup-go@v2
|
2020-04-30 17:41:59 +02:00
|
|
|
with:
|
update go to 1.18.4
go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip,
encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath
packages, as well as bug fixes to the compiler, the go command, the linker,
the runtime, and the runtime/metrics package. See the Go 1.18.4 milestone on the
issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved
This update addresses:
CVE-2022-1705, CVE-2022-1962, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631,
CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, and CVE-2022-32148.
Full diff: https://github.com/golang/go/compare/go1.18.3...go1.18.4
From the security announcement;
https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE
We have just released Go versions 1.18.4 and 1.17.12, minor point releases. These
minor releases include 9 security fixes following the security policy:
- net/http: improper sanitization of Transfer-Encoding header
The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating
a "chunked" encoding. This could potentially allow for request smuggling, but
only if combined with an intermediate server that also improperly failed to
reject the header as invalid.
This is CVE-2022-1705 and https://go.dev/issue/53188.
- When `httputil.ReverseProxy.ServeHTTP` was called with a `Request.Header` map
containing a nil value for the X-Forwarded-For header, ReverseProxy would set
the client IP as the value of the X-Forwarded-For header, contrary to its
documentation. In the more usual case where a Director function set the
X-Forwarded-For header value to nil, ReverseProxy would leave the header
unmodified as expected.
This is https://go.dev/issue/53423 and CVE-2022-32148.
Thanks to Christian Mehlmauer for reporting this issue.
- compress/gzip: stack exhaustion in Reader.Read
Calling Reader.Read on an archive containing a large number of concatenated
0-length compressed files can cause a panic due to stack exhaustion.
This is CVE-2022-30631 and Go issue https://go.dev/issue/53168.
- encoding/xml: stack exhaustion in Unmarshal
Calling Unmarshal on a XML document into a Go struct which has a nested field
that uses the any field tag can cause a panic due to stack exhaustion.
This is CVE-2022-30633 and Go issue https://go.dev/issue/53611.
- encoding/xml: stack exhaustion in Decoder.Skip
Calling Decoder.Skip when parsing a deeply nested XML document can cause a
panic due to stack exhaustion. The Go Security team discovered this issue, and
it was independently reported by Juho Nurminen of Mattermost.
This is CVE-2022-28131 and Go issue https://go.dev/issue/53614.
- encoding/gob: stack exhaustion in Decoder.Decode
Calling Decoder.Decode on a message which contains deeply nested structures
can cause a panic due to stack exhaustion.
This is CVE-2022-30635 and Go issue https://go.dev/issue/53615.
- path/filepath: stack exhaustion in Glob
Calling Glob on a path which contains a large number of path separators can
cause a panic due to stack exhaustion.
Thanks to Juho Nurminen of Mattermost for reporting this issue.
This is CVE-2022-30632 and Go issue https://go.dev/issue/53416.
- io/fs: stack exhaustion in Glob
Calling Glob on a path which contains a large number of path separators can
cause a panic due to stack exhaustion.
This is CVE-2022-30630 and Go issue https://go.dev/issue/53415.
- go/parser: stack exhaustion in all Parse* functions
Calling any of the Parse functions on Go source code which contains deeply
nested types or declarations can cause a panic due to stack exhaustion.
Thanks to Juho Nurminen of Mattermost for reporting this issue.
This is CVE-2022-1962 and Go issue https://go.dev/issue/53616.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-13 12:40:24 +02:00
|
|
|
go-version: 1.18.4
|
2020-04-30 17:41:59 +02:00
|
|
|
id: go
|
2021-02-22 14:24:29 +01:00
|
|
|
|
2021-01-07 19:44:10 +01:00
|
|
|
- name: Setup docker CLI
|
|
|
|
run: |
|
2021-02-18 13:53:00 +01:00
|
|
|
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
|
2021-01-07 19:44:10 +01:00
|
|
|
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
|
|
|
|
|
2020-04-30 17:41:59 +02:00
|
|
|
- name: Checkout code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-06-18 09:44:34 +02:00
|
|
|
- uses: actions/cache@v2
|
2020-05-14 13:35:55 +02:00
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
2020-06-18 09:44:34 +02:00
|
|
|
key: go-${{ hashFiles('**/go.sum') }}
|
2020-04-30 17:37:41 +02:00
|
|
|
|
2020-04-30 17:41:59 +02:00
|
|
|
- name: Test
|
2020-05-14 13:35:55 +02:00
|
|
|
run: make -f builder.Makefile test
|
|
|
|
|
2020-10-01 12:21:25 +02:00
|
|
|
- name: Build for local E2E
|
2020-06-15 17:41:59 +02:00
|
|
|
env:
|
2021-01-18 18:35:03 +01:00
|
|
|
BUILD_TAGS: e2e
|
2021-12-14 10:48:57 +01:00
|
|
|
run: make GIT_TAG=e2e-PR-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }} -f builder.Makefile compose-plugin
|
2020-05-04 15:10:28 +02:00
|
|
|
|
2021-12-09 10:30:05 +01:00
|
|
|
- name: E2E Test in plugin mode
|
2021-06-25 17:08:40 +02:00
|
|
|
run: make e2e-compose
|
2021-12-09 10:30:05 +01:00
|
|
|
|
|
|
|
build-standalone:
|
|
|
|
name: Build and tests in standalone mode
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GO111MODULE: "on"
|
|
|
|
steps:
|
2022-05-10 23:10:16 +02:00
|
|
|
- name: Set up Go 1.18
|
2021-12-09 10:30:05 +01:00
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
update go to 1.18.4
go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip,
encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath
packages, as well as bug fixes to the compiler, the go command, the linker,
the runtime, and the runtime/metrics package. See the Go 1.18.4 milestone on the
issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved
This update addresses:
CVE-2022-1705, CVE-2022-1962, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631,
CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, and CVE-2022-32148.
Full diff: https://github.com/golang/go/compare/go1.18.3...go1.18.4
From the security announcement;
https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE
We have just released Go versions 1.18.4 and 1.17.12, minor point releases. These
minor releases include 9 security fixes following the security policy:
- net/http: improper sanitization of Transfer-Encoding header
The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating
a "chunked" encoding. This could potentially allow for request smuggling, but
only if combined with an intermediate server that also improperly failed to
reject the header as invalid.
This is CVE-2022-1705 and https://go.dev/issue/53188.
- When `httputil.ReverseProxy.ServeHTTP` was called with a `Request.Header` map
containing a nil value for the X-Forwarded-For header, ReverseProxy would set
the client IP as the value of the X-Forwarded-For header, contrary to its
documentation. In the more usual case where a Director function set the
X-Forwarded-For header value to nil, ReverseProxy would leave the header
unmodified as expected.
This is https://go.dev/issue/53423 and CVE-2022-32148.
Thanks to Christian Mehlmauer for reporting this issue.
- compress/gzip: stack exhaustion in Reader.Read
Calling Reader.Read on an archive containing a large number of concatenated
0-length compressed files can cause a panic due to stack exhaustion.
This is CVE-2022-30631 and Go issue https://go.dev/issue/53168.
- encoding/xml: stack exhaustion in Unmarshal
Calling Unmarshal on a XML document into a Go struct which has a nested field
that uses the any field tag can cause a panic due to stack exhaustion.
This is CVE-2022-30633 and Go issue https://go.dev/issue/53611.
- encoding/xml: stack exhaustion in Decoder.Skip
Calling Decoder.Skip when parsing a deeply nested XML document can cause a
panic due to stack exhaustion. The Go Security team discovered this issue, and
it was independently reported by Juho Nurminen of Mattermost.
This is CVE-2022-28131 and Go issue https://go.dev/issue/53614.
- encoding/gob: stack exhaustion in Decoder.Decode
Calling Decoder.Decode on a message which contains deeply nested structures
can cause a panic due to stack exhaustion.
This is CVE-2022-30635 and Go issue https://go.dev/issue/53615.
- path/filepath: stack exhaustion in Glob
Calling Glob on a path which contains a large number of path separators can
cause a panic due to stack exhaustion.
Thanks to Juho Nurminen of Mattermost for reporting this issue.
This is CVE-2022-30632 and Go issue https://go.dev/issue/53416.
- io/fs: stack exhaustion in Glob
Calling Glob on a path which contains a large number of path separators can
cause a panic due to stack exhaustion.
This is CVE-2022-30630 and Go issue https://go.dev/issue/53415.
- go/parser: stack exhaustion in all Parse* functions
Calling any of the Parse functions on Go source code which contains deeply
nested types or declarations can cause a panic due to stack exhaustion.
Thanks to Juho Nurminen of Mattermost for reporting this issue.
This is CVE-2022-1962 and Go issue https://go.dev/issue/53616.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-13 12:40:24 +02:00
|
|
|
go-version: 1.18.4
|
2021-12-09 10:30:05 +01:00
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Setup docker CLI
|
|
|
|
run: |
|
|
|
|
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
|
|
|
|
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
|
|
|
|
|
|
|
|
- name: Checkout code into the Go module directory
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: go-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
|
|
|
- name: Build for local E2E
|
|
|
|
env:
|
|
|
|
BUILD_TAGS: e2e
|
2021-12-14 10:48:57 +01:00
|
|
|
run: make GIT_TAG=e2e-PR-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }} -f builder.Makefile compose-plugin
|
2021-12-09 10:30:05 +01:00
|
|
|
|
2022-03-28 14:38:27 +02:00
|
|
|
- name: Setup tmate session
|
|
|
|
uses: mxschmitt/action-tmate@v3
|
|
|
|
with:
|
|
|
|
limit-access-to-actor: true
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
|
|
|
|
|
2021-12-09 10:30:05 +01:00
|
|
|
- name: E2E Test in standalone mode
|
2022-05-20 21:31:16 +02:00
|
|
|
run: |
|
|
|
|
rm -f /usr/local/bin/docker-compose
|
|
|
|
cp bin/docker-compose /usr/local/bin
|
|
|
|
make e2e-compose-standalone
|