diff --git a/CHANGELOG.md b/CHANGELOG.md index b1933b3..416c2bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [tbd] - tbd -- New feature: Mitigate the risk of reverse tabnabbing in href links (#43) -- Bug fix: Confidence value has no impact on search queries (#54) +## [2.0.2] - 2023-01-11 -## [2.0.1] - 08/18/2022 +### Fixed: + +* Updated python packages +* Replaced deprecated python command with python3 + +## [2.0.1] - 2022-08-18 ### Fixed: diff --git a/deployment/build-s3-dist.sh b/deployment/build-s3-dist.sh index 9f26bd3..b1bca55 100755 --- a/deployment/build-s3-dist.sh +++ b/deployment/build-s3-dist.sh @@ -1,6 +1,6 @@ #!/bin/bash ############################################################################### -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # # PURPOSE: @@ -15,7 +15,7 @@ # VERSION can be anything but should be in a format like v1.0.0 just to be consistent # with the official solution release labels. # REGION needs to be in a format like us-east-1 -# PROFILE is optional. It's the profile that you have setup in ~/.aws/credentials +# PROFILE is optional. It's the profile that you have setup in ~/.aws/config # that you want to use for AWS CLI commands. # # The following options are available: @@ -78,6 +78,7 @@ parse_params() { # default values of variables set from params flag=0 param='' + profile=default while :; do case "${1-}" in @@ -167,7 +168,7 @@ regional_dist_dir="$build_dir/regional-s3-assets" echo "------------------------------------------------------------------------------" echo "Creating a temporary Python virtualenv for this script" echo "------------------------------------------------------------------------------" -python -c "import os; print (os.getenv('VIRTUAL_ENV'))" | grep -q None +python3 -c "import os; print (os.getenv('VIRTUAL_ENV'))" | grep -q None if [ $? -ne 0 ]; then echo "ERROR: Do not run this script inside Virtualenv. Type \`deactivate\` and run again."; exit 1; @@ -348,20 +349,20 @@ if [ "$global_bucket" != "solutions-reference" ] && [ "$global_bucket" != "solut echo "------------------------------------------------------------------------------" echo "Validating ownership of s3://$global_bucket" # Get account id - account_id=$(aws sts get-caller-identity --query Account --output text $(if [ ! -z $profile ]; then echo "--profile $profile"; fi)) + account_id=$(aws sts get-caller-identity --query Account --output text --profile $profile) if [ $? -ne 0 ]; then msg "ERROR: Failed to get AWS account ID" die 1 fi # Validate ownership of $global_bucket - aws s3api head-bucket --bucket $global_bucket --expected-bucket-owner $account_id $(if [ ! -z $profile ]; then echo "--profile $profile"; fi) + aws s3api head-bucket --bucket $global_bucket --expected-bucket-owner $account_id --profile $profile if [ $? -ne 0 ]; then msg "ERROR: Your AWS account does not own s3://$global_bucket/" die 1 fi echo "Validating ownership of s3://${regional_bucket}-${region}" # Validate ownership of ${regional_bucket}-${region} - aws s3api head-bucket --bucket ${regional_bucket}-${region} --expected-bucket-owner $account_id $(if [ ! -z $profile ]; then echo "--profile $profile"; fi) + aws s3api head-bucket --bucket ${regional_bucket}-${region} --expected-bucket-owner $account_id --profile $profile if [ $? -ne 0 ]; then msg "ERROR: Your AWS account does not own s3://${regional_bucket}-${region} " die 1 diff --git a/source/anonymous-data-logger/lib/metrics.py b/source/anonymous-data-logger/lib/metrics.py index ebc3adf..e17f703 100644 --- a/source/anonymous-data-logger/lib/metrics.py +++ b/source/anonymous-data-logger/lib/metrics.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License Version 2.0 (the "License"). # # You may not use this file except in compliance with the License. # @@ -30,7 +30,7 @@ def send_metrics(config): data = json.dumps(metrics).encode('utf8') headers = {'content-type': 'application/json'} req = urllib.request.Request(url, data,headers) - response = urllib.request.urlopen(req) + response = urllib.request.urlopen(req) #nosec print('RESPONSE CODE:: {}'.format(response.getcode())) print('METRICS SENT:: {}'.format(data)) return diff --git a/source/anonymous-data-logger/requirements.txt b/source/anonymous-data-logger/requirements.txt index a8ed785..d15ce5a 100644 --- a/source/anonymous-data-logger/requirements.txt +++ b/source/anonymous-data-logger/requirements.txt @@ -1 +1 @@ -requests==2.26.0 +requests==2.28.1 diff --git a/source/consumer/lambda_handler.py b/source/consumer/lambda_handler.py index 67dcfcd..2b21854 100644 --- a/source/consumer/lambda_handler.py +++ b/source/consumer/lambda_handler.py @@ -1,4 +1,4 @@ -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 from elasticsearch import Elasticsearch, RequestsHttpConnection @@ -773,7 +773,7 @@ def delete_asset_all_indices(es_object, asset_id): body=delete_query ) except Exception as e: - print("Unable to delete from elasticsearch: {es}:".format(es=e)) + print("Unable to delete from elasticsearch: {es}:".format(es=e)) #nosec else: print(delete_request) print("Deleted asset: {asset} from elasticsearch".format(asset=asset_id)) diff --git a/source/consumer/requirements.txt b/source/consumer/requirements.txt index 5fb1852..53b24f2 100644 --- a/source/consumer/requirements.txt +++ b/source/consumer/requirements.txt @@ -1,2 +1,2 @@ -elasticsearch==7.13.4 +elasticsearch==8.6.0 requests-aws4auth==1.1.1 diff --git a/source/website/package.json b/source/website/package.json index 6b9fdde..13c9bce 100755 --- a/source/website/package.json +++ b/source/website/package.json @@ -9,40 +9,40 @@ "deploy": "aws s3 sync --acl public-read --profile mie --delete dist/ s3://[your_website_bucket]" }, "dependencies": { - "aws-amplify": "^3.3.27", - "aws-amplify-vue": "^2.1.5", + "aws-amplify": "3.3.27", + "aws-amplify-vue": "2.1.5", "axios": ">=0.21.4", - "bad-words": "^3.0.4", - "chart.js": "^2.9.4", - "core-js": "^3.14.0", - "dropzone": "^5.7.0", - "jquery": "^3.4.1", - "jwt-decode": "^3.1.2", - "lodash": "^4.17.21", - "register-service-worker": "^1.7.2", - "video.js": "^7.10.2", - "videojs-flash": "^2.2.1", - "videojs-hotkeys": "^0.2.25", - "videojs-markers": "^1.0.1", - "vue": "^2.6.12", - "vue-highlightjs": "^1.3.3", - "vue-router": "^3.5.1", - "vue-video-player": "^5.0.2", - "vuex": "^3.6.2", - "vuex-persistedstate": "^v4.0.0-beta.3" + "bad-words": "3.0.4", + "chart.js": "2.9.4", + "core-js": "3.14.0", + "dropzone": "5.7.0", + "jquery": "3.4.1", + "jwt-decode": "3.1.2", + "lodash": "4.17.21", + "register-service-worker": "1.7.2", + "video.js": "7.10.2", + "videojs-flash": "2.2.1", + "videojs-hotkeys": "0.2.25", + "videojs-markers": "1.0.1", + "vue": "2.6.12", + "vue-highlightjs": "1.3.3", + "vue-router": "3.5.1", + "vue-video-player": "5.0.2", + "vuex": "3.6.2", + "vuex-persistedstate": "v4.0.0-beta.3" }, "devDependencies": { - "@vue/cli-plugin-babel": "^4.5.11", - "@vue/cli-plugin-eslint": "^4.5.11", - "@vue/cli-plugin-pwa": "^4.5.11", - "@vue/cli-service": "^3.12.1", - "babel-eslint": "^10.0.3", - "bootstrap": "^4.6.0", - "bootstrap-vue": "^2.21.2", - "eslint": "^6.8.0", - "eslint-plugin-vue": "^7.5.0", - "vue-template-compiler": "^2.6.12", - "webpack-subresource-integrity": "^1.5.2" + "@vue/cli-plugin-babel": "4.5.11", + "@vue/cli-plugin-eslint": "4.5.11", + "@vue/cli-plugin-pwa": "4.5.11", + "@vue/cli-service": "3.12.1", + "babel-eslint": "10.0.3", + "bootstrap": "4.6.0", + "bootstrap-vue": "2.21.2", + "eslint": "6.8.0", + "eslint-plugin-vue": "7.5.0", + "vue-template-compiler": "2.6.12", + "webpack-subresource-integrity": "1.5.2" }, "eslintConfig": { "root": false,