Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): remove sample access key from SDK documentation #102

Merged
merged 8 commits into from
Feb 27, 2024
Merged
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
Loading