In ec2-instance-connect/eic_harvest_hostkeys line 21:
elif [ $(cat /sys/hypervisor/uuid | cut -c1-3) != "ec2" ] ; then
^-- SC2046: Quote this to prevent word splitting.
^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
In ec2-instance-connect/eic_harvest_hostkeys line 35:
printf "$2" | openssl dgst -binary -hex -sha256 -mac HMAC -macopt hexkey:$1 | sed 's/.* //'
^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo". ^-- SC2086: Double quote to prevent globbing and word splitting.
In ec2-instance-connect/eic_harvest_hostkeys line 41:
local base=$(echo -n "AWS4${1}" | od -A n -t x1 | sed ':a;N;$!ba;s/[\n ]//g')
^-- SC2155: Declare and assign separately to avoid masking return values.
In ec2-instance-connect/eic_harvest_hostkeys line 42:
local kdate=$(sign "${base}" $2)
^-- SC2155: Declare and assign separately to avoid masking return values. ^-- SC2086: Double quote to prevent globbing and word splitting.
In ec2-instance-connect/eic_harvest_hostkeys line 43:
local kregion=$(sign "${kdate}" $3)
^-- SC2155: Declare and assign separately to avoid masking return values. ^-- SC2086: Double quote to prevent globbing and word splitting.
In ec2-instance-connect/eic_harvest_hostkeys line 44:
local kservice=$(sign "${kregion}" $4)
^-- SC2155: Declare and assign separately to avoid masking return values. ^-- SC2086: Double quote to prevent globbing and word splitting.
In ec2-instance-connect/eic_harvest_hostkeys line 60:
key=$(cat $file | awk '{$1=$1};1') ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
In ec2-instance-connect/eic_harvest_hostkeys line 61: keys="${keys:+${keys},}\"${key}\"" ^-- SC2089: Quotes/backslashes will be treated literally. Use an array.
In ec2-instance-connect/eic_harvest_hostkeys line 66:
trap "rm -rf '${userpath}'" EXIT
^-- SC2064: Use single quotes, otherwise this expands now rather than when signalled.
In ec2-instance-connect/eic_harvest_hostkeys line 69:
chmod 700 $userpath
^-- SC2086: Double quote to prevent globbing and word splitting.
In ec2-instance-connect/eic_harvest_hostkeys line 73:
if [ $? -ne 0 ]
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In ec2-instance-connect/eic_harvest_hostkeys line 86:
if [ $? -ne 0 ]
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In ec2-instance-connect/eic_harvest_hostkeys line 107:
hostkeys=$(echo ${keys:?})
^-- SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
^-- SC2090: Quotes/backslashes in this variable will not be respected.
^-- SC2086: Double quote to prevent globbing and word splitting.
In ec2-instance-connect/eic_harvest_hostkeys line 118:
if [ $? -ne 0 ] ; then
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In ec2-instance- connect/ eic_harvest_ hostkeys line 21: /uuid | cut -c1-3) != "ec2" ] ; then
elif [ $(cat /sys/hypervisor
^-- SC2046: Quote this to prevent word splitting.
^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
In ec2-instance- connect/ eic_harvest_ hostkeys line 35:
^-- SC2086: Double quote to prevent globbing and word splitting.
printf "$2" | openssl dgst -binary -hex -sha256 -mac HMAC -macopt hexkey:$1 | sed 's/.* //'
^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
In ec2-instance- connect/ eic_harvest_ hostkeys line 41:
local base=$(echo -n "AWS4${1}" | od -A n -t x1 | sed ':a;N;$!ba;s/[\n ]//g')
^-- SC2155: Declare and assign separately to avoid masking return values.
In ec2-instance- connect/ eic_harvest_ hostkeys line 42:
^- - SC2086: Double quote to prevent globbing and word splitting.
local kdate=$(sign "${base}" $2)
^-- SC2155: Declare and assign separately to avoid masking return values.
In ec2-instance- connect/ eic_harvest_ hostkeys line 43:
^-- SC2086: Double quote to prevent globbing and word splitting.
local kregion=$(sign "${kdate}" $3)
^-- SC2155: Declare and assign separately to avoid masking return values.
In ec2-instance- connect/ eic_harvest_ hostkeys line 44:
^-- SC2086: Double quote to prevent globbing and word splitting.
local kservice=$(sign "${kregion}" $4)
^-- SC2155: Declare and assign separately to avoid masking return values.
In ec2-instance- connect/ eic_harvest_ hostkeys line 51: 169.254. 169.254/ latest/ meta-data/ identity- credentials/ ec2/security- credentials/ ec2-instance/") -ne 200 ]
if [ $(eval "${curl_cmd} -o /dev/null -I -w %{http_code} http://
^-- SC2046: Quote this to prevent word splitting.
In ec2-instance- connect/ eic_harvest_ hostkeys line 60:
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
key=$(cat $file | awk '{$1=$1};1')
In ec2-instance- connect/ eic_harvest_ hostkeys line 61:
keys=" ${keys: +${keys} ,}\"${key} \""
^-- SC2089: Quotes/backslashes will be treated literally. Use an array.
In ec2-instance- connect/ eic_harvest_ hostkeys line 66:
trap "rm -rf '${userpath}'" EXIT
^-- SC2064: Use single quotes, otherwise this expands now rather than when signalled.
In ec2-instance- connect/ eic_harvest_ hostkeys line 69:
chmod 700 $userpath
^-- SC2086: Double quote to prevent globbing and word splitting.
In ec2-instance- connect/ eic_harvest_ hostkeys line 73:
if [ $? -ne 0 ]
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In ec2-instance- connect/ eic_harvest_ hostkeys line 86:
if [ $? -ne 0 ]
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In ec2-instance- connect/ eic_harvest_ hostkeys line 107:
hostkeys=$(echo ${keys:?})
^-- SC2116: Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
^-- SC2090: Quotes/backslashes in this variable will not be respected.
^-- SC2086: Double quote to prevent globbing and word splitting.
In ec2-instance- connect/ eic_harvest_ hostkeys line 118:
if [ $? -ne 0 ] ; then
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.