From 4fa18faf3982561df5957eb7a998d8d2af1aaae3 Mon Sep 17 00:00:00 2001 From: roberthicks Date: Tue, 8 Aug 2023 20:08:31 -0400 Subject: [PATCH 1/4] chore: updated pysnyk packaage to use new projects api --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e9ed1db..813d56e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pysnyk==0.9.5 +pysnyk==0.9.8 PyGithub==1.47 requests==2.28.0 urllib3==1.26.5 From b4a8ff998b900da6de75edf64a444b1482f4cadf Mon Sep 17 00:00:00 2001 From: roberthicks Date: Wed, 9 Aug 2023 16:43:37 -0400 Subject: [PATCH 2/4] chore: updated test to match new project data class --- app/tests/test_snyk_scm_refresh.py | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) mode change 100644 => 100755 app/tests/test_snyk_scm_refresh.py diff --git a/app/tests/test_snyk_scm_refresh.py b/app/tests/test_snyk_scm_refresh.py old mode 100644 new mode 100755 index 8b74cab..58cbca1 --- a/app/tests/test_snyk_scm_refresh.py +++ b/app/tests/test_snyk_scm_refresh.py @@ -220,14 +220,11 @@ def organization_url(self, base_url, organization): type='pip', readOnly=False, testFrequency='daily', - totalDependencies=32, lastTestedDate='2020-07-28T07:15:24.981Z', - browseUrl='https://app.snyk.io/org/scott.esbrandt-ww8' \ - '/project/66d7ebef-9b36-464f-889c-b92c9ef5ce12', issueCountsBySeverity={"low": 8, "high": 13, "medium": 15}, - imageTag='0.0.0', - imageId=None, - isMonitored=True + isMonitored=True, + branch='main', + remoteRepoUrl='scotte-snyk/test-project-1' ), Project(name='scotte-snyk/test-project-1', organization=TestModels.organization, @@ -237,14 +234,11 @@ def organization_url(self, base_url, organization): type='sast', readOnly=False, testFrequency='daily', - totalDependencies=32, lastTestedDate='2020-07-28T07:15:24.981Z', - browseUrl='https://app.snyk.io/org/scott.esbrandt-ww8' \ - '/project/66d7ebef-9b36-464f-889c-b92c9ef5ce12', issueCountsBySeverity={"low": 8, "high": 13, "medium": 15}, - imageTag='0.0.0', - imageId=None, - isMonitored=True + isMonitored=True, + branch='main', + remoteRepoUrl='scotte-snyk/test-project-1' ), Project(name='scotte-snyk/test-project-2:requirements.txt', organization=TestModels.organization, @@ -254,14 +248,11 @@ def organization_url(self, base_url, organization): type='npm', readOnly=False, testFrequency='daily', - totalDependencies=52, lastTestedDate='2020-07-28T01:09:27.480Z', - browseUrl='https://app.snyk.io/org/scott.esbrandt-ww8' \ - '/project/93b82d1f-1544-45c9-b3bc-86e799c7225b', issueCountsBySeverity={"low": 8, "high": 13, "medium": 15}, imageTag='1.0.0', - imageId=None, - isMonitored=True + branch='main', + remoteRepoUrl='scotte-snyk/test-project-2' ) ] From 0adf3371c692bb392253f55e8cc81f667796af03 Mon Sep 17 00:00:00 2001 From: roberthicks Date: Wed, 9 Aug 2023 16:46:21 -0400 Subject: [PATCH 3/4] chore: updated test to match new project data class --- app/tests/test_snyk_scm_refresh.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/tests/test_snyk_scm_refresh.py b/app/tests/test_snyk_scm_refresh.py index 58cbca1..80cc4fb 100755 --- a/app/tests/test_snyk_scm_refresh.py +++ b/app/tests/test_snyk_scm_refresh.py @@ -220,7 +220,6 @@ def organization_url(self, base_url, organization): type='pip', readOnly=False, testFrequency='daily', - lastTestedDate='2020-07-28T07:15:24.981Z', issueCountsBySeverity={"low": 8, "high": 13, "medium": 15}, isMonitored=True, branch='main', @@ -234,7 +233,6 @@ def organization_url(self, base_url, organization): type='sast', readOnly=False, testFrequency='daily', - lastTestedDate='2020-07-28T07:15:24.981Z', issueCountsBySeverity={"low": 8, "high": 13, "medium": 15}, isMonitored=True, branch='main', @@ -248,7 +246,6 @@ def organization_url(self, base_url, organization): type='npm', readOnly=False, testFrequency='daily', - lastTestedDate='2020-07-28T01:09:27.480Z', issueCountsBySeverity={"low": 8, "high": 13, "medium": 15}, imageTag='1.0.0', branch='main', From 7b1d1ae280f706a7eeb813dc6a89cf68e5f35fc0 Mon Sep 17 00:00:00 2001 From: roberthicks Date: Wed, 9 Aug 2023 16:48:18 -0400 Subject: [PATCH 4/4] chore: remove imageTag from test data --- app/tests/test_snyk_scm_refresh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tests/test_snyk_scm_refresh.py b/app/tests/test_snyk_scm_refresh.py index 80cc4fb..93b83b5 100755 --- a/app/tests/test_snyk_scm_refresh.py +++ b/app/tests/test_snyk_scm_refresh.py @@ -247,7 +247,7 @@ def organization_url(self, base_url, organization): readOnly=False, testFrequency='daily', issueCountsBySeverity={"low": 8, "high": 13, "medium": 15}, - imageTag='1.0.0', + isMonitored=True, branch='main', remoteRepoUrl='scotte-snyk/test-project-2' )