Skip to content

Commit

Permalink
chore(*): remove sample access key from SDK documentation (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
outsinre authored Feb 27, 2024
1 parent d04d2a8 commit 1d4f676
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ Release process:
[94](https://github.com/Kong/lua-resty-aws/pull/94)
- fix: fix the bug of missing boolean type with a value of false in the generated request body
[100](https://github.com/Kong/lua-resty-aws/pull/100)
- security: remove the documentation entry that contains a sample access key from AWS SDK. This
avoids false postive vulnerability report.
[102](https://github.com/Kong/lua-resty-aws/pull/102)

### 1.3.6 (25-Dec-2023)

Expand Down
4 changes: 4 additions & 0 deletions update_api_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SDK_VERSION_TAG=v2.751.0
# ----------- nothing to customize below -----------
TARGET=./src/resty/aws/raw-api
SOURCE=./delete-me
TFILE=$(mktemp)
set -e
pushd "$(dirname "$(realpath "$0")")" > /dev/null

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

0 comments on commit 1d4f676

Please sign in to comment.