Skip to content

Commit 1d4f676

Browse files
authoredFeb 27, 2024
chore(*): remove sample access key from SDK documentation (#102)
1 parent d04d2a8 commit 1d4f676

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
 

‎README.md

+3
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ Release process:
182182
[94](https://github.com/Kong/lua-resty-aws/pull/94)
183183
- fix: fix the bug of missing boolean type with a value of false in the generated request body
184184
[100](https://github.com/Kong/lua-resty-aws/pull/100)
185+
- security: remove the documentation entry that contains a sample access key from AWS SDK. This
186+
avoids false postive vulnerability report.
187+
[102](https://github.com/Kong/lua-resty-aws/pull/102)
185188

186189
### 1.3.6 (25-Dec-2023)
187190

‎update_api_files.sh

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SDK_VERSION_TAG=v2.751.0
1111
# ----------- nothing to customize below -----------
1212
TARGET=./src/resty/aws/raw-api
1313
SOURCE=./delete-me
14+
TFILE=$(mktemp)
1415
set -e
1516
pushd "$(dirname "$(realpath "$0")")" > /dev/null
1617

@@ -74,6 +75,9 @@ echo "]===]))" >> "$FILENAME"
7475
# Copy the individual API files
7576
for f in "${file_list[@]}"; do
7677
source_file=$SOURCE/apis/$f.normal.json
78+
# remove example keys from documentation to prevent security reports from being triggered
79+
jq 'walk( if (type == "object") and has("documentation") and (.documentation|contains("wJalrXUtnFEMI")) then del(.documentation) else . end )' "$source_file" >| "$TFILE"
80+
mv -f "$TFILE" "$source_file"; touch "$TFILE"
7781
# replace . with - since . can't be in a Lua module name
7882
target_file=$TARGET/${f//./-}.lua
7983
echo "adding: $target_file"

0 commit comments

Comments
 (0)