From fff0fdf1cad7795450a124ca8d75585511d5725f Mon Sep 17 00:00:00 2001 From: Darin Krauss Date: Fri, 13 Sep 2024 16:58:35 -0700 Subject: [PATCH 1/3] Test for snyk GitHub action --- .travis.yml | 2 +- clients/config.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 417f4c40..4a1590ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ dist: jammy language: go go: - - 1.22.2 + - 1.22.6 cache: directories: diff --git a/clients/config.go b/clients/config.go index 1ffc909e..46df6d7f 100644 --- a/clients/config.go +++ b/clients/config.go @@ -1,12 +1,13 @@ package clients import ( + "log" + "net/url" + "github.com/tidepool-org/go-common/clients/disc" "github.com/tidepool-org/go-common/clients/hakken" "github.com/tidepool-org/go-common/clients/highwater" "github.com/tidepool-org/go-common/clients/shoreline" - "log" - "net/url" ) type HostGetterConfig interface{} @@ -35,7 +36,7 @@ func ToHostGetter(name string, c *HostGetterConfig, discovery disc.Discovery) di return discovery.Watch(c["service"].(string)).Random() } default: - log.Panicf("Unexpected type for HostGetterConfig[%T]", c) + log.Panicf("Unexpected type for HostGetterConfig [%T]", c) } panic("Appease the compiler, code should never get here") From dc045b90fb9fe523726718d44f4cd9dee1347bdc Mon Sep 17 00:00:00 2001 From: Darin Krauss Date: Fri, 13 Sep 2024 17:07:55 -0700 Subject: [PATCH 2/3] Revert the changes --- .travis.yml | 2 +- clients/config.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a1590ba..417f4c40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ dist: jammy language: go go: - - 1.22.6 + - 1.22.2 cache: directories: diff --git a/clients/config.go b/clients/config.go index 46df6d7f..1ffc909e 100644 --- a/clients/config.go +++ b/clients/config.go @@ -1,13 +1,12 @@ package clients import ( - "log" - "net/url" - "github.com/tidepool-org/go-common/clients/disc" "github.com/tidepool-org/go-common/clients/hakken" "github.com/tidepool-org/go-common/clients/highwater" "github.com/tidepool-org/go-common/clients/shoreline" + "log" + "net/url" ) type HostGetterConfig interface{} @@ -36,7 +35,7 @@ func ToHostGetter(name string, c *HostGetterConfig, discovery disc.Discovery) di return discovery.Watch(c["service"].(string)).Random() } default: - log.Panicf("Unexpected type for HostGetterConfig [%T]", c) + log.Panicf("Unexpected type for HostGetterConfig[%T]", c) } panic("Appease the compiler, code should never get here") From 05163b580bab00c21a99d42b29bd18f78f4a62f0 Mon Sep 17 00:00:00 2001 From: Darin Krauss Date: Mon, 23 Sep 2024 10:21:30 -0700 Subject: [PATCH 3/3] Fix snyk GitHub action --- .github/workflows/main.yml | 2 -- .snyk | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .snyk diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 111152c5..58b544f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,5 +9,3 @@ jobs: uses: snyk/actions/golang@master env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - with: - args: snyk ignore --id=SNYK-GOLANG-GITHUBCOMDISINTEGRATIONIMAGING-5880692 --expiry=2026-03-12 --policy-path=.snyk diff --git a/.snyk b/.snyk new file mode 100644 index 00000000..0ea7ad0e --- /dev/null +++ b/.snyk @@ -0,0 +1,6 @@ +version: v1.25.0 +ignore: + SNYK-GOLANG-GITHUBCOMDISINTEGRATIONIMAGING-5880692: + - '*': + reason: + expires: 2026-03-12T00:00:00.000Z