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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
outsinre marked this conversation as resolved.
Show resolved Hide resolved
[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"
outsinre marked this conversation as resolved.
Show resolved Hide resolved
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