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

Alibaba Cloud

TMA-ALIBABA-5.3

Ensure that logging is enabled for OSS buckets

СредњаНиво 1Аутоматскаalibaba

Опис

OSS Bucket Access Logging generates a log that contains access records for each request made to your OSS bucket. An access log record contains details about the request, such as the request type, the resources specified in the request worked, and the time and date the request was processed. By enabling OSS bucket logging on target OSS buckets, it is possible to capture all events which may affect objects within an target buckets. aliyun oss logging --method get must return a BucketLoggingStatus with a TargetBucket for every bucket. 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 oss ls -s 2>/dev/null) || exit 1
bs=$(printf '%s\n' "$out" | grep -o 'oss://[^[:space:]]*' | sed 's#^oss://##; s#/$##')
bad=0
for b in $bs; do
  lg=$(aliyun oss logging --method get "oss://$b" 2>/dev/null) || exit 1
  printf '%s\n' "$lg" | grep -q '<TargetBucket>' || { echo "access logging off: $b"; bad=1; }
done
[ "$bad" -eq 0 ] && echo compliant
Очекивани излаз
compliant

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

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

aliyun oss logging --method put oss://<bucket> oss://<log-bucket>/<prefix>/ for each listed bucket (or OSS console > bucket > Logging > Enable).

Својства

Оперативни системи
Било који
Ознаке
alibabaoss
Референца
CIS Alibaba Cloud Foundation Benchmark v2.0.1 - 5.3 Ensure that logging is enabled for OSS buckets

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

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

shell
tmaegis scan --target alibaba