audit-labs/audit-tools

A collection of scripts, queries, and other goodies you can use in an audit. audit automation compliance evidence scripts

Commit 2c42e8adb4

2c42e8adb42fa9c03e28c06ea214d865831f1253

parent: 6d19a76942

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-01 05:43 UTC

Redact AWS account ID in README samples; quote shell expansions

Ref #1

Layout: unified · split

applications/aws/README.md +5 −5
@@ -80,7 +80,7 @@ chmod +x aws_iam_users.sh
8080
8181``` text
8282Fetching IAM Identity Center and Account details...
83Successfully found Account 'cmc' with ID: 214941490075
83Successfully found Account 'cmc' with ID: 123456789012
8484---
8585Step 2: Finding all permission sets provisioned to 'cmc'...
8686Found provisioned permission sets. Now checking assignments for each...
@@ -190,9 +190,9 @@ This will produce a JSON file as the output, with both metadata and the password
190190 "aws_profile": "default",
191191 "aws_region": "eu-west-1",
192192 "aws_caller_identity": {
193 "UserId": "214941490075",
194 "Account": "214941490075",
195 "Arn": "arn:aws:iam::214941490075:root"
193 "UserId": "123456789012",
194 "Account": "123456789012",
195 "Arn": "arn:aws:iam::123456789012:root"
196196 }
197197 },
198198 "PasswordPolicy": {
@@ -262,7 +262,7 @@ Summary:
262262# working_directory: /home/cloudshell-user
263263# aws_profile: default
264264# aws_region: eu-west-1
265"# aws_caller_identity: {'UserId': '214941490075', 'Account': '214941490075', 'Arn': 'arn:aws:iam::214941490075:root'}"
265"# aws_caller_identity: {'UserId': '123456789012', 'Account': '123456789012', 'Arn': 'arn:aws:iam::123456789012:root'}"
266266
267267Rule#,Policy‑Item,Expected,Actual,Result
2682681,Minimum password length,8,8,PASS
applications/aws/aws_iam_users.sh +1 −1
@@ -87,7 +87,7 @@ for PS_ARN in $PROVISIONED_SETS_ARN; do
8787
8888 # Now process each assignment found for this permission set
8989 for row in $(echo "${ACCOUNT_ASSIGNMENTS}" | jq -r '.[] | @base64'); do
90 _jq() { echo ${row} | base64 --decode | jq -r ${1}; return 0; }
90 _jq() { echo "${row}" | base64 --decode | jq -r "${1}"; return 0; }
9191 PRINCIPAL_TYPE=$(_jq '.PrincipalType')
9292 PRINCIPAL_ID=$(_jq '.PrincipalId')
9393
os/linux/report/linux.sh +1 −1
@@ -21,7 +21,7 @@ log_file_content() {
2121 FILE_NAME=$(basename "$FILE_PATH")
2222 echo "## $FILE_NAME" >> "$REPORT_FILE"
2323 if [[ -f $FILE_PATH ]]; then
24 if $TRIM_COMMENTS; then
24 if "$TRIM_COMMENTS"; then
2525 # Trim comments (lines starting with # or empty lines)
2626 grep -vE '^\s*#|^\s*$' "$FILE_PATH" >> "$REPORT_FILE"
2727 else