Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Update to version v2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
eggoynes committed Jan 12, 2023
1 parent 976b4ca commit 2a054c9
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 47 deletions.
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
13 changes: 7 additions & 6 deletions deployment/build-s3-dist.sh
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -78,6 +78,7 @@ parse_params() {
# default values of variables set from params
flag=0
param=''
profile=default

while :; do
case "${1-}" in
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions source/anonymous-data-logger/lib/metrics.py
Original file line number Diff line number Diff line change
@@ -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. #
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion source/anonymous-data-logger/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
requests==2.26.0
requests==2.28.1
4 changes: 2 additions & 2 deletions source/consumer/lambda_handler.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion source/consumer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elasticsearch==7.13.4
elasticsearch==8.6.0
requests-aws4auth==1.1.1
62 changes: 31 additions & 31 deletions source/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2a054c9

Please sign in to comment.