From 3455d9ab74e21cf1083bcb5def40acc2a68958c1 Mon Sep 17 00:00:00 2001 From: Jin-Sun-tts Date: Thu, 11 Jan 2024 16:53:58 -0500 Subject: [PATCH 1/9] added snyk exceptions --- ckan/.snyk | 18 ++++++++++++++++-- ckan/requirements.in | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ckan/.snyk b/ckan/.snyk index be6be26c..2bb9aba3 100644 --- a/ckan/.snyk +++ b/ckan/.snyk @@ -49,7 +49,7 @@ ignore: reason: >- No remediation available yet; Issue tracked in github: https://github.com/GSA/data.gov/issues/4532 - expires: 2024-02-8T00:00:00.000Z + expires: 2024-02-08T00:00:00.000Z created: 2023-11-16T20:31:20.590Z SNYK-PYTHON-CKAN-6124881: - '*': @@ -64,5 +64,19 @@ ignore: No remediation available yet; Issue tracked in github: https://github.com/GSA/data.gov/issues/4532 expires: 2024-03-14T00:00:00.000Z - created: 2023-12-14T00:00:00.000Z + created: 2023-12-14T00:00:00.000Z + SNYK-PYTHON-CRYPTOGRAPHY-6149518: + - '*': + reason: >- + No remediation available yet; Issue tracked in github: + https://github.com/GSA/data.gov/issues/4532 + expires: 2024-04-10T19:28:50.100Z + created: 2024-01-11T19:28:50.103Z + SNYK-PYTHON-PYOPENSSL-6149520: + - '*': + reason: >- + No remediation available yet; Issue tracked in github: + https://github.com/GSA/data.gov/issues/4532 + expires: 2024-04-10T19:29:54.032Z + created: 2024-01-11T19:29:54.039Z patch: {} diff --git a/ckan/requirements.in b/ckan/requirements.in index fba2c08e..d74cfe83 100644 --- a/ckan/requirements.in +++ b/ckan/requirements.in @@ -81,7 +81,7 @@ Flask==2.0.3 Flask-Babel==1.0.0 flask-multistatic==1.0 Flask-Login==0.6.1 -Jinja2==3.1.2 +Jinja2==3.1.3 Flask-WTF==1.0.1 pyjwt==2.4.0 Markdown==3.4.1 From 8efdb40dcb871f305418773b13d4775b910598ff Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Thu, 11 Jan 2024 16:57:20 -0500 Subject: [PATCH 2/9] bringing touchpoint from datagovtheme, add tests --- ckan/requirements.txt | 2 +- e2e/cypress/integration/dataset.cy.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ckan/requirements.txt b/ckan/requirements.txt index 8b371e07..b9c2048a 100644 --- a/ckan/requirements.txt +++ b/ckan/requirements.txt @@ -13,7 +13,7 @@ charset-normalizer==3.3.2 ckan==2.10.1 -e git+https://github.com/ckan/ckanext-archiver.git@cbfadf9fbf10405958fdef9f77a7faedc05aa20b#egg=ckanext_archiver ckanext-datagovcatalog==0.1.0 -ckanext-datagovtheme==0.2.10 +ckanext-datagovtheme==0.2.11 ckanext-datajson==0.1.23 ckanext-dcat @ git+https://github.com/ckan/ckanext-dcat@1109205069dd105dda27e3486898e4ca1525a808 ckanext-envvars==0.0.3 diff --git a/e2e/cypress/integration/dataset.cy.js b/e2e/cypress/integration/dataset.cy.js index 5f785974..219dd11e 100644 --- a/e2e/cypress/integration/dataset.cy.js +++ b/e2e/cypress/integration/dataset.cy.js @@ -54,4 +54,19 @@ describe('Dataset', () => { cy.get('a[class="heading"]').contains('NCEI Contact Information').click(); cy.get('ul[class="list-unstyled nav nav-simple"] li').eq(1).click(); }); + + it("Can click on feedback button", () => { + cy.visit('/dataset/ek500-water-column-sonar-data-collected-during-al0001'); + // sleep for 1 second to allow touchpoint js to load + cy.wait(1000); + cy.hide_debug_toolbar(); + // the button is visible + cy.get('#contact-btn').should('be.visible').click(); + // the modal is invisible + cy.get('#fba-modal-dialog').should('be.visible'); + cy.get('#fba_location_code').should('have.value', 'ek500-water-column-sonar-data-collected-during-al0001'); + // can hide the modal + cy.get('a[class="fba-modal-close"]').click(); + cy.get('#fba-modal-dialog').should('not.be.visible'); + }); }); From c2d2fbcbc11458a8466b6cae1554243dc60bf943 Mon Sep 17 00:00:00 2001 From: nickumia-reisys Date: Fri, 12 Jan 2024 12:14:40 +0000 Subject: [PATCH 3/9] Update Pip Requirements --- ckan/requirements.in | 2 +- ckan/requirements.txt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ckan/requirements.in b/ckan/requirements.in index fba2c08e..08439e64 100644 --- a/ckan/requirements.in +++ b/ckan/requirements.in @@ -81,7 +81,6 @@ Flask==2.0.3 Flask-Babel==1.0.0 flask-multistatic==1.0 Flask-Login==0.6.1 -Jinja2==3.1.2 Flask-WTF==1.0.1 pyjwt==2.4.0 Markdown==3.4.1 @@ -125,3 +124,4 @@ requests==2.31.0 importlib-resources<6.0 gevent>=23.9.0 cryptography>=41.0.6 +jinja2>=3.1.3 diff --git a/ckan/requirements.txt b/ckan/requirements.txt index b9c2048a..a85e6187 100644 --- a/ckan/requirements.txt +++ b/ckan/requirements.txt @@ -4,8 +4,8 @@ Babel==2.10.3 Beaker==1.11.0 bleach==3.3.0 blinker==1.5 -boto3==1.34.16 -botocore==1.34.16 +boto3==1.34.17 +botocore==1.34.17 certifi==2023.11.17 cffi==1.16.0 chardet==5.2.0 @@ -52,7 +52,7 @@ importlib-metadata==7.0.1 importlib-resources==5.13.0 isodate==0.6.1 itsdangerous==2.1.2 -Jinja2==3.1.2 +Jinja2==3.1.3 jmespath==1.0.1 json-table-schema==0.2.1 jsonschema==2.4.0 @@ -63,7 +63,7 @@ MarkupSafe==2.1.3 messytables==0.15.2 mypy==1.8.0 mypy-extensions==1.0.0 -newrelic==9.4.0 +newrelic==9.5.0 nose==1.3.7 numpy==1.26.3 oauth2client==4.1.3 From 13e1e415197ea8aee0ed8612878d346415f45dab Mon Sep 17 00:00:00 2001 From: Jin-Sun-tts Date: Fri, 12 Jan 2024 16:58:22 -0500 Subject: [PATCH 4/9] added snyk exceptions --- ckan/requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckan/requirements.in b/ckan/requirements.in index 3a8932a0..08439e64 100644 --- a/ckan/requirements.in +++ b/ckan/requirements.in @@ -124,4 +124,4 @@ requests==2.31.0 importlib-resources<6.0 gevent>=23.9.0 cryptography>=41.0.6 -jinja2>=3.1.3 \ No newline at end of file +jinja2>=3.1.3 From 469145141088f7171aafed1997b858f9726323b3 Mon Sep 17 00:00:00 2001 From: Fuhu Xia <1392461+FuhuXia@users.noreply.github.com> Date: Mon, 15 Jan 2024 13:28:16 -0500 Subject: [PATCH 5/9] respond bot with 202 status code ...so it is different from normal 200 code, making it possible for later the log analysis. --- proxy/nginx-botbegone.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/nginx-botbegone.conf b/proxy/nginx-botbegone.conf index 21996f5a..ad98a992 100644 --- a/proxy/nginx-botbegone.conf +++ b/proxy/nginx-botbegone.conf @@ -17,5 +17,5 @@ if ($http_user_agent ~ 'Googlebot/|Y!J|Yeti|Bytespider|Applebot|HeadlessChrome') } if ($botstracking = 11) { - return 200; + return 202; } From 26e1c943ca37c5b5d10fa14630fbb7146a6dc173 Mon Sep 17 00:00:00 2001 From: nickumia-reisys Date: Tue, 16 Jan 2024 12:16:28 +0000 Subject: [PATCH 6/9] Update Pip Requirements --- ckan/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ckan/requirements.txt b/ckan/requirements.txt index a85e6187..a8a428eb 100644 --- a/ckan/requirements.txt +++ b/ckan/requirements.txt @@ -4,8 +4,8 @@ Babel==2.10.3 Beaker==1.11.0 bleach==3.3.0 blinker==1.5 -boto3==1.34.17 -botocore==1.34.17 +boto3==1.34.19 +botocore==1.34.19 certifi==2023.11.17 cffi==1.16.0 chardet==5.2.0 @@ -13,7 +13,7 @@ charset-normalizer==3.3.2 ckan==2.10.1 -e git+https://github.com/ckan/ckanext-archiver.git@cbfadf9fbf10405958fdef9f77a7faedc05aa20b#egg=ckanext_archiver ckanext-datagovcatalog==0.1.0 -ckanext-datagovtheme==0.2.11 +ckanext-datagovtheme==0.2.12 ckanext-datajson==0.1.23 ckanext-dcat @ git+https://github.com/ckan/ckanext-dcat@1109205069dd105dda27e3486898e4ca1525a808 ckanext-envvars==0.0.3 From 1c3af09e7f932f861c1757e37b0cc82d3f271465 Mon Sep 17 00:00:00 2001 From: nickumia-reisys Date: Thu, 18 Jan 2024 12:15:25 +0000 Subject: [PATCH 7/9] Update Pip Requirements --- ckan/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckan/requirements.txt b/ckan/requirements.txt index a8a428eb..6e55b649 100644 --- a/ckan/requirements.txt +++ b/ckan/requirements.txt @@ -4,8 +4,8 @@ Babel==2.10.3 Beaker==1.11.0 bleach==3.3.0 blinker==1.5 -boto3==1.34.19 -botocore==1.34.19 +boto3==1.34.21 +botocore==1.34.21 certifi==2023.11.17 cffi==1.16.0 chardet==5.2.0 From 7210e68c14e1fa3c2a9649f9fb1924555cbfccae Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Thu, 18 Jan 2024 09:54:15 -0500 Subject: [PATCH 8/9] add libpq-dev to fix psycopg2 error Error: pg_config executable not found. --- .github/workflows/snyk.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 1dc2bb9c..dfa1bf06 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -25,7 +25,8 @@ jobs: sudo apt-get update -y sudo apt-get install -y \ openssl libssl-dev libffi-dev pkg-config libxml2-dev \ - libxmlsec1-dev libxmlsec1-openssl libgeos-dev proj-bin + libxmlsec1-dev libxmlsec1-openssl libgeos-dev proj-bin \ + libpq-dev pip3 install -r requirements.txt - name: Run Snyk Scan run: | From c33d37b740a16e4a055969c553ff25e80c8f597b Mon Sep 17 00:00:00 2001 From: FuhuXia Date: Thu, 18 Jan 2024 15:03:43 +0000 Subject: [PATCH 9/9] Update Pip Requirements --- ckan/requirements.in | 2 +- ckan/requirements.txt | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ckan/requirements.in b/ckan/requirements.in index fba2c08e..08439e64 100644 --- a/ckan/requirements.in +++ b/ckan/requirements.in @@ -81,7 +81,6 @@ Flask==2.0.3 Flask-Babel==1.0.0 flask-multistatic==1.0 Flask-Login==0.6.1 -Jinja2==3.1.2 Flask-WTF==1.0.1 pyjwt==2.4.0 Markdown==3.4.1 @@ -125,3 +124,4 @@ requests==2.31.0 importlib-resources<6.0 gevent>=23.9.0 cryptography>=41.0.6 +jinja2>=3.1.3 diff --git a/ckan/requirements.txt b/ckan/requirements.txt index 8b371e07..6e55b649 100644 --- a/ckan/requirements.txt +++ b/ckan/requirements.txt @@ -4,8 +4,8 @@ Babel==2.10.3 Beaker==1.11.0 bleach==3.3.0 blinker==1.5 -boto3==1.34.16 -botocore==1.34.16 +boto3==1.34.21 +botocore==1.34.21 certifi==2023.11.17 cffi==1.16.0 chardet==5.2.0 @@ -13,7 +13,7 @@ charset-normalizer==3.3.2 ckan==2.10.1 -e git+https://github.com/ckan/ckanext-archiver.git@cbfadf9fbf10405958fdef9f77a7faedc05aa20b#egg=ckanext_archiver ckanext-datagovcatalog==0.1.0 -ckanext-datagovtheme==0.2.10 +ckanext-datagovtheme==0.2.12 ckanext-datajson==0.1.23 ckanext-dcat @ git+https://github.com/ckan/ckanext-dcat@1109205069dd105dda27e3486898e4ca1525a808 ckanext-envvars==0.0.3 @@ -52,7 +52,7 @@ importlib-metadata==7.0.1 importlib-resources==5.13.0 isodate==0.6.1 itsdangerous==2.1.2 -Jinja2==3.1.2 +Jinja2==3.1.3 jmespath==1.0.1 json-table-schema==0.2.1 jsonschema==2.4.0 @@ -63,7 +63,7 @@ MarkupSafe==2.1.3 messytables==0.15.2 mypy==1.8.0 mypy-extensions==1.0.0 -newrelic==9.4.0 +newrelic==9.5.0 nose==1.3.7 numpy==1.26.3 oauth2client==4.1.3