TMAegis
Више правила за alibaba

Alibaba Cloud

TMA-ALIBABA-2.2

Ensure the OSS used to store ActionTrail logs is not publicly accessible

ВисокаНиво 1Аутоматскаalibaba

Опис

ActionTrail logs a record of every API call made in your Alibaba Cloud account. These logs file are stored in an OSS bucket. It is recommended that the access control list (ACL) of the OSS bucket, which ActionTrail logs to, shall prevent public access to the ActionTrail logs. Allowing public access to ActionTrail log content may aid an adversary in identifying weaknesses in the affected account's use or configuration. Every OSS bucket that a trail delivers to (OssBucketName) must have ACL private (aliyun oss stat). Read-only aliyun CLI calls; credentials and default region come from the CLI's normal profile (aliyun configure, ~/.aliyun/config.json or ALIBABA_CLOUD_* environment variables). JSON output is parsed with sed/awk. A missing CLI or credential fails the check.

Како се проверава

Метод провере: Команда љуске

shell
out=$(aliyun actiontrail DescribeTrails 2>/dev/null) || exit 1
bs=$(printf '%s\n' "$out" | sed -n 's/.*"OssBucketName"[[:space:]]*:[[:space:]]*"\([^"]\{1,\}\)".*/\1/p' | sort -u)
bad=0
for b in $bs; do
  st=$(aliyun oss stat "oss://$b" 2>/dev/null) || exit 1
  acl=$(printf '%s\n' "$st" | sed -n 's/^[[:space:]]*ACL[[:space:]]*:[[:space:]]*\([^[:space:]]*\).*/\1/p' | head -n 1)
  [ "$acl" = private ] || { echo "trail bucket ACL $acl: $b"; bad=1; }
done
[ "$bad" -eq 0 ] && echo compliant
Очекивани излаз
compliant

Како се исправља

Метод исправке: Смерница или закрпа инфраструктуре

aliyun oss set-acl oss://<bucket> private -b for each listed bucket and review its bucket policy for anonymous grants.

Својства

Оперативни системи
Било који
Ознаке
alibabalogging
Референца
CIS Alibaba Cloud Foundation Benchmark v2.0.1 - 2.2 Ensure the OSS used to store ActionTrail logs is not publicly accessible

Проверите овај рачунар

Покрените ово на рачунару за који имате дозволу за проверу. Скенирање ради у режиму само за читање.

shell
tmaegis scan --target alibaba