diff --git a/.github/workflows/api-pull-request.yml b/.github/workflows/api-pull-request.yml
index 675c0ae500..604c878bf6 100644
--- a/.github/workflows/api-pull-request.yml
+++ b/.github/workflows/api-pull-request.yml
@@ -85,6 +85,14 @@ jobs:
api/README.md
api/mkdocs.yml
+ - name: Replace @master with current branch in pyproject.toml
+ working-directory: ./api
+ if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
+ run: |
+ BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
+ echo "Using branch: $BRANCH_NAME"
+ sed -i "s|@master|@$BRANCH_NAME|g" pyproject.toml
+
- name: Install poetry
working-directory: ./api
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
@@ -92,6 +100,12 @@ jobs:
python -m pip install --upgrade pip
pipx install poetry==2.1.1
+ - name: Update poetry.lock after the branch name change
+ working-directory: ./api
+ if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
+ run: |
+ poetry lock
+
- name: Set up Python ${{ matrix.python-version }}
if: steps.are-non-ignored-files-changed.outputs.any_changed == 'true'
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
diff --git a/.github/workflows/pull-request-merged.yml b/.github/workflows/pull-request-merged.yml
index 500ca5d0c4..090950f79b 100644
--- a/.github/workflows/pull-request-merged.yml
+++ b/.github/workflows/pull-request-merged.yml
@@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Set short git commit SHA
id: vars
@@ -30,5 +32,6 @@ jobs:
"PROWLER_COMMIT_SHORT_SHA": "${{ env.SHORT_SHA }}",
"PROWLER_PR_TITLE": "${{ github.event.pull_request.title }}",
"PROWLER_PR_LABELS": ${{ toJson(github.event.pull_request.labels.*.name) }},
- "PROWLER_PR_BODY": ${{ toJson(github.event.pull_request.body) }}
+ "PROWLER_PR_BODY": ${{ toJson(github.event.pull_request.body) }},
+ "PROWLER_PR_URL":${{ toJson(github.event.pull_request.html_url) }}
}'
diff --git a/.github/workflows/sdk-bump-version.yml b/.github/workflows/sdk-bump-version.yml
index bc28afa1e4..e5e5dba4e0 100644
--- a/.github/workflows/sdk-bump-version.yml
+++ b/.github/workflows/sdk-bump-version.yml
@@ -25,17 +25,31 @@ jobs:
MINOR_VERSION=${BASH_REMATCH[2]}
FIX_VERSION=${BASH_REMATCH[3]}
+ # Export version components to GitHub environment
+ echo "MAJOR_VERSION=${MAJOR_VERSION}" >> "${GITHUB_ENV}"
+ echo "MINOR_VERSION=${MINOR_VERSION}" >> "${GITHUB_ENV}"
+ echo "FIX_VERSION=${FIX_VERSION}" >> "${GITHUB_ENV}"
+
if (( MAJOR_VERSION == 5 )); then
if (( FIX_VERSION == 0 )); then
echo "Minor Release: $PROWLER_VERSION"
+ # Set up next minor version for master
BUMP_VERSION_TO=${MAJOR_VERSION}.$((MINOR_VERSION + 1)).${FIX_VERSION}
echo "BUMP_VERSION_TO=${BUMP_VERSION_TO}" >> "${GITHUB_ENV}"
TARGET_BRANCH=${BASE_BRANCH}
echo "TARGET_BRANCH=${TARGET_BRANCH}" >> "${GITHUB_ENV}"
+ # Set up patch version for version branch
+ PATCH_VERSION_TO=${MAJOR_VERSION}.${MINOR_VERSION}.1
+ echo "PATCH_VERSION_TO=${PATCH_VERSION_TO}" >> "${GITHUB_ENV}"
+
+ VERSION_BRANCH=v${MAJOR_VERSION}.${MINOR_VERSION}
+ echo "VERSION_BRANCH=${VERSION_BRANCH}" >> "${GITHUB_ENV}"
+
echo "Bumping to next minor version: ${BUMP_VERSION_TO} in branch ${TARGET_BRANCH}"
+ echo "Bumping to next patch version: ${PATCH_VERSION_TO} in branch ${VERSION_BRANCH}"
else
echo "Patch Release: $PROWLER_VERSION"
@@ -74,7 +88,6 @@ jobs:
git --no-pager diff
-
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
@@ -92,3 +105,41 @@ jobs:
### License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
+
+ - name: Handle patch version for minor release
+ if: env.FIX_VERSION == '0'
+ run: |
+ echo "Using PROWLER_VERSION=$PROWLER_VERSION"
+ echo "Using PATCH_VERSION_TO=$PATCH_VERSION_TO"
+
+ set -e
+
+ echo "Bumping version in pyproject.toml ..."
+ sed -i "s|version = \"${PROWLER_VERSION}\"|version = \"${PATCH_VERSION_TO}\"|" pyproject.toml
+
+ echo "Bumping version in prowler/config/config.py ..."
+ sed -i "s|prowler_version = \"${PROWLER_VERSION}\"|prowler_version = \"${PATCH_VERSION_TO}\"|" prowler/config/config.py
+
+ echo "Bumping version in .env ..."
+ sed -i "s|NEXT_PUBLIC_PROWLER_RELEASE_VERSION=v${PROWLER_VERSION}|NEXT_PUBLIC_PROWLER_RELEASE_VERSION=v${PATCH_VERSION_TO}|" .env
+
+ git --no-pager diff
+
+ - name: Create Pull Request for patch version
+ if: env.FIX_VERSION == '0'
+ uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
+ with:
+ author: prowler-bot <179230569+prowler-bot@users.noreply.github.com>
+ token: ${{ secrets.PROWLER_BOT_ACCESS_TOKEN }}
+ base: ${{ env.VERSION_BRANCH }}
+ commit-message: "chore(release): Bump version to v${{ env.PATCH_VERSION_TO }}"
+ branch: "version-bump-to-v${{ env.PATCH_VERSION_TO }}"
+ title: "chore(release): Bump version to v${{ env.PATCH_VERSION_TO }}"
+ body: |
+ ### Description
+
+ Bump Prowler version to v${{ env.PATCH_VERSION_TO }}
+
+ ### License
+
+ By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
diff --git a/.github/workflows/sdk-pull-request.yml b/.github/workflows/sdk-pull-request.yml
index 65986ea7fa..1fa3e9c592 100644
--- a/.github/workflows/sdk-pull-request.yml
+++ b/.github/workflows/sdk-pull-request.yml
@@ -115,6 +115,7 @@ jobs:
files: |
./prowler/providers/aws/**
./tests/providers/aws/**
+ .poetry.lock
- name: AWS - Test
if: steps.aws-changed-files.outputs.any_changed == 'true'
@@ -129,6 +130,7 @@ jobs:
files: |
./prowler/providers/azure/**
./tests/providers/azure/**
+ .poetry.lock
- name: Azure - Test
if: steps.azure-changed-files.outputs.any_changed == 'true'
@@ -143,6 +145,7 @@ jobs:
files: |
./prowler/providers/gcp/**
./tests/providers/gcp/**
+ .poetry.lock
- name: GCP - Test
if: steps.gcp-changed-files.outputs.any_changed == 'true'
@@ -157,12 +160,28 @@ jobs:
files: |
./prowler/providers/kubernetes/**
./tests/providers/kubernetes/**
+ .poetry.lock
- name: Kubernetes - Test
if: steps.kubernetes-changed-files.outputs.any_changed == 'true'
run: |
poetry run pytest -n auto --cov=./prowler/providers/kubernetes --cov-report=xml:kubernetes_coverage.xml tests/providers/kubernetes
+ # Test GitHub
+ - name: GitHub - Check if any file has changed
+ id: github-changed-files
+ uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
+ with:
+ files: |
+ ./prowler/providers/github/**
+ ./tests/providers/github/**
+ .poetry.lock
+
+ - name: GitHub - Test
+ if: steps.github-changed-files.outputs.any_changed == 'true'
+ run: |
+ poetry run pytest -n auto --cov=./prowler/providers/github --cov-report=xml:github_coverage.xml tests/providers/github
+
# Test NHN
- name: NHN - Check if any file has changed
id: nhn-changed-files
@@ -171,6 +190,7 @@ jobs:
files: |
./prowler/providers/nhn/**
./tests/providers/nhn/**
+ .poetry.lock
- name: NHN - Test
if: steps.nhn-changed-files.outputs.any_changed == 'true'
@@ -185,6 +205,7 @@ jobs:
files: |
./prowler/providers/m365/**
./tests/providers/m365/**
+ .poetry.lock
- name: M365 - Test
if: steps.m365-changed-files.outputs.any_changed == 'true'
@@ -210,4 +231,4 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: prowler
- files: ./aws_coverage.xml,./azure_coverage.xml,./gcp_coverage.xml,./kubernetes_coverage.xml,./nhn_coverage.xml,./m365_coverage.xml,./lib_coverage.xml,./config_coverage.xml
+ files: ./aws_coverage.xml,./azure_coverage.xml,./gcp_coverage.xml,./kubernetes_coverage.xml,./github_coverage.xml,./nhn_coverage.xml,./m365_coverage.xml,./lib_coverage.xml,./config_coverage.xml
diff --git a/.gitignore b/.gitignore
index 17a6e736b5..d38969db40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,9 @@ junit-reports/
# VSCode files
.vscode/
+# Cursor files
+.cursorignore
+
# Terraform
.terraform*
*.tfstate
diff --git a/README.md b/README.md
index fa89204448..7fef33c6ae 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
- Prowler Open Source is as dynamic and adaptable as the environment they’re meant to protect. Trusted by the leaders in security.
+ Prowler Open Source is as dynamic and adaptable as the environment it secures. It is trusted by the industry leaders to uphold the highest standards in security.
Learn more at prowler.com
@@ -43,15 +43,29 @@
# Description
-**Prowler** is an Open Source security tool to perform AWS, Azure, Google Cloud and Kubernetes security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness, and also remediations! We have Prowler CLI (Command Line Interface) that we call Prowler Open Source and a service on top of it that we call Prowler Cloud.
+**Prowler** is an open-source security tool designed to assess and enforce security best practices across AWS, Azure, Google Cloud, and Kubernetes. It supports tasks such as security audits, incident response, continuous monitoring, system hardening, forensic readiness, and remediation processes.
+
+Prowler includes hundreds of built-in controls to ensure compliance with standards and frameworks, including:
+
+- **Industry Standards:** CIS, NIST 800, NIST CSF, and CISA
+- **Regulatory Compliance and Governance:** RBI, FedRAMP, and PCI-DSS
+- **Frameworks for Sensitive Data and Privacy:** GDPR, HIPAA, and FFIEC
+- **Frameworks for Organizational Governance and Quality Control:** SOC2 and GXP
+- **AWS-Specific Frameworks:** AWS Foundational Technical Review (FTR) and AWS Well-Architected Framework (Security Pillar)
+- **National Security Standards:** ENS (Spanish National Security Scheme)
+- **Custom Security Frameworks:** Tailored to your needs
+
+## Prowler CLI and Prowler Cloud
+
+Prowler offers a Command Line Interface (CLI), known as Prowler Open Source, and an additional service built on top of it, called Prowler Cloud.
## Prowler App
-Prowler App is a web application that allows you to run Prowler in your cloud provider accounts and visualize the results in a user-friendly interface.
+Prowler App is a web-based application that simplifies running Prowler across your cloud provider accounts. It provides a user-friendly interface to visualize the results and streamline your security assessments.

->More details at [Prowler App Documentation](https://docs.prowler.com/projects/prowler-open-source/en/latest/#prowler-app-installation)
+>For more details, refer to the [Prowler App Documentation](https://docs.prowler.com/projects/prowler-open-source/en/latest/#prowler-app-installation)
## Prowler CLI
@@ -60,6 +74,7 @@ prowler
```

+
## Prowler Dashboard
```console
@@ -67,7 +82,7 @@ prowler dashboard
```

-It contains hundreds of controls covering CIS, NIST 800, NIST CSF, CISA, RBI, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, AWS Well-Architected Framework Security Pillar, AWS Foundational Technical Review (FTR), ENS (Spanish National Security Scheme) and your custom security frameworks.
+# Prowler at a Glance
| Provider | Checks | Services | [Compliance Frameworks](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/compliance/) | [Categories](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/misc/#categories) |
|---|---|---|---|---|
@@ -75,18 +90,20 @@ It contains hundreds of controls covering CIS, NIST 800, NIST CSF, CISA, RBI, Fe
| GCP | 79 | 13 | 7 | 3 |
| Azure | 140 | 18 | 8 | 3 |
| Kubernetes | 83 | 7 | 4 | 7 |
-| M365 | 44 | 2 | 1 | 0 |
+| GitHub | 3 | 2 | 1 | 0 |
+| M365 | 44 | 2 | 2 | 0 |
| NHN (Unofficial) | 6 | 2 | 1 | 0 |
-> You can list the checks, services, compliance frameworks and categories with `prowler --list-checks`, `prowler --list-services`, `prowler --list-compliance` and `prowler --list-categories`.
+> Use the following commands to list Prowler's available checks, services, compliance frameworks, and categories: `prowler --list-checks`, `prowler --list-services`, `prowler --list-compliance` and `prowler --list-categories`.
# 💻 Installation
## Prowler App
-Prowler App can be installed in different ways, depending on your environment:
+Installing Prowler App
+Prowler App offers flexible installation methods tailored to various environments:
-> See how to use Prowler App in the [Prowler App Usage Guide](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/prowler-app/).
+> For detailed instructions on using Prowler App, refer to the [Prowler App Usage Guide](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/prowler-app/).
### Docker Compose
@@ -102,8 +119,16 @@ curl -LO https://raw.githubusercontent.com/prowler-cloud/prowler/refs/heads/mast
docker compose up -d
```
-> Containers are built for `linux/amd64`. If your workstation's architecture is different, please set `DOCKER_DEFAULT_PLATFORM=linux/amd64` in your environment or use the `--platform linux/amd64` flag in the docker command.
-> Enjoy Prowler App at http://localhost:3000 by signing up with your email and password.
+> Containers are built for `linux/amd64`.
+
+### Configuring Your Workstation for Prowler App
+
+If your workstation's architecture is incompatible, you can resolve this by:
+
+- **Setting the environment variable**: `DOCKER_DEFAULT_PLATFORM=linux/amd64`
+- **Using the following flag in your Docker command**: `--platform linux/amd64`
+
+> Once configured, access the Prowler App at http://localhost:3000. Sign up using your email and password to get started.
### From GitHub
@@ -129,12 +154,12 @@ python manage.py migrate --database admin
gunicorn -c config/guniconf.py config.wsgi:application
```
> [!IMPORTANT]
-> Starting from Poetry v2.0.0, `poetry shell` has been deprecated in favor of `poetry env activate`.
+> As of Poetry v2.0.0, the `poetry shell` command has been deprecated. Use `poetry env activate` instead for environment activation.
>
-> If your poetry version is below 2.0.0 you must keep using `poetry shell` to activate your environment.
-> In case you have any doubts, consult the Poetry environment activation guide: https://python-poetry.org/docs/managing-environments/#activating-the-environment
+> If your Poetry version is below v2.0.0, continue using `poetry shell` to activate your environment.
+> For further guidance, refer to the Poetry Environment Activation Guide https://python-poetry.org/docs/managing-environments/#activating-the-environment.
-> Now, you can access the API documentation at http://localhost:8080/api/v1/docs.
+> After completing the setup, access the API documentation at http://localhost:8080/api/v1/docs.
**Commands to run the API Worker**
@@ -172,29 +197,31 @@ npm run build
npm start
```
-> Enjoy Prowler App at http://localhost:3000 by signing up with your email and password.
+> Once configured, access the Prowler App at http://localhost:3000. Sign up using your email and password to get started.
## Prowler CLI
### Pip package
-Prowler CLI is available as a project in [PyPI](https://pypi.org/project/prowler-cloud/), thus can be installed using pip with Python > 3.9.1, < 3.13:
+Prowler CLI is available as a project in [PyPI](https://pypi.org/project/prowler-cloud/). Consequently, it can be installed using pip with Python >3.9.1, <3.13:
```console
pip install prowler
prowler -v
```
->More details at [https://docs.prowler.com](https://docs.prowler.com/projects/prowler-open-source/en/latest/#prowler-cli-installation)
+>For further guidance, refer to [https://docs.prowler.com](https://docs.prowler.com/projects/prowler-open-source/en/latest/#prowler-cli-installation)
### Containers
-The available versions of Prowler CLI are the following:
+**Available Versions of Prowler CLI**
-- `latest`: in sync with `master` branch (bear in mind that it is not a stable version)
-- `v4-latest`: in sync with `v4` branch (bear in mind that it is not a stable version)
-- `v3-latest`: in sync with `v3` branch (bear in mind that it is not a stable version)
-- `` (release): you can find the releases [here](https://github.com/prowler-cloud/prowler/releases), those are stable releases.
-- `stable`: this tag always point to the latest release.
-- `v4-stable`: this tag always point to the latest release for v4.
-- `v3-stable`: this tag always point to the latest release for v3.
+The following versions of Prowler CLI are available, depending on your requirements:
+
+- `latest`: Synchronizes with the `master` branch. Note that this version is not stable.
+- `v4-latest`: Synchronizes with the `v4` branch. Note that this version is not stable.
+- `v3-latest`: Synchronizes with the `v3` branch. Note that this version is not stable.
+- `` (release): Stable releases corresponding to specific versions. You can find the complete list of releases [here](https://github.com/prowler-cloud/prowler/releases).
+- `stable`: Always points to the latest release.
+- `v4-stable`: Always points to the latest release for v4.
+- `v3-stable`: Always points to the latest release for v3.
The container images are available here:
- Prowler CLI:
@@ -206,7 +233,7 @@ The container images are available here:
### From GitHub
-Python > 3.9.1, < 3.13 is required with pip and poetry:
+Python >3.9.1, <3.13 is required with pip and Poetry:
``` console
git clone https://github.com/prowler-cloud/prowler
@@ -216,25 +243,46 @@ poetry install
python prowler-cli.py -v
```
> [!IMPORTANT]
-> Starting from Poetry v2.0.0, `poetry shell` has been deprecated in favor of `poetry env activate`.
->
-> If your poetry version is below 2.0.0 you must keep using `poetry shell` to activate your environment.
-> In case you have any doubts, consult the Poetry environment activation guide: https://python-poetry.org/docs/managing-environments/#activating-the-environment
+> To clone Prowler on Windows, configure Git to support long file paths by running the following command: `git config core.longpaths true`.
-> If you want to clone Prowler from Windows, use `git config core.longpaths true` to allow long file paths.
-# 📐✏️ High level architecture
+> [!IMPORTANT]
+> As of Poetry v2.0.0, the `poetry shell` command has been deprecated. Use `poetry env activate` instead for environment activation.
+>
+> If your Poetry version is below v2.0.0, continue using `poetry shell` to activate your environment.
+> For further guidance, refer to the Poetry Environment Activation Guide https://python-poetry.org/docs/managing-environments/#activating-the-environment.
+
+# ✏️ High level architecture
## Prowler App
-The **Prowler App** consists of three main components:
+**Prowler App** is composed of three key components:
-- **Prowler UI**: A user-friendly web interface for running Prowler and viewing results, powered by Next.js.
-- **Prowler API**: The backend API that executes Prowler scans and stores the results, built with Django REST Framework.
-- **Prowler SDK**: A Python SDK that integrates with the Prowler CLI for advanced functionality.
+- **Prowler UI**: A web-based interface, built with Next.js, providing a user-friendly experience for executing Prowler scans and visualizing results.
+- **Prowler API**: A backend service, developed with Django REST Framework, responsible for running Prowler scans and storing the generated results.
+- **Prowler SDK**: A Python SDK designed to extend the functionality of the Prowler CLI for advanced capabilities.

## Prowler CLI
-You can run Prowler from your workstation, a Kubernetes Job, a Google Compute Engine, an Azure VM, an EC2 instance, Fargate or any other container, CloudShell and many more.
+
+**Running Prowler**
+
+Prowler can be executed across various environments, offering flexibility to meet your needs. It can be run from:
+
+- Your own workstation
+
+- A Kubernetes Job
+
+- Google Compute Engine
+
+- Azure Virtual Machines (VMs)
+
+- Amazon EC2 instances
+
+- AWS Fargate or other container platforms
+
+- CloudShell
+
+And many more environments.

@@ -242,23 +290,36 @@ You can run Prowler from your workstation, a Kubernetes Job, a Google Compute En
## General
- `Allowlist` now is called `Mutelist`.
-- The `--quiet` option has been deprecated, now use the `--status` flag to select the finding's status you want to get from PASS, FAIL or MANUAL.
-- All `INFO` finding's status has changed to `MANUAL`.
-- The CSV output format is common for all the providers.
+- The `--quiet` option has been deprecated. Use the `--status` flag to filter findings based on their status: PASS, FAIL, or MANUAL.
+- All findings with an `INFO` status have been reclassified as `MANUAL`.
+- The CSV output format is standardized across all providers.
-We have deprecated some of our outputs formats:
-- The native JSON is replaced for the JSON [OCSF](https://schema.ocsf.io/) v1.1.0, common for all the providers.
+**Deprecated Output Formats**
+
+The following formats are now deprecated:
+- Native JSON has been replaced with JSON in [OCSF] v1.1.0 format, which is standardized across all providers (https://schema.ocsf.io/).
## AWS
-- Deprecate the AWS flag --sts-endpoint-region since we use AWS STS regional tokens.
-- To send only FAILS to AWS Security Hub, now use either `--send-sh-only-fails` or `--security-hub --status FAIL`.
+
+**AWS Flag Deprecation**
+
+The flag --sts-endpoint-region has been deprecated due to the adoption of AWS STS regional tokens.
+
+**Sending FAIL Results to AWS Security Hub**
+
+- To send only FAILS to AWS Security Hub, use one of the following options: `--send-sh-only-fails` or `--security-hub --status FAIL`.
# 📖 Documentation
-Install, Usage, Tutorials and Developer Guide is at https://docs.prowler.com/
+**Documentation Resources**
+
+For installation instructions, usage details, tutorials, and the Developer Guide, visit https://docs.prowler.com/
# 📃 License
-Prowler is licensed as Apache License 2.0 as specified in each file. You may obtain a copy of the License at
-
+**Prowler License Information**
+
+Prowler is licensed under the Apache License 2.0, as indicated in each file within the repository. Obtaining a Copy of the License
+
+A copy of the License is available at
diff --git a/api/CHANGELOG.md b/api/CHANGELOG.md
index 84aedf43f7..7ecf828e69 100644
--- a/api/CHANGELOG.md
+++ b/api/CHANGELOG.md
@@ -2,12 +2,23 @@
All notable changes to the **Prowler API** are documented in this file.
+## [v1.8.0] (Prowler UNRELEASED)
-## [v1.7.0] (UNRELEASED)
+### Added
+- Added huge improvements to `/findings/metadata` and resource related filters for findings [(#7690)](https://github.com/prowler-cloud/prowler/pull/7690).
+- Added improvements to `/overviews` endpoints [(#7690)](https://github.com/prowler-cloud/prowler/pull/7690).
+- Added new queue to perform backfill background tasks [(#7690)](https://github.com/prowler-cloud/prowler/pull/7690).
+- Added new endpoints to retrieve latest findings and metadata [(#7743)](https://github.com/prowler-cloud/prowler/pull/7743).
+
+---
+
+## [v1.7.0] (Prowler v5.6.0)
### Added
- Added M365 as a new provider [(#7563)](https://github.com/prowler-cloud/prowler/pull/7563).
+- Added a `compliance/` folder and ZIP‐export functionality for all compliance reports.[(#7653)](https://github.com/prowler-cloud/prowler/pull/7653).
+- Added a new API endpoint to fetch and download any specific compliance file by name [(#7653)](https://github.com/prowler-cloud/prowler/pull/7653).
---
diff --git a/api/docker-entrypoint.sh b/api/docker-entrypoint.sh
index 7d7711a321..0dff279d08 100755
--- a/api/docker-entrypoint.sh
+++ b/api/docker-entrypoint.sh
@@ -28,7 +28,7 @@ start_prod_server() {
start_worker() {
echo "Starting the worker..."
- poetry run python -m celery -A config.celery worker -l "${DJANGO_LOGGING_LEVEL:-info}" -Q celery,scans,scan-reports,deletion -E --max-tasks-per-child 1
+ poetry run python -m celery -A config.celery worker -l "${DJANGO_LOGGING_LEVEL:-info}" -Q celery,scans,scan-reports,deletion,backfill -E --max-tasks-per-child 1
}
start_worker_beat() {
diff --git a/api/poetry.lock b/api/poetry.lock
index 975d527172..a71c16b14b 100644
--- a/api/poetry.lock
+++ b/api/poetry.lock
@@ -1469,14 +1469,14 @@ with-social = ["django-allauth[socialaccount] (>=64.0.0)"]
[[package]]
name = "django"
-version = "5.1.7"
+version = "5.1.8"
description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design."
optional = false
python-versions = ">=3.10"
groups = ["main", "dev"]
files = [
- {file = "Django-5.1.7-py3-none-any.whl", hash = "sha256:1323617cb624add820cb9611cdcc788312d250824f92ca6048fda8625514af2b"},
- {file = "Django-5.1.7.tar.gz", hash = "sha256:30de4ee43a98e5d3da36a9002f287ff400b43ca51791920bfb35f6917bfe041c"},
+ {file = "Django-5.1.8-py3-none-any.whl", hash = "sha256:11b28fa4b00e59d0def004e9ee012fefbb1065a5beb39ee838983fd24493ad4f"},
+ {file = "Django-5.1.8.tar.gz", hash = "sha256:42e92a1dd2810072bcc40a39a212b693f94406d0ba0749e68eb642f31dc770b4"},
]
[package.dependencies]
@@ -2237,14 +2237,14 @@ tornado = ["tornado (>=0.2)"]
[[package]]
name = "h11"
-version = "0.14.0"
+version = "0.16.0"
description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
groups = ["main"]
files = [
- {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"},
- {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
+ {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"},
+ {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"},
]
[[package]]
@@ -2277,19 +2277,19 @@ files = [
[[package]]
name = "httpcore"
-version = "1.0.8"
+version = "1.0.9"
description = "A minimal low-level HTTP client."
optional = false
python-versions = ">=3.8"
groups = ["main"]
files = [
- {file = "httpcore-1.0.8-py3-none-any.whl", hash = "sha256:5254cf149bcb5f75e9d1b2b9f729ea4a4b883d1ad7379fc632b727cec23674be"},
- {file = "httpcore-1.0.8.tar.gz", hash = "sha256:86e94505ed24ea06514883fd44d2bc02d90e77e7979c8eb71b90f41d364a1bad"},
+ {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"},
+ {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"},
]
[package.dependencies]
certifi = "*"
-h11 = ">=0.13,<0.15"
+h11 = ">=0.16"
[package.extras]
asyncio = ["anyio (>=4.0,<5.0)"]
@@ -3657,7 +3657,7 @@ tzlocal = "5.3.1"
type = "git"
url = "https://github.com/prowler-cloud/prowler.git"
reference = "master"
-resolved_reference = "0edf19928269b6d42d1c463ab13b90d7c21a65e4"
+resolved_reference = "9828824b737b8deda61f4a6646b54e0ad45033b9"
[[package]]
name = "psutil"
@@ -5483,4 +5483,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.1"
python-versions = ">=3.11,<3.13"
-content-hash = "f3ede96fb76c14d02da37c1132b41a14fa4045787807446fac2cd1750be193e0"
+content-hash = "051924735a7069c8393fefc18fc2c310b196ea24ad41b8c984dc5852683d0407"
diff --git a/api/pyproject.toml b/api/pyproject.toml
index 974a369ca2..ce79dcbc7a 100644
--- a/api/pyproject.toml
+++ b/api/pyproject.toml
@@ -7,7 +7,7 @@ authors = [{name = "Prowler Engineering", email = "engineering@prowler.com"}]
dependencies = [
"celery[pytest] (>=5.4.0,<6.0.0)",
"dj-rest-auth[with_social,jwt] (==7.0.1)",
- "django==5.1.7",
+ "django==5.1.8",
"django-allauth==65.4.1",
"django-celery-beat (>=2.7.0,<3.0.0)",
"django-celery-results (>=2.5.1,<3.0.0)",
@@ -35,7 +35,7 @@ name = "prowler-api"
package-mode = false
# Needed for the SDK compatibility
requires-python = ">=3.11,<3.13"
-version = "1.7.0"
+version = "1.8.0"
[project.scripts]
celery = "src.backend.config.settings.celery"
diff --git a/api/src/backend/api/compliance.py b/api/src/backend/api/compliance.py
index ae1b89a4a9..96b5e313f3 100644
--- a/api/src/backend/api/compliance.py
+++ b/api/src/backend/api/compliance.py
@@ -1,12 +1,38 @@
from types import MappingProxyType
+from api.models import Provider
+from prowler.config.config import get_available_compliance_frameworks
from prowler.lib.check.compliance_models import Compliance
from prowler.lib.check.models import CheckMetadata
-from api.models import Provider
-
PROWLER_COMPLIANCE_OVERVIEW_TEMPLATE = {}
PROWLER_CHECKS = {}
+AVAILABLE_COMPLIANCE_FRAMEWORKS = {}
+
+
+def get_compliance_frameworks(provider_type: Provider.ProviderChoices) -> list[str]:
+ """
+ Retrieve and cache the list of available compliance frameworks for a specific cloud provider.
+
+ This function lazily loads and caches the available compliance frameworks (e.g., CIS, MITRE, ISO)
+ for each provider type (AWS, Azure, GCP, etc.) on first access. Subsequent calls for the same
+ provider will return the cached result.
+
+ Args:
+ provider_type (Provider.ProviderChoices): The cloud provider type for which to retrieve
+ available compliance frameworks (e.g., "aws", "azure", "gcp", "m365").
+
+ Returns:
+ list[str]: A list of framework identifiers (e.g., "cis_1.4_aws", "mitre_attack_azure") available
+ for the given provider.
+ """
+ global AVAILABLE_COMPLIANCE_FRAMEWORKS
+ if provider_type not in AVAILABLE_COMPLIANCE_FRAMEWORKS:
+ AVAILABLE_COMPLIANCE_FRAMEWORKS[provider_type] = (
+ get_available_compliance_frameworks(provider_type)
+ )
+
+ return AVAILABLE_COMPLIANCE_FRAMEWORKS[provider_type]
def get_prowler_provider_checks(provider_type: Provider.ProviderChoices):
diff --git a/api/src/backend/api/db_utils.py b/api/src/backend/api/db_utils.py
index 63a7769c25..ca98b6b592 100644
--- a/api/src/backend/api/db_utils.py
+++ b/api/src/backend/api/db_utils.py
@@ -227,6 +227,77 @@ def register_enum(apps, schema_editor, enum_class): # noqa: F841
register_adapter(enum_class, enum_adapter)
+def create_index_on_partitions(
+ apps, # noqa: F841
+ schema_editor,
+ parent_table: str,
+ index_name: str,
+ columns: str,
+ method: str = "BTREE",
+ where: str = "",
+):
+ """
+ Create an index on every existing partition of `parent_table`.
+
+ Args:
+ parent_table: The name of the root table (e.g. "findings").
+ index_name: A short name for the index (will be prefixed per-partition).
+ columns: The parenthesized column list, e.g. "tenant_id, scan_id, status".
+ method: The index method—BTREE, GIN, etc. Defaults to BTREE.
+ where: Optional WHERE clause (without the leading "WHERE"), e.g. "status = 'FAIL'".
+ """
+ with connection.cursor() as cursor:
+ cursor.execute(
+ """
+ SELECT inhrelid::regclass::text
+ FROM pg_inherits
+ WHERE inhparent = %s::regclass
+ """,
+ [parent_table],
+ )
+ partitions = [row[0] for row in cursor.fetchall()]
+
+ where_sql = f" WHERE {where}" if where else ""
+ for partition in partitions:
+ idx_name = f"{partition.replace('.', '_')}_{index_name}"
+ sql = (
+ f"CREATE INDEX CONCURRENTLY IF NOT EXISTS {idx_name} "
+ f"ON {partition} USING {method} ({columns})"
+ f"{where_sql};"
+ )
+ schema_editor.execute(sql)
+
+
+def drop_index_on_partitions(
+ apps, # noqa: F841
+ schema_editor,
+ parent_table: str,
+ index_name: str,
+):
+ """
+ Drop the per-partition indexes that were created by create_index_on_partitions.
+
+ Args:
+ parent_table: The name of the root table (e.g. "findings").
+ index_name: The same short name used when creating them.
+ """
+ with connection.cursor() as cursor:
+ cursor.execute(
+ """
+ SELECT inhrelid::regclass::text
+ FROM pg_inherits
+ WHERE inhparent = %s::regclass
+ """,
+ [parent_table],
+ )
+ partitions = [row[0] for row in cursor.fetchall()]
+
+ for partition in partitions:
+ idx_name = f"{partition.replace('.', '_')}_{index_name}"
+ sql = f"DROP INDEX CONCURRENTLY IF EXISTS {idx_name};"
+ schema_editor.execute(sql)
+
+
# Postgres enum definition for member role
diff --git a/api/src/backend/api/filters.py b/api/src/backend/api/filters.py
index fc16cf394b..9e95016e1d 100644
--- a/api/src/backend/api/filters.py
+++ b/api/src/backend/api/filters.py
@@ -81,6 +81,114 @@ class ChoiceInFilter(BaseInFilter, ChoiceFilter):
pass
+class CommonFindingFilters(FilterSet):
+ # We filter providers from the scan in findings
+ provider = UUIDFilter(field_name="scan__provider__id", lookup_expr="exact")
+ provider__in = UUIDInFilter(field_name="scan__provider__id", lookup_expr="in")
+ provider_type = ChoiceFilter(
+ choices=Provider.ProviderChoices.choices, field_name="scan__provider__provider"
+ )
+ provider_type__in = ChoiceInFilter(
+ choices=Provider.ProviderChoices.choices, field_name="scan__provider__provider"
+ )
+ provider_uid = CharFilter(field_name="scan__provider__uid", lookup_expr="exact")
+ provider_uid__in = CharInFilter(field_name="scan__provider__uid", lookup_expr="in")
+ provider_uid__icontains = CharFilter(
+ field_name="scan__provider__uid", lookup_expr="icontains"
+ )
+ provider_alias = CharFilter(field_name="scan__provider__alias", lookup_expr="exact")
+ provider_alias__in = CharInFilter(
+ field_name="scan__provider__alias", lookup_expr="in"
+ )
+ provider_alias__icontains = CharFilter(
+ field_name="scan__provider__alias", lookup_expr="icontains"
+ )
+
+ updated_at = DateFilter(field_name="updated_at", lookup_expr="date")
+
+ uid = CharFilter(field_name="uid")
+ delta = ChoiceFilter(choices=Finding.DeltaChoices.choices)
+ status = ChoiceFilter(choices=StatusChoices.choices)
+ severity = ChoiceFilter(choices=SeverityChoices)
+ impact = ChoiceFilter(choices=SeverityChoices)
+ muted = BooleanFilter(
+ help_text="If this filter is not provided, muted and non-muted findings will be returned."
+ )
+
+ resources = UUIDInFilter(field_name="resource__id", lookup_expr="in")
+
+ region = CharFilter(method="filter_resource_region")
+ region__in = CharInFilter(field_name="resource_regions", lookup_expr="overlap")
+ region__icontains = CharFilter(
+ field_name="resource_regions", lookup_expr="icontains"
+ )
+
+ service = CharFilter(method="filter_resource_service")
+ service__in = CharInFilter(field_name="resource_services", lookup_expr="overlap")
+ service__icontains = CharFilter(
+ field_name="resource_services", lookup_expr="icontains"
+ )
+
+ resource_uid = CharFilter(field_name="resources__uid")
+ resource_uid__in = CharInFilter(field_name="resources__uid", lookup_expr="in")
+ resource_uid__icontains = CharFilter(
+ field_name="resources__uid", lookup_expr="icontains"
+ )
+
+ resource_name = CharFilter(field_name="resources__name")
+ resource_name__in = CharInFilter(field_name="resources__name", lookup_expr="in")
+ resource_name__icontains = CharFilter(
+ field_name="resources__name", lookup_expr="icontains"
+ )
+
+ resource_type = CharFilter(method="filter_resource_type")
+ resource_type__in = CharInFilter(field_name="resource_types", lookup_expr="overlap")
+ resource_type__icontains = CharFilter(
+ field_name="resources__type", lookup_expr="icontains"
+ )
+
+ # Temporarily disabled until we implement tag filtering in the UI
+ # resource_tag_key = CharFilter(field_name="resources__tags__key")
+ # resource_tag_key__in = CharInFilter(
+ # field_name="resources__tags__key", lookup_expr="in"
+ # )
+ # resource_tag_key__icontains = CharFilter(
+ # field_name="resources__tags__key", lookup_expr="icontains"
+ # )
+ # resource_tag_value = CharFilter(field_name="resources__tags__value")
+ # resource_tag_value__in = CharInFilter(
+ # field_name="resources__tags__value", lookup_expr="in"
+ # )
+ # resource_tag_value__icontains = CharFilter(
+ # field_name="resources__tags__value", lookup_expr="icontains"
+ # )
+ # resource_tags = CharInFilter(
+ # method="filter_resource_tag",
+ # lookup_expr="in",
+ # help_text="Filter by resource tags `key:value` pairs.\nMultiple values may be "
+ # "separated by commas.",
+ # )
+
+ def filter_resource_service(self, queryset, name, value):
+ return queryset.filter(resource_services__contains=[value])
+
+ def filter_resource_region(self, queryset, name, value):
+ return queryset.filter(resource_regions__contains=[value])
+
+ def filter_resource_type(self, queryset, name, value):
+ return queryset.filter(resource_types__contains=[value])
+
+ def filter_resource_tag(self, queryset, name, value):
+ overall_query = Q()
+ for key_value_pair in value:
+ tag_key, tag_value = key_value_pair.split(":", 1)
+ overall_query |= Q(
+ resources__tags__key__icontains=tag_key,
+ resources__tags__value__icontains=tag_value,
+ )
+ return queryset.filter(overall_query).distinct()
+
+
class TenantFilter(FilterSet):
inserted_at = DateFilter(field_name="inserted_at", lookup_expr="date")
updated_at = DateFilter(field_name="updated_at", lookup_expr="date")
@@ -257,94 +365,7 @@ class ResourceFilter(ProviderRelationshipFilterSet):
return queryset.filter(tags__text_search=value)
-class FindingFilter(FilterSet):
- # We filter providers from the scan in findings
- provider = UUIDFilter(field_name="scan__provider__id", lookup_expr="exact")
- provider__in = UUIDInFilter(field_name="scan__provider__id", lookup_expr="in")
- provider_type = ChoiceFilter(
- choices=Provider.ProviderChoices.choices, field_name="scan__provider__provider"
- )
- provider_type__in = ChoiceInFilter(
- choices=Provider.ProviderChoices.choices, field_name="scan__provider__provider"
- )
- provider_uid = CharFilter(field_name="scan__provider__uid", lookup_expr="exact")
- provider_uid__in = CharInFilter(field_name="scan__provider__uid", lookup_expr="in")
- provider_uid__icontains = CharFilter(
- field_name="scan__provider__uid", lookup_expr="icontains"
- )
- provider_alias = CharFilter(field_name="scan__provider__alias", lookup_expr="exact")
- provider_alias__in = CharInFilter(
- field_name="scan__provider__alias", lookup_expr="in"
- )
- provider_alias__icontains = CharFilter(
- field_name="scan__provider__alias", lookup_expr="icontains"
- )
-
- updated_at = DateFilter(field_name="updated_at", lookup_expr="date")
-
- uid = CharFilter(field_name="uid")
- delta = ChoiceFilter(choices=Finding.DeltaChoices.choices)
- status = ChoiceFilter(choices=StatusChoices.choices)
- severity = ChoiceFilter(choices=SeverityChoices)
- impact = ChoiceFilter(choices=SeverityChoices)
- muted = BooleanFilter(
- help_text="If this filter is not provided, muted and non-muted findings will be returned."
- )
-
- resources = UUIDInFilter(field_name="resource__id", lookup_expr="in")
-
- region = CharFilter(field_name="resources__region")
- region__in = CharInFilter(field_name="resources__region", lookup_expr="in")
- region__icontains = CharFilter(
- field_name="resources__region", lookup_expr="icontains"
- )
-
- service = CharFilter(field_name="resources__service")
- service__in = CharInFilter(field_name="resources__service", lookup_expr="in")
- service__icontains = CharFilter(
- field_name="resources__service", lookup_expr="icontains"
- )
-
- resource_uid = CharFilter(field_name="resources__uid")
- resource_uid__in = CharInFilter(field_name="resources__uid", lookup_expr="in")
- resource_uid__icontains = CharFilter(
- field_name="resources__uid", lookup_expr="icontains"
- )
-
- resource_name = CharFilter(field_name="resources__name")
- resource_name__in = CharInFilter(field_name="resources__name", lookup_expr="in")
- resource_name__icontains = CharFilter(
- field_name="resources__name", lookup_expr="icontains"
- )
-
- resource_type = CharFilter(field_name="resources__type")
- resource_type__in = CharInFilter(field_name="resources__type", lookup_expr="in")
- resource_type__icontains = CharFilter(
- field_name="resources__type", lookup_expr="icontains"
- )
-
- # Temporarily disabled until we implement tag filtering in the UI
- # resource_tag_key = CharFilter(field_name="resources__tags__key")
- # resource_tag_key__in = CharInFilter(
- # field_name="resources__tags__key", lookup_expr="in"
- # )
- # resource_tag_key__icontains = CharFilter(
- # field_name="resources__tags__key", lookup_expr="icontains"
- # )
- # resource_tag_value = CharFilter(field_name="resources__tags__value")
- # resource_tag_value__in = CharInFilter(
- # field_name="resources__tags__value", lookup_expr="in"
- # )
- # resource_tag_value__icontains = CharFilter(
- # field_name="resources__tags__value", lookup_expr="icontains"
- # )
- # resource_tags = CharInFilter(
- # method="filter_resource_tag",
- # lookup_expr="in",
- # help_text="Filter by resource tags `key:value` pairs.\nMultiple values may be "
- # "separated by commas.",
- # )
-
+class FindingFilter(CommonFindingFilters):
scan = UUIDFilter(method="filter_scan_id")
scan__in = UUIDInFilter(method="filter_scan_id_in")
@@ -385,6 +406,15 @@ class FindingFilter(FilterSet):
},
}
+ def filter_resource_type(self, queryset, name, value):
+ return queryset.filter(resource_types__contains=[value])
+
+ def filter_resource_region(self, queryset, name, value):
+ return queryset.filter(resource_regions__contains=[value])
+
+ def filter_resource_service(self, queryset, name, value):
+ return queryset.filter(resource_services__contains=[value])
+
def filter_queryset(self, queryset):
if not (self.data.get("scan") or self.data.get("scan__in")) and not (
self.data.get("inserted_at")
@@ -503,16 +533,6 @@ class FindingFilter(FilterSet):
return queryset.filter(id__lt=end)
- def filter_resource_tag(self, queryset, name, value):
- overall_query = Q()
- for key_value_pair in value:
- tag_key, tag_value = key_value_pair.split(":", 1)
- overall_query |= Q(
- resources__tags__key__icontains=tag_key,
- resources__tags__value__icontains=tag_value,
- )
- return queryset.filter(overall_query).distinct()
-
@staticmethod
def maybe_date_to_datetime(value):
dt = value
@@ -521,6 +541,31 @@ class FindingFilter(FilterSet):
return dt
+class LatestFindingFilter(CommonFindingFilters):
+ class Meta:
+ model = Finding
+ fields = {
+ "id": ["exact", "in"],
+ "uid": ["exact", "in"],
+ "delta": ["exact", "in"],
+ "status": ["exact", "in"],
+ "severity": ["exact", "in"],
+ "impact": ["exact", "in"],
+ "check_id": ["exact", "in", "icontains"],
+ }
+ filter_overrides = {
+ FindingDeltaEnumField: {
+ "filter_class": CharFilter,
+ },
+ StatusEnumField: {
+ "filter_class": CharFilter,
+ },
+ SeverityEnumField: {
+ "filter_class": CharFilter,
+ },
+ }
+
+
class ProviderSecretFilter(FilterSet):
inserted_at = DateFilter(field_name="inserted_at", lookup_expr="date")
updated_at = DateFilter(field_name="updated_at", lookup_expr="date")
diff --git a/api/src/backend/api/management/commands/findings.py b/api/src/backend/api/management/commands/findings.py
index f81f8012a3..e62f8f8e8e 100644
--- a/api/src/backend/api/management/commands/findings.py
+++ b/api/src/backend/api/management/commands/findings.py
@@ -12,6 +12,7 @@ from api.models import (
Provider,
Resource,
ResourceFindingMapping,
+ ResourceScanSummary,
Scan,
StatusChoices,
)
@@ -133,6 +134,7 @@ class Command(BaseCommand):
region=random.choice(possible_regions),
service=random.choice(possible_services),
type=random.choice(possible_types),
+ inserted_at="2024-10-01T00:00:00Z",
)
)
@@ -181,6 +183,10 @@ class Command(BaseCommand):
"servicename": assigned_resource.service,
"resourcetype": assigned_resource.type,
},
+ resource_types=[assigned_resource.type],
+ resource_regions=[assigned_resource.region],
+ resource_services=[assigned_resource.service],
+ inserted_at="2024-10-01T00:00:00Z",
)
)
@@ -197,12 +203,22 @@ class Command(BaseCommand):
# Create ResourceFindingMapping
mappings = []
- for index, f in enumerate(findings):
+ scan_resource_cache: set[tuple] = set()
+ for index, finding_instance in enumerate(findings):
+ resource_instance = resources[findings_resources_mapping[index]]
mappings.append(
ResourceFindingMapping(
tenant_id=tenant_id,
- resource=resources[findings_resources_mapping[index]],
- finding=f,
+ resource=resource_instance,
+ finding=finding_instance,
+ )
+ )
+ scan_resource_cache.add(
+ (
+ str(resource_instance.id),
+ resource_instance.service,
+ resource_instance.region,
+ resource_instance.type,
)
)
@@ -220,6 +236,38 @@ class Command(BaseCommand):
"Resource-finding mappings created successfully.\n\n"
)
)
+
+ with rls_transaction(tenant_id):
+ scan.progress = 99
+ scan.save()
+
+ self.stdout.write(self.style.WARNING("Creating finding filter values..."))
+ resource_scan_summaries = [
+ ResourceScanSummary(
+ tenant_id=tenant_id,
+ scan_id=str(scan.id),
+ resource_id=resource_id,
+ service=service,
+ region=region,
+ resource_type=resource_type,
+ )
+ for resource_id, service, region, resource_type in scan_resource_cache
+ ]
+ num_batches = ceil(len(resource_scan_summaries) / batch_size)
+ with rls_transaction(tenant_id):
+ for i in tqdm(
+ range(0, len(resource_scan_summaries), batch_size),
+ total=num_batches,
+ ):
+ with rls_transaction(tenant_id):
+ ResourceScanSummary.objects.bulk_create(
+ resource_scan_summaries[i : i + batch_size],
+ ignore_conflicts=True,
+ )
+
+ self.stdout.write(
+ self.style.SUCCESS("Finding filter values created successfully.\n\n")
+ )
except Exception as e:
self.stdout.write(self.style.ERROR(f"Failed to populate test data: {e}"))
scan_state = "failed"
diff --git a/api/src/backend/api/migrations/0018_resource_scan_summaries.py b/api/src/backend/api/migrations/0018_resource_scan_summaries.py
new file mode 100644
index 0000000000..e9e2ffbe69
--- /dev/null
+++ b/api/src/backend/api/migrations/0018_resource_scan_summaries.py
@@ -0,0 +1,81 @@
+# Generated by Django 5.1.7 on 2025-05-05 10:01
+
+import uuid
+
+import django.db.models.deletion
+import uuid6
+from django.db import migrations, models
+
+import api.rls
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("api", "0017_m365_provider"),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name="ResourceScanSummary",
+ fields=[
+ (
+ "id",
+ models.BigAutoField(
+ auto_created=True,
+ primary_key=True,
+ serialize=False,
+ verbose_name="ID",
+ ),
+ ),
+ ("scan_id", models.UUIDField(db_index=True, default=uuid6.uuid7)),
+ ("resource_id", models.UUIDField(db_index=True, default=uuid.uuid4)),
+ ("service", models.CharField(max_length=100)),
+ ("region", models.CharField(max_length=100)),
+ ("resource_type", models.CharField(max_length=100)),
+ (
+ "tenant",
+ models.ForeignKey(
+ on_delete=django.db.models.deletion.CASCADE, to="api.tenant"
+ ),
+ ),
+ ],
+ options={
+ "db_table": "resource_scan_summaries",
+ "indexes": [
+ models.Index(
+ fields=["tenant_id", "scan_id", "service"],
+ name="rss_tenant_scan_svc_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "region"],
+ name="rss_tenant_scan_reg_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "resource_type"],
+ name="rss_tenant_scan_type_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "region", "service"],
+ name="rss_tenant_scan_reg_svc_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "service", "resource_type"],
+ name="rss_tenant_scan_svc_type_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "region", "resource_type"],
+ name="rss_tenant_scan_reg_type_idx",
+ ),
+ ],
+ "unique_together": {("tenant_id", "scan_id", "resource_id")},
+ },
+ ),
+ migrations.AddConstraint(
+ model_name="resourcescansummary",
+ constraint=api.rls.RowLevelSecurityConstraint(
+ "tenant_id",
+ name="rls_on_resourcescansummary",
+ statements=["SELECT", "INSERT", "UPDATE", "DELETE"],
+ ),
+ ),
+ ]
diff --git a/api/src/backend/api/migrations/0019_finding_denormalize_resource_fields.py b/api/src/backend/api/migrations/0019_finding_denormalize_resource_fields.py
new file mode 100644
index 0000000000..837b741223
--- /dev/null
+++ b/api/src/backend/api/migrations/0019_finding_denormalize_resource_fields.py
@@ -0,0 +1,42 @@
+import django.contrib.postgres.fields
+import django.contrib.postgres.indexes
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("api", "0018_resource_scan_summaries"),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name="finding",
+ name="resource_regions",
+ field=django.contrib.postgres.fields.ArrayField(
+ base_field=models.CharField(max_length=100),
+ blank=True,
+ null=True,
+ size=None,
+ ),
+ ),
+ migrations.AddField(
+ model_name="finding",
+ name="resource_services",
+ field=django.contrib.postgres.fields.ArrayField(
+ base_field=models.CharField(max_length=100),
+ blank=True,
+ null=True,
+ size=None,
+ ),
+ ),
+ migrations.AddField(
+ model_name="finding",
+ name="resource_types",
+ field=django.contrib.postgres.fields.ArrayField(
+ base_field=models.CharField(max_length=100),
+ blank=True,
+ null=True,
+ size=None,
+ ),
+ ),
+ ]
diff --git a/api/src/backend/api/migrations/0020_findings_new_performance_indexes_partitions.py b/api/src/backend/api/migrations/0020_findings_new_performance_indexes_partitions.py
new file mode 100644
index 0000000000..eef7e10b99
--- /dev/null
+++ b/api/src/backend/api/migrations/0020_findings_new_performance_indexes_partitions.py
@@ -0,0 +1,86 @@
+from functools import partial
+
+from django.db import migrations
+
+from api.db_utils import create_index_on_partitions, drop_index_on_partitions
+
+
+class Migration(migrations.Migration):
+ atomic = False
+
+ dependencies = [
+ ("api", "0019_finding_denormalize_resource_fields"),
+ ]
+
+ operations = [
+ migrations.RunPython(
+ partial(
+ create_index_on_partitions,
+ parent_table="findings",
+ index_name="gin_find_service_idx",
+ columns="resource_services",
+ method="GIN",
+ ),
+ reverse_code=partial(
+ drop_index_on_partitions,
+ parent_table="findings",
+ index_name="gin_find_service_idx",
+ ),
+ ),
+ migrations.RunPython(
+ partial(
+ create_index_on_partitions,
+ parent_table="findings",
+ index_name="gin_find_region_idx",
+ columns="resource_regions",
+ method="GIN",
+ ),
+ reverse_code=partial(
+ drop_index_on_partitions,
+ parent_table="findings",
+ index_name="gin_find_region_idx",
+ ),
+ ),
+ migrations.RunPython(
+ partial(
+ create_index_on_partitions,
+ parent_table="findings",
+ index_name="gin_find_rtype_idx",
+ columns="resource_types",
+ method="GIN",
+ ),
+ reverse_code=partial(
+ drop_index_on_partitions,
+ parent_table="findings",
+ index_name="gin_find_rtype_idx",
+ ),
+ ),
+ migrations.RunPython(
+ partial(
+ drop_index_on_partitions,
+ parent_table="findings",
+ index_name="findings_uid_idx",
+ ),
+ reverse_code=partial(
+ create_index_on_partitions,
+ parent_table="findings",
+ index_name="findings_uid_idx",
+ columns="uid",
+ method="BTREE",
+ ),
+ ),
+ migrations.RunPython(
+ partial(
+ drop_index_on_partitions,
+ parent_table="findings",
+ index_name="findings_filter_idx",
+ ),
+ reverse_code=partial(
+ create_index_on_partitions,
+ parent_table="findings",
+ index_name="findings_filter_idx",
+ columns="scan_id, impact, severity, status, check_id, delta",
+ method="BTREE",
+ ),
+ ),
+ ]
diff --git a/api/src/backend/api/migrations/0021_findings_new_performance_indexes_parent.py b/api/src/backend/api/migrations/0021_findings_new_performance_indexes_parent.py
new file mode 100644
index 0000000000..3165af9030
--- /dev/null
+++ b/api/src/backend/api/migrations/0021_findings_new_performance_indexes_parent.py
@@ -0,0 +1,37 @@
+import django.contrib.postgres.indexes
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("api", "0020_findings_new_performance_indexes_partitions"),
+ ]
+
+ operations = [
+ migrations.AddIndex(
+ model_name="finding",
+ index=django.contrib.postgres.indexes.GinIndex(
+ fields=["resource_services"], name="gin_find_service_idx"
+ ),
+ ),
+ migrations.AddIndex(
+ model_name="finding",
+ index=django.contrib.postgres.indexes.GinIndex(
+ fields=["resource_regions"], name="gin_find_region_idx"
+ ),
+ ),
+ migrations.AddIndex(
+ model_name="finding",
+ index=django.contrib.postgres.indexes.GinIndex(
+ fields=["resource_types"], name="gin_find_rtype_idx"
+ ),
+ ),
+ migrations.RemoveIndex(
+ model_name="finding",
+ name="findings_uid_idx",
+ ),
+ migrations.RemoveIndex(
+ model_name="finding",
+ name="findings_filter_idx",
+ ),
+ ]
diff --git a/api/src/backend/api/migrations/0022_scan_summaries_performance_indexes.py b/api/src/backend/api/migrations/0022_scan_summaries_performance_indexes.py
new file mode 100644
index 0000000000..d56f310b8f
--- /dev/null
+++ b/api/src/backend/api/migrations/0022_scan_summaries_performance_indexes.py
@@ -0,0 +1,38 @@
+# Generated by Django 5.1.8 on 2025-05-12 10:04
+
+from django.contrib.postgres.operations import AddIndexConcurrently
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ atomic = False
+
+ dependencies = [
+ ("api", "0021_findings_new_performance_indexes_parent"),
+ ("django_celery_beat", "0019_alter_periodictasks_options"),
+ ]
+
+ operations = [
+ AddIndexConcurrently(
+ model_name="scan",
+ index=models.Index(
+ condition=models.Q(("state", "completed")),
+ fields=["tenant_id", "provider_id", "state", "-inserted_at"],
+ name="scans_prov_state_ins_desc_idx",
+ ),
+ ),
+ AddIndexConcurrently(
+ model_name="scansummary",
+ index=models.Index(
+ fields=["tenant_id", "scan_id", "service"],
+ name="ss_tenant_scan_service_idx",
+ ),
+ ),
+ AddIndexConcurrently(
+ model_name="scansummary",
+ index=models.Index(
+ fields=["tenant_id", "scan_id", "severity"],
+ name="ss_tenant_scan_severity_idx",
+ ),
+ ),
+ ]
diff --git a/api/src/backend/api/migrations/0023_resources_lookup_optimization.py b/api/src/backend/api/migrations/0023_resources_lookup_optimization.py
new file mode 100644
index 0000000000..9709f17eb4
--- /dev/null
+++ b/api/src/backend/api/migrations/0023_resources_lookup_optimization.py
@@ -0,0 +1,28 @@
+# Generated by Django 5.1.8 on 2025-05-12 10:18
+
+from django.contrib.postgres.operations import AddIndexConcurrently
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ atomic = False
+
+ dependencies = [
+ ("api", "0022_scan_summaries_performance_indexes"),
+ ]
+
+ operations = [
+ AddIndexConcurrently(
+ model_name="resource",
+ index=models.Index(
+ fields=["tenant_id", "id"], name="resources_tenant_id_idx"
+ ),
+ ),
+ AddIndexConcurrently(
+ model_name="resource",
+ index=models.Index(
+ fields=["tenant_id", "provider_id"],
+ name="resources_tenant_provider_idx",
+ ),
+ ),
+ ]
diff --git a/api/src/backend/api/models.py b/api/src/backend/api/models.py
index 01f88178f0..676b3b116c 100644
--- a/api/src/backend/api/models.py
+++ b/api/src/backend/api/models.py
@@ -5,6 +5,7 @@ from uuid import UUID, uuid4
from cryptography.fernet import Fernet
from django.conf import settings
from django.contrib.auth.models import AbstractBaseUser
+from django.contrib.postgres.fields import ArrayField
from django.contrib.postgres.indexes import GinIndex
from django.contrib.postgres.search import SearchVector, SearchVectorField
from django.core.validators import MinLengthValidator
@@ -447,6 +448,11 @@ class Scan(RowLevelSecurityProtectedModel):
fields=["tenant_id", "provider_id", "state", "inserted_at"],
name="scans_prov_state_insert_idx",
),
+ models.Index(
+ fields=["tenant_id", "provider_id", "state", "-inserted_at"],
+ condition=Q(state=StateChoices.COMPLETED),
+ name="scans_prov_state_ins_desc_idx",
+ ),
]
class JSONAPIMeta:
@@ -573,6 +579,11 @@ class Resource(RowLevelSecurityProtectedModel):
name="resource_tenant_metadata_idx",
),
GinIndex(fields=["text_search"], name="gin_resources_search_idx"),
+ models.Index(fields=["tenant_id", "id"], name="resources_tenant_id_idx"),
+ models.Index(
+ fields=["tenant_id", "provider_id"],
+ name="resources_tenant_provider_idx",
+ ),
]
constraints = [
@@ -673,6 +684,21 @@ class Finding(PostgresPartitionedModel, RowLevelSecurityProtectedModel):
muted = models.BooleanField(default=False, null=False)
compliance = models.JSONField(default=dict, null=True, blank=True)
+ # Denormalize resource data for performance
+ resource_regions = ArrayField(
+ models.CharField(max_length=100), blank=True, null=True
+ )
+ resource_services = ArrayField(
+ models.CharField(max_length=100),
+ blank=True,
+ null=True,
+ )
+ resource_types = ArrayField(
+ models.CharField(max_length=100),
+ blank=True,
+ null=True,
+ )
+
# Relationships
scan = models.ForeignKey(to=Scan, related_name="findings", on_delete=models.CASCADE)
@@ -713,18 +739,6 @@ class Finding(PostgresPartitionedModel, RowLevelSecurityProtectedModel):
]
indexes = [
- models.Index(fields=["uid"], name="findings_uid_idx"),
- models.Index(
- fields=[
- "scan_id",
- "impact",
- "severity",
- "status",
- "check_id",
- "delta",
- ],
- name="findings_filter_idx",
- ),
models.Index(fields=["tenant_id", "id"], name="findings_tenant_and_id_idx"),
GinIndex(fields=["text_search"], name="gin_findings_search_idx"),
models.Index(fields=["tenant_id", "scan_id"], name="find_tenant_scan_idx"),
@@ -736,19 +750,38 @@ class Finding(PostgresPartitionedModel, RowLevelSecurityProtectedModel):
condition=Q(delta="new"),
name="find_delta_new_idx",
),
+ GinIndex(fields=["resource_services"], name="gin_find_service_idx"),
+ GinIndex(fields=["resource_regions"], name="gin_find_region_idx"),
+ GinIndex(fields=["resource_types"], name="gin_find_rtype_idx"),
]
class JSONAPIMeta:
resource_name = "findings"
def add_resources(self, resources: list[Resource] | None):
- # Add new relationships with the tenant_id field
+ if not resources:
+ return
+
+ self.resource_regions = self.resource_regions or []
+ self.resource_services = self.resource_services or []
+ self.resource_types = self.resource_types or []
+
+ # Deduplication
+ regions = set(self.resource_regions)
+ services = set(self.resource_services)
+ types = set(self.resource_types)
+
for resource in resources:
ResourceFindingMapping.objects.update_or_create(
resource=resource, finding=self, tenant_id=self.tenant_id
)
+ regions.add(resource.region)
+ services.add(resource.service)
+ types.add(resource.type)
- # Save the instance
+ self.resource_regions = list(regions)
+ self.resource_services = list(services)
+ self.resource_types = list(types)
self.save()
@@ -1150,7 +1183,15 @@ class ScanSummary(RowLevelSecurityProtectedModel):
models.Index(
fields=["tenant_id", "scan_id"],
name="scan_summaries_tenant_scan_idx",
- )
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "service"],
+ name="ss_tenant_scan_service_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "severity"],
+ name="ss_tenant_scan_severity_idx",
+ ),
]
class JSONAPIMeta:
@@ -1232,3 +1273,52 @@ class IntegrationProviderRelationship(RowLevelSecurityProtectedModel):
statements=["SELECT", "INSERT", "UPDATE", "DELETE"],
),
]
+
+
+class ResourceScanSummary(RowLevelSecurityProtectedModel):
+ scan_id = models.UUIDField(default=uuid7, db_index=True)
+ resource_id = models.UUIDField(default=uuid4, db_index=True)
+ service = models.CharField(max_length=100)
+ region = models.CharField(max_length=100)
+ resource_type = models.CharField(max_length=100)
+
+ class Meta:
+ db_table = "resource_scan_summaries"
+ unique_together = (("tenant_id", "scan_id", "resource_id"),)
+
+ indexes = [
+ # Single-dimension lookups:
+ models.Index(
+ fields=["tenant_id", "scan_id", "service"],
+ name="rss_tenant_scan_svc_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "region"],
+ name="rss_tenant_scan_reg_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "resource_type"],
+ name="rss_tenant_scan_type_idx",
+ ),
+ # Two-dimension cross-filters:
+ models.Index(
+ fields=["tenant_id", "scan_id", "region", "service"],
+ name="rss_tenant_scan_reg_svc_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "service", "resource_type"],
+ name="rss_tenant_scan_svc_type_idx",
+ ),
+ models.Index(
+ fields=["tenant_id", "scan_id", "region", "resource_type"],
+ name="rss_tenant_scan_reg_type_idx",
+ ),
+ ]
+
+ constraints = [
+ RowLevelSecurityConstraint(
+ field="tenant_id",
+ name="rls_on_%(class)s",
+ statements=["SELECT", "INSERT", "UPDATE", "DELETE"],
+ ),
+ ]
diff --git a/api/src/backend/api/specs/v1.yaml b/api/src/backend/api/specs/v1.yaml
index bb7c580815..4a5bdb4662 100644
--- a/api/src/backend/api/specs/v1.yaml
+++ b/api/src/backend/api/specs/v1.yaml
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: Prowler API
- version: 1.7.0
+ version: 1.8.0
description: |-
Prowler API specification.
@@ -1238,6 +1238,416 @@ paths:
schema:
$ref: '#/components/schemas/FindingDynamicFilterResponse'
description: ''
+ /api/v1/findings/latest:
+ get:
+ operationId: findings_latest_retrieve
+ description: Retrieve a list of the latest findings from the latest scans for
+ each provider with options for filtering by various criteria.
+ summary: List the latest findings
+ parameters:
+ - in: query
+ name: fields[findings]
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - uid
+ - delta
+ - status
+ - status_extended
+ - severity
+ - check_id
+ - check_metadata
+ - raw_result
+ - inserted_at
+ - updated_at
+ - first_seen_at
+ - muted
+ - url
+ - scan
+ - resources
+ description: endpoint return only specific fields in the response on a per-type
+ basis by including a fields[TYPE] query parameter.
+ explode: false
+ - in: query
+ name: filter[check_id]
+ schema:
+ type: string
+ - in: query
+ name: filter[check_id__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[check_id__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[delta]
+ schema:
+ type: string
+ nullable: true
+ enum:
+ - changed
+ - new
+ description: |-
+ * `new` - New
+ * `changed` - Changed
+ - in: query
+ name: filter[delta__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[id]
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: filter[id__in]
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[impact]
+ schema:
+ type: string
+ enum:
+ - critical
+ - high
+ - informational
+ - low
+ - medium
+ description: |-
+ * `critical` - Critical
+ * `high` - High
+ * `medium` - Medium
+ * `low` - Low
+ * `informational` - Informational
+ - in: query
+ name: filter[impact__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[muted]
+ schema:
+ type: boolean
+ description: If this filter is not provided, muted and non-muted findings
+ will be returned.
+ - in: query
+ name: filter[provider]
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: filter[provider__in]
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[provider_alias]
+ schema:
+ type: string
+ - in: query
+ name: filter[provider_alias__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[provider_alias__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[provider_type]
+ schema:
+ type: string
+ enum:
+ - aws
+ - azure
+ - gcp
+ - kubernetes
+ - m365
+ description: |-
+ * `aws` - AWS
+ * `azure` - Azure
+ * `gcp` - GCP
+ * `kubernetes` - Kubernetes
+ * `m365` - M365
+ - in: query
+ name: filter[provider_type__in]
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - aws
+ - azure
+ - gcp
+ - kubernetes
+ - m365
+ description: |-
+ Multiple values may be separated by commas.
+
+ * `aws` - AWS
+ * `azure` - Azure
+ * `gcp` - GCP
+ * `kubernetes` - Kubernetes
+ * `m365` - M365
+ explode: false
+ style: form
+ - in: query
+ name: filter[provider_uid]
+ schema:
+ type: string
+ - in: query
+ name: filter[provider_uid__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[provider_uid__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[region]
+ schema:
+ type: string
+ - in: query
+ name: filter[region__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[region__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[resource_name]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_name__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_name__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[resource_type]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_type__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_type__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[resource_uid]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_uid__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_uid__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[resources]
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - name: filter[search]
+ required: false
+ in: query
+ description: A search term.
+ schema:
+ type: string
+ - in: query
+ name: filter[service]
+ schema:
+ type: string
+ - in: query
+ name: filter[service__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[service__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[severity]
+ schema:
+ type: string
+ enum:
+ - critical
+ - high
+ - informational
+ - low
+ - medium
+ description: |-
+ * `critical` - Critical
+ * `high` - High
+ * `medium` - Medium
+ * `low` - Low
+ * `informational` - Informational
+ - in: query
+ name: filter[severity__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[status]
+ schema:
+ type: string
+ enum:
+ - FAIL
+ - MANUAL
+ - PASS
+ description: |-
+ * `FAIL` - Fail
+ * `PASS` - Pass
+ * `MANUAL` - Manual
+ - in: query
+ name: filter[status__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[uid]
+ schema:
+ type: string
+ - in: query
+ name: filter[uid__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[updated_at]
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: include
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - scan
+ - resources
+ description: include query parameter to allow the client to customize which
+ related resources should be returned.
+ explode: false
+ - name: sort
+ required: false
+ in: query
+ description: '[list of fields to sort by](https://jsonapi.org/format/#fetching-sorting)'
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - status
+ - -status
+ - severity
+ - -severity
+ - check_id
+ - -check_id
+ - inserted_at
+ - -inserted_at
+ - updated_at
+ - -updated_at
+ explode: false
+ tags:
+ - Finding
+ security:
+ - jwtAuth: []
+ responses:
+ '200':
+ content:
+ application/vnd.api+json:
+ schema:
+ $ref: '#/components/schemas/FindingResponse'
+ description: ''
/api/v1/findings/metadata:
get:
operationId: findings_metadata_retrieve
@@ -1674,6 +2084,392 @@ paths:
schema:
$ref: '#/components/schemas/FindingMetadataResponse'
description: ''
+ /api/v1/findings/metadata/latest:
+ get:
+ operationId: findings_metadata_latest_retrieve
+ description: Fetch unique metadata values from a set of findings from the latest
+ scans for each provider. This is useful for dynamic filtering.
+ summary: Retrieve metadata values from the latest findings
+ parameters:
+ - in: query
+ name: fields[findings-metadata]
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - services
+ - regions
+ - resource_types
+ description: endpoint return only specific fields in the response on a per-type
+ basis by including a fields[TYPE] query parameter.
+ explode: false
+ - in: query
+ name: filter[check_id]
+ schema:
+ type: string
+ - in: query
+ name: filter[check_id__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[check_id__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[delta]
+ schema:
+ type: string
+ nullable: true
+ enum:
+ - changed
+ - new
+ description: |-
+ * `new` - New
+ * `changed` - Changed
+ - in: query
+ name: filter[delta__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[id]
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: filter[id__in]
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[impact]
+ schema:
+ type: string
+ enum:
+ - critical
+ - high
+ - informational
+ - low
+ - medium
+ description: |-
+ * `critical` - Critical
+ * `high` - High
+ * `medium` - Medium
+ * `low` - Low
+ * `informational` - Informational
+ - in: query
+ name: filter[impact__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[muted]
+ schema:
+ type: boolean
+ description: If this filter is not provided, muted and non-muted findings
+ will be returned.
+ - in: query
+ name: filter[provider]
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: filter[provider__in]
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[provider_alias]
+ schema:
+ type: string
+ - in: query
+ name: filter[provider_alias__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[provider_alias__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[provider_type]
+ schema:
+ type: string
+ enum:
+ - aws
+ - azure
+ - gcp
+ - kubernetes
+ - m365
+ description: |-
+ * `aws` - AWS
+ * `azure` - Azure
+ * `gcp` - GCP
+ * `kubernetes` - Kubernetes
+ * `m365` - M365
+ - in: query
+ name: filter[provider_type__in]
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - aws
+ - azure
+ - gcp
+ - kubernetes
+ - m365
+ description: |-
+ Multiple values may be separated by commas.
+
+ * `aws` - AWS
+ * `azure` - Azure
+ * `gcp` - GCP
+ * `kubernetes` - Kubernetes
+ * `m365` - M365
+ explode: false
+ style: form
+ - in: query
+ name: filter[provider_uid]
+ schema:
+ type: string
+ - in: query
+ name: filter[provider_uid__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[provider_uid__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[region]
+ schema:
+ type: string
+ - in: query
+ name: filter[region__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[region__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[resource_name]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_name__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_name__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[resource_type]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_type__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_type__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[resource_uid]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_uid__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[resource_uid__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[resources]
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - name: filter[search]
+ required: false
+ in: query
+ description: A search term.
+ schema:
+ type: string
+ - in: query
+ name: filter[service]
+ schema:
+ type: string
+ - in: query
+ name: filter[service__icontains]
+ schema:
+ type: string
+ - in: query
+ name: filter[service__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[severity]
+ schema:
+ type: string
+ enum:
+ - critical
+ - high
+ - informational
+ - low
+ - medium
+ description: |-
+ * `critical` - Critical
+ * `high` - High
+ * `medium` - Medium
+ * `low` - Low
+ * `informational` - Informational
+ - in: query
+ name: filter[severity__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[status]
+ schema:
+ type: string
+ enum:
+ - FAIL
+ - MANUAL
+ - PASS
+ description: |-
+ * `FAIL` - Fail
+ * `PASS` - Pass
+ * `MANUAL` - Manual
+ - in: query
+ name: filter[status__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[uid]
+ schema:
+ type: string
+ - in: query
+ name: filter[uid__in]
+ schema:
+ type: array
+ items:
+ type: string
+ description: Multiple values may be separated by commas.
+ explode: false
+ style: form
+ - in: query
+ name: filter[updated_at]
+ schema:
+ type: string
+ format: date
+ - name: sort
+ required: false
+ in: query
+ description: '[list of fields to sort by](https://jsonapi.org/format/#fetching-sorting)'
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - status
+ - -status
+ - severity
+ - -severity
+ - check_id
+ - -check_id
+ - inserted_at
+ - -inserted_at
+ - updated_at
+ - -updated_at
+ explode: false
+ tags:
+ - Finding
+ security:
+ - jwtAuth: []
+ responses:
+ '200':
+ content:
+ application/vnd.api+json:
+ schema:
+ $ref: '#/components/schemas/FindingMetadataResponse'
+ description: ''
/api/v1/integrations:
get:
operationId: integrations_list
@@ -4503,6 +5299,47 @@ paths:
schema:
$ref: '#/components/schemas/ScanUpdateResponse'
description: ''
+ /api/v1/scans/{id}/compliance/{name}:
+ get:
+ operationId: scans_compliance_retrieve
+ description: Download a specific compliance report (e.g., 'cis_1.4_aws') as
+ a CSV file.
+ summary: Retrieve compliance report as CSV
+ parameters:
+ - in: query
+ name: fields[scan-reports]
+ schema:
+ type: array
+ items:
+ type: string
+ enum:
+ - id
+ - name
+ description: endpoint return only specific fields in the response on a per-type
+ basis by including a fields[TYPE] query parameter.
+ explode: false
+ - in: path
+ name: id
+ schema:
+ type: string
+ format: uuid
+ description: A UUID string identifying this scan.
+ required: true
+ - in: path
+ name: name
+ schema:
+ type: string
+ description: The compliance report name, like 'cis_1.4_aws'
+ required: true
+ tags:
+ - Scan
+ security:
+ - jwtAuth: []
+ responses:
+ '200':
+ description: CSV file containing the compliance report
+ '404':
+ description: Compliance report not found
/api/v1/scans/{id}/report:
get:
operationId: scans_report_retrieve
diff --git a/api/src/backend/api/tests/test_views.py b/api/src/backend/api/tests/test_views.py
index 002af353da..a82348fe87 100644
--- a/api/src/backend/api/tests/test_views.py
+++ b/api/src/backend/api/tests/test_views.py
@@ -2,17 +2,20 @@ import glob
import io
import json
import os
+import tempfile
from datetime import datetime, timedelta, timezone
-from unittest.mock import ANY, Mock, patch
+from pathlib import Path
+from unittest.mock import ANY, MagicMock, Mock, patch
import jwt
import pytest
-from botocore.exceptions import NoCredentialsError
+from botocore.exceptions import ClientError, NoCredentialsError
from conftest import API_JSON_CONTENT_TYPE, TEST_PASSWORD, TEST_USER
from django.conf import settings
from django.urls import reverse
from rest_framework import status
+from api.compliance import get_compliance_frameworks
from api.models import (
ComplianceOverview,
Integration,
@@ -2277,7 +2280,8 @@ class TestScanViewSet:
scan.save()
monkeypatch.setattr(
- "api.v1.views.env", type("env", (), {"str": lambda self, key: bucket})()
+ "api.v1.views.env",
+ type("env", (), {"str": lambda self, *args, **kwargs: "test-bucket"})(),
)
class FakeS3Client:
@@ -2316,35 +2320,296 @@ class TestScanViewSet:
assert response.status_code == 404
assert response.json()["errors"]["detail"] == "The scan has no reports."
- def test_report_local_file(
- self, authenticated_client, scans_fixture, tmp_path, monkeypatch
- ):
- """
- When output_location is a local file path, the view should read the file from disk
- and return it with proper headers.
- """
+ def test_report_local_file(self, authenticated_client, scans_fixture, monkeypatch):
scan = scans_fixture[0]
- file_content = b"local zip file content"
- file_path = tmp_path / "report.zip"
- file_path.write_bytes(file_content)
+ with tempfile.TemporaryDirectory() as tmp:
+ tmp_path = Path(tmp)
+ base_tmp = tmp_path / "report_local_file"
+ base_tmp.mkdir(parents=True, exist_ok=True)
- scan.output_location = str(file_path)
+ file_content = b"local zip file content"
+ file_path = base_tmp / "report.zip"
+ file_path.write_bytes(file_content)
+
+ scan.output_location = str(file_path)
+ scan.state = StateChoices.COMPLETED
+ scan.save()
+
+ monkeypatch.setattr(
+ glob,
+ "glob",
+ lambda pattern: [str(file_path)] if pattern == str(file_path) else [],
+ )
+
+ url = reverse("scan-report", kwargs={"pk": scan.id})
+ response = authenticated_client.get(url)
+ assert response.status_code == 200
+ assert response.content == file_content
+ content_disposition = response.get("Content-Disposition")
+ assert content_disposition.startswith('attachment; filename="')
+ assert f'filename="{file_path.name}"' in content_disposition
+
+ def test_compliance_invalid_framework(self, authenticated_client, scans_fixture):
+ scan = scans_fixture[0]
+ scan.state = StateChoices.COMPLETED
+ scan.output_location = "dummy"
+ scan.save()
+
+ url = reverse("scan-compliance", kwargs={"pk": scan.id, "name": "invalid"})
+ resp = authenticated_client.get(url)
+ assert resp.status_code == status.HTTP_404_NOT_FOUND
+ assert resp.json()["errors"]["detail"] == "Compliance 'invalid' not found."
+
+ def test_compliance_executing(
+ self, authenticated_client, scans_fixture, monkeypatch
+ ):
+ scan = scans_fixture[0]
+ scan.state = StateChoices.EXECUTING
+ scan.save()
+ task = Task.objects.create(tenant_id=scan.tenant_id)
+ scan.task = task
+ scan.save()
+ dummy = {"id": str(task.id), "state": StateChoices.EXECUTING}
+
+ monkeypatch.setattr(
+ "api.v1.views.TaskSerializer",
+ lambda *args, **kwargs: type("S", (), {"data": dummy}),
+ )
+
+ framework = get_compliance_frameworks(scan.provider.provider)[0]
+ url = reverse("scan-compliance", kwargs={"pk": scan.id, "name": framework})
+ resp = authenticated_client.get(url)
+ assert resp.status_code == status.HTTP_202_ACCEPTED
+ assert "Content-Location" in resp
+ assert dummy["id"] in resp["Content-Location"]
+
+ def test_compliance_no_output(self, authenticated_client, scans_fixture):
+ scan = scans_fixture[0]
+ scan.state = StateChoices.COMPLETED
+ scan.output_location = ""
+ scan.save()
+
+ framework = get_compliance_frameworks(scan.provider.provider)[0]
+ url = reverse("scan-compliance", kwargs={"pk": scan.id, "name": framework})
+ resp = authenticated_client.get(url)
+ assert resp.status_code == status.HTTP_404_NOT_FOUND
+ assert resp.json()["errors"]["detail"] == "The scan has no reports."
+
+ def test_compliance_s3_no_credentials(
+ self, authenticated_client, scans_fixture, monkeypatch
+ ):
+ scan = scans_fixture[0]
+ bucket = "bucket"
+ key = "file.zip"
+ scan.output_location = f"s3://{bucket}/{key}"
scan.state = StateChoices.COMPLETED
scan.save()
monkeypatch.setattr(
- glob,
- "glob",
- lambda pattern: [str(file_path)] if pattern == str(file_path) else [],
+ "api.v1.views.get_s3_client",
+ lambda: (_ for _ in ()).throw(NoCredentialsError()),
)
+ framework = get_compliance_frameworks(scan.provider.provider)[0]
+ url = reverse("scan-compliance", kwargs={"pk": scan.id, "name": framework})
+ resp = authenticated_client.get(url)
+ assert resp.status_code == status.HTTP_403_FORBIDDEN
+ assert resp.json()["errors"]["detail"] == "There is a problem with credentials."
+
+ def test_compliance_s3_success(
+ self, authenticated_client, scans_fixture, monkeypatch
+ ):
+ scan = scans_fixture[0]
+ bucket = "bucket"
+ prefix = "path/scan.zip"
+ scan.output_location = f"s3://{bucket}/{prefix}"
+ scan.state = StateChoices.COMPLETED
+ scan.save()
+
+ monkeypatch.setattr(
+ "api.v1.views.env",
+ type("env", (), {"str": lambda self, *args, **kwargs: "test-bucket"})(),
+ )
+
+ match_key = "path/compliance/mitre_attack_aws.csv"
+
+ class FakeS3Client:
+ def list_objects_v2(self, Bucket, Prefix):
+ return {"Contents": [{"Key": match_key}]}
+
+ def get_object(self, Bucket, Key):
+ return {"Body": io.BytesIO(b"ignored")}
+
+ monkeypatch.setattr("api.v1.views.get_s3_client", lambda: FakeS3Client())
+
+ framework = match_key.split("/")[-1].split(".")[0]
+ url = reverse("scan-compliance", kwargs={"pk": scan.id, "name": framework})
+ resp = authenticated_client.get(url)
+ assert resp.status_code == status.HTTP_200_OK
+ cd = resp["Content-Disposition"]
+ assert cd.startswith('attachment; filename="')
+ assert cd.endswith('filename="mitre_attack_aws.csv"')
+
+ def test_compliance_s3_not_found(
+ self, authenticated_client, scans_fixture, monkeypatch
+ ):
+ scan = scans_fixture[0]
+ bucket = "bucket"
+ scan.output_location = f"s3://{bucket}/x/scan.zip"
+ scan.state = StateChoices.COMPLETED
+ scan.save()
+
+ monkeypatch.setattr(
+ "api.v1.views.env",
+ type("env", (), {"str": lambda self, *args, **kwargs: "test-bucket"})(),
+ )
+
+ class FakeS3Client:
+ def list_objects_v2(self, Bucket, Prefix):
+ return {"Contents": []}
+
+ def get_object(self, Bucket, Key):
+ return {"Body": io.BytesIO(b"ignored")}
+
+ monkeypatch.setattr("api.v1.views.get_s3_client", lambda: FakeS3Client())
+
+ url = reverse("scan-compliance", kwargs={"pk": scan.id, "name": "cis_1.4_aws"})
+ resp = authenticated_client.get(url)
+ assert resp.status_code == status.HTTP_404_NOT_FOUND
+ assert (
+ resp.json()["errors"]["detail"]
+ == "No compliance file found for name 'cis_1.4_aws'."
+ )
+
+ def test_compliance_local_file(
+ self, authenticated_client, scans_fixture, monkeypatch
+ ):
+ scan = scans_fixture[0]
+ scan.state = StateChoices.COMPLETED
+
+ with tempfile.TemporaryDirectory() as tmp:
+ tmp_path = Path(tmp)
+ base = tmp_path / "reports"
+ comp_dir = base / "compliance"
+ comp_dir.mkdir(parents=True, exist_ok=True)
+ fname = comp_dir / "scan_cis.csv"
+ fname.write_bytes(b"ignored")
+
+ scan.output_location = str(base / "scan.zip")
+ scan.save()
+
+ monkeypatch.setattr(
+ glob,
+ "glob",
+ lambda p: [str(fname)] if p.endswith("*_cis_1.4_aws.csv") else [],
+ )
+
+ url = reverse(
+ "scan-compliance", kwargs={"pk": scan.id, "name": "cis_1.4_aws"}
+ )
+ resp = authenticated_client.get(url)
+ assert resp.status_code == status.HTTP_200_OK
+ cd = resp["Content-Disposition"]
+ assert cd.startswith('attachment; filename="')
+ assert cd.endswith(f'filename="{fname.name}"')
+
+ @patch("api.v1.views.Task.objects.get")
+ @patch("api.v1.views.TaskSerializer")
+ def test__get_task_status_returns_none_if_task_not_executing(
+ self, mock_task_serializer, mock_task_get, authenticated_client, scans_fixture
+ ):
+ scan = scans_fixture[0]
+ scan.state = StateChoices.COMPLETED
+ scan.output_location = "dummy"
+ scan.save()
+
+ task = Task.objects.create(tenant_id=scan.tenant_id)
+ mock_task_get.return_value = task
+ mock_task_serializer.return_value.data = {
+ "id": str(task.id),
+ "state": StateChoices.COMPLETED,
+ }
+
url = reverse("scan-report", kwargs={"pk": scan.id})
response = authenticated_client.get(url)
- assert response.status_code == 200
- assert response.content == file_content
- content_disposition = response.get("Content-Disposition")
- assert content_disposition.startswith('attachment; filename="')
- assert f'filename="{file_path.name}"' in content_disposition
+
+ assert response.status_code == status.HTTP_404_NOT_FOUND
+
+ @patch("api.v1.views.get_s3_client")
+ @patch("api.v1.views.sentry_sdk.capture_exception")
+ def test_compliance_list_objects_client_error(
+ self,
+ mock_sentry_capture,
+ mock_get_s3_client,
+ authenticated_client,
+ scans_fixture,
+ ):
+ scan = scans_fixture[0]
+ scan.output_location = "s3://test-bucket/path/to/scan.zip"
+ scan.state = StateChoices.COMPLETED
+ scan.save()
+
+ fake_client = MagicMock()
+ fake_client.list_objects_v2.side_effect = ClientError(
+ {"Error": {"Code": "InternalError"}}, "ListObjectsV2"
+ )
+ mock_get_s3_client.return_value = fake_client
+
+ framework = get_compliance_frameworks(scan.provider.provider)[0]
+ url = reverse("scan-compliance", kwargs={"pk": scan.id, "name": framework})
+ response = authenticated_client.get(url)
+
+ assert response.status_code == status.HTTP_502_BAD_GATEWAY
+ assert (
+ response.json()["errors"]["detail"]
+ == "Unable to list compliance files in S3: encountered an AWS error."
+ )
+ mock_sentry_capture.assert_called()
+
+ @patch("api.v1.views.get_s3_client")
+ def test_report_s3_nosuchkey(
+ self, mock_get_s3_client, authenticated_client, scans_fixture
+ ):
+ scan = scans_fixture[0]
+ scan.output_location = "s3://test-bucket/report.zip"
+ scan.state = StateChoices.COMPLETED
+ scan.save()
+
+ fake_client = MagicMock()
+ fake_client.get_object.side_effect = ClientError(
+ {"Error": {"Code": "NoSuchKey"}}, "GetObject"
+ )
+ mock_get_s3_client.return_value = fake_client
+
+ url = reverse("scan-report", kwargs={"pk": scan.id})
+ response = authenticated_client.get(url)
+
+ assert response.status_code == status.HTTP_404_NOT_FOUND
+ assert response.json()["errors"]["detail"] == "The scan has no reports."
+
+ @patch("api.v1.views.get_s3_client")
+ def test_report_s3_client_error_other(
+ self, mock_get_s3_client, authenticated_client, scans_fixture
+ ):
+ scan = scans_fixture[0]
+ scan.output_location = "s3://test-bucket/report.zip"
+ scan.state = StateChoices.COMPLETED
+ scan.save()
+
+ fake_client = MagicMock()
+ fake_client.get_object.side_effect = ClientError(
+ {"Error": {"Code": "AccessDenied"}}, "GetObject"
+ )
+ mock_get_s3_client.return_value = fake_client
+
+ url = reverse("scan-report", kwargs={"pk": scan.id})
+ response = authenticated_client.get(url)
+
+ assert response.status_code == status.HTTP_403_FORBIDDEN
+ assert (
+ response.json()["errors"]["detail"]
+ == "There is a problem with credentials."
+ )
@pytest.mark.django_db
@@ -2837,7 +3102,9 @@ class TestFindingViewSet:
)
assert response.status_code == status.HTTP_404_NOT_FOUND
- def test_findings_metadata_retrieve(self, authenticated_client, findings_fixture):
+ def test_findings_metadata_retrieve(
+ self, authenticated_client, findings_fixture, backfill_scan_metadata_fixture
+ ):
finding_1, *_ = findings_fixture
response = authenticated_client.get(
reverse("finding-metadata"),
@@ -2860,14 +3127,14 @@ class TestFindingViewSet:
)
# assert data["data"]["attributes"]["tags"] == expected_tags
- def test_findings_metadata_severity_retrieve(
- self, authenticated_client, findings_fixture
+ def test_findings_metadata_resource_filter_retrieve(
+ self, authenticated_client, findings_fixture, backfill_scan_metadata_fixture
):
finding_1, *_ = findings_fixture
response = authenticated_client.get(
reverse("finding-metadata"),
{
- "filter[severity__in]": ["low", "medium"],
+ "filter[region]": "eu-west-1",
"filter[inserted_at]": finding_1.inserted_at.strftime("%Y-%m-%d"),
},
)
@@ -2918,6 +3185,29 @@ class TestFindingViewSet:
]
}
+ def test_findings_latest(self, authenticated_client, latest_scan_finding):
+ response = authenticated_client.get(
+ reverse("finding-latest"),
+ )
+ assert response.status_code == status.HTTP_200_OK
+ # The latest scan only has one finding, in comparison with `GET /findings`
+ assert len(response.json()["data"]) == 1
+ assert (
+ response.json()["data"][0]["attributes"]["status"]
+ == latest_scan_finding.status
+ )
+
+ def test_findings_metadata_latest(self, authenticated_client, latest_scan_finding):
+ response = authenticated_client.get(
+ reverse("finding-metadata_latest"),
+ )
+ assert response.status_code == status.HTTP_200_OK
+ attributes = response.json()["data"]["attributes"]
+
+ assert attributes["services"] == latest_scan_finding.resource_services
+ assert attributes["regions"] == latest_scan_finding.resource_regions
+ assert attributes["resource_types"] == latest_scan_finding.resource_types
+
@pytest.mark.django_db
class TestJWTFields:
@@ -4555,9 +4845,8 @@ class TestOverviewViewSet:
assert response.json()["data"][0]["attributes"]["findings"]["pass"] == 2
assert response.json()["data"][0]["attributes"]["findings"]["fail"] == 1
assert response.json()["data"][0]["attributes"]["findings"]["muted"] == 1
- assert response.json()["data"][0]["attributes"]["resources"]["total"] == len(
- resources_fixture
- )
+ # Since we rely on completed scans, there are only 2 resources now
+ assert response.json()["data"][0]["attributes"]["resources"]["total"] == 2
def test_overview_services_list_no_required_filters(
self, authenticated_client, scan_summaries_fixture
diff --git a/api/src/backend/api/utils.py b/api/src/backend/api/utils.py
index 63581c266e..ce3f4feb52 100644
--- a/api/src/backend/api/utils.py
+++ b/api/src/backend/api/utils.py
@@ -1,11 +1,14 @@
from datetime import datetime, timezone
from allauth.socialaccount.providers.oauth2.client import OAuth2Client
+from django.contrib.postgres.aggregates import ArrayAgg
+from django.db.models import Subquery
from rest_framework.exceptions import NotFound, ValidationError
from api.db_router import MainRouter
from api.exceptions import InvitationTokenExpiredException
-from api.models import Invitation, Provider
+from api.models import Invitation, Provider, Resource
+from api.v1.serializers import FindingMetadataSerializer
from prowler.providers.aws.aws_provider import AwsProvider
from prowler.providers.azure.azure_provider import AzureProvider
from prowler.providers.common.models import Connection
@@ -205,3 +208,33 @@ def validate_invitation(
)
return invitation
+
+
+# ToRemove after removing the fallback mechanism in /findings/metadata
+def get_findings_metadata_no_aggregations(tenant_id: str, filtered_queryset):
+ filtered_ids = filtered_queryset.order_by().values("id")
+
+ relevant_resources = Resource.all_objects.filter(
+ tenant_id=tenant_id, findings__id__in=Subquery(filtered_ids)
+ ).only("service", "region", "type")
+
+ aggregation = relevant_resources.aggregate(
+ services=ArrayAgg("service", flat=True),
+ regions=ArrayAgg("region", flat=True),
+ resource_types=ArrayAgg("type", flat=True),
+ )
+
+ services = sorted(set(aggregation["services"] or []))
+ regions = sorted({region for region in aggregation["regions"] or [] if region})
+ resource_types = sorted(set(aggregation["resource_types"] or []))
+
+ result = {
+ "services": services,
+ "regions": regions,
+ "resource_types": resource_types,
+ }
+
+ serializer = FindingMetadataSerializer(data=result)
+ serializer.is_valid(raise_exception=True)
+
+ return serializer.data
diff --git a/api/src/backend/api/v1/mixins.py b/api/src/backend/api/v1/mixins.py
new file mode 100644
index 0000000000..85250c0eef
--- /dev/null
+++ b/api/src/backend/api/v1/mixins.py
@@ -0,0 +1,33 @@
+from rest_framework.response import Response
+
+
+class PaginateByPkMixin:
+ """
+ Mixin to paginate on a list of PKs (cheaper than heavy JOINs),
+ re-fetch the full objects with the desired select/prefetch,
+ re-sort them to preserve DB ordering, then serialize + return.
+ """
+
+ def paginate_by_pk(
+ self,
+ request, # noqa: F841
+ base_queryset,
+ manager,
+ select_related: list[str] | None = None,
+ prefetch_related: list[str] | None = None,
+ ) -> Response:
+ pk_list = base_queryset.values_list("id", flat=True)
+ page = self.paginate_queryset(pk_list)
+ if page is None:
+ return Response(self.get_serializer(base_queryset, many=True).data)
+
+ queryset = manager.filter(id__in=page)
+ if select_related:
+ queryset = queryset.select_related(*select_related)
+ if prefetch_related:
+ queryset = queryset.prefetch_related(*prefetch_related)
+
+ queryset = sorted(queryset, key=lambda obj: page.index(obj.id))
+
+ serialized = self.get_serializer(queryset, many=True).data
+ return self.get_paginated_response(serialized)
diff --git a/api/src/backend/api/v1/serializers.py b/api/src/backend/api/v1/serializers.py
index 920384ba65..c0440f3ef0 100644
--- a/api/src/backend/api/v1/serializers.py
+++ b/api/src/backend/api/v1/serializers.py
@@ -960,6 +960,15 @@ class ScanReportSerializer(serializers.Serializer):
fields = ["id"]
+class ScanComplianceReportSerializer(serializers.Serializer):
+ id = serializers.CharField(source="scan")
+ name = serializers.CharField()
+
+ class Meta:
+ resource_name = "scan-reports"
+ fields = ["id", "name"]
+
+
class ResourceTagSerializer(RLSSerializer):
"""
Serializer for the ResourceTag model
diff --git a/api/src/backend/api/v1/views.py b/api/src/backend/api/v1/views.py
index 606078b558..eec7b4827c 100644
--- a/api/src/backend/api/v1/views.py
+++ b/api/src/backend/api/v1/views.py
@@ -1,5 +1,6 @@
import glob
import os
+from datetime import datetime, timedelta, timezone
import sentry_sdk
from allauth.socialaccount.providers.github.views import GitHubOAuth2Adapter
@@ -20,6 +21,7 @@ from django.db.models import Count, Exists, F, OuterRef, Prefetch, Q, Subquery,
from django.db.models.functions import Coalesce
from django.http import HttpResponse
from django.urls import reverse
+from django.utils.dateparse import parse_date
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_control
from django_celery_beat.models import PeriodicTask
@@ -48,6 +50,7 @@ from rest_framework_simplejwt.exceptions import InvalidToken, TokenError
from tasks.beat import schedule_provider_scan
from tasks.jobs.export import get_s3_client
from tasks.tasks import (
+ backfill_scan_resource_summaries_task,
check_provider_connection_task,
delete_provider_task,
delete_tenant_task,
@@ -55,12 +58,14 @@ from tasks.tasks import (
)
from api.base_views import BaseRLSViewSet, BaseTenantViewset, BaseUserViewset
+from api.compliance import get_compliance_frameworks
from api.db_router import MainRouter
from api.filters import (
ComplianceOverviewFilter,
FindingFilter,
IntegrationFilter,
InvitationFilter,
+ LatestFindingFilter,
MembershipFilter,
ProviderFilter,
ProviderGroupFilter,
@@ -86,6 +91,7 @@ from api.models import (
ProviderSecret,
Resource,
ResourceFindingMapping,
+ ResourceScanSummary,
Role,
RoleProviderGroupRelationship,
Scan,
@@ -99,7 +105,13 @@ from api.models import (
from api.pagination import ComplianceOverviewPagination
from api.rbac.permissions import Permissions, get_providers, get_role
from api.rls import Tenant
-from api.utils import CustomOAuth2Client, validate_invitation
+from api.utils import (
+ CustomOAuth2Client,
+ get_findings_metadata_no_aggregations,
+ validate_invitation,
+)
+from api.uuid_utils import datetime_to_uuid7, uuid7_start
+from api.v1.mixins import PaginateByPkMixin
from api.v1.serializers import (
ComplianceOverviewFullSerializer,
ComplianceOverviewMetadataSerializer,
@@ -134,6 +146,7 @@ from api.v1.serializers import (
RoleProviderGroupRelationshipSerializer,
RoleSerializer,
RoleUpdateSerializer,
+ ScanComplianceReportSerializer,
ScanCreateSerializer,
ScanReportSerializer,
ScanSerializer,
@@ -247,7 +260,7 @@ class SchemaView(SpectacularAPIView):
def get(self, request, *args, **kwargs):
spectacular_settings.TITLE = "Prowler API"
- spectacular_settings.VERSION = "1.7.0"
+ spectacular_settings.VERSION = "1.8.0"
spectacular_settings.DESCRIPTION = (
"Prowler API specification.\n\nThis file is auto-generated."
)
@@ -1150,6 +1163,27 @@ class ProviderViewSet(BaseRLSViewSet):
404: OpenApiResponse(description="The scan has no reports"),
},
),
+ compliance=extend_schema(
+ tags=["Scan"],
+ summary="Retrieve compliance report as CSV",
+ description="Download a specific compliance report (e.g., 'cis_1.4_aws') as a CSV file.",
+ parameters=[
+ OpenApiParameter(
+ name="name",
+ type=str,
+ location=OpenApiParameter.PATH,
+ required=True,
+ description="The compliance report name, like 'cis_1.4_aws'",
+ ),
+ ],
+ responses={
+ 200: OpenApiResponse(
+ description="CSV file containing the compliance report"
+ ),
+ 404: OpenApiResponse(description="Compliance report not found"),
+ },
+ request=None,
+ ),
)
@method_decorator(CACHE_DECORATOR, name="list")
@method_decorator(CACHE_DECORATOR, name="retrieve")
@@ -1202,6 +1236,10 @@ class ScanViewSet(BaseRLSViewSet):
if hasattr(self, "response_serializer_class"):
return self.response_serializer_class
return ScanReportSerializer
+ elif self.action == "compliance":
+ if hasattr(self, "response_serializer_class"):
+ return self.response_serializer_class
+ return ScanComplianceReportSerializer
return super().get_serializer_class()
def partial_update(self, request, *args, **kwargs):
@@ -1219,70 +1257,111 @@ class ScanViewSet(BaseRLSViewSet):
)
return Response(data=read_serializer.data, status=status.HTTP_200_OK)
- @action(detail=True, methods=["get"], url_name="report")
- def report(self, request, pk=None):
- scan_instance = self.get_object()
+ def _get_task_status(self, scan_instance):
+ """
+ Returns task status if the scan or its associated report-generation task is still executing.
- if scan_instance.state == StateChoices.EXECUTING:
- # If the scan is still running, return the task
- prowler_task = Task.objects.get(id=scan_instance.task.id)
- self.response_serializer_class = TaskSerializer
- output_serializer = self.get_serializer(prowler_task)
- return Response(
- data=output_serializer.data,
- status=status.HTTP_202_ACCEPTED,
- headers={
- "Content-Location": reverse(
- "task-detail", kwargs={"pk": output_serializer.data["id"]}
- )
- },
- )
+ If the scan is in an EXECUTING state or if a background task related to report generation
+ is found and also executing, this method returns a 202 Accepted response with the task
+ metadata and a `Content-Location` header pointing to the task detail endpoint.
- try:
- output_celery_task = Task.objects.get(
- task_runner_task__task_name="scan-report",
- task_runner_task__task_args__contains=pk,
- )
- self.response_serializer_class = TaskSerializer
- output_serializer = self.get_serializer(output_celery_task)
- if output_serializer.data["state"] == StateChoices.EXECUTING:
- # If the task is still running, return the task
- return Response(
- data=output_serializer.data,
- status=status.HTTP_202_ACCEPTED,
- headers={
- "Content-Location": reverse(
- "task-detail", kwargs={"pk": output_serializer.data["id"]}
- )
- },
- )
- except Task.DoesNotExist:
- # If the task does not exist, it means that the task is removed from the database
- pass
+ Args:
+ scan_instance (Scan): The scan instance for which the task status is being checked.
- output_location = scan_instance.output_location
- if not output_location:
- return Response(
- {"detail": "The scan has no reports."},
- status=status.HTTP_404_NOT_FOUND,
- )
+ Returns:
+ Response or None:
+ - A `Response` with HTTP 202 status and serialized task data if the task is executing.
+ - `None` if no running task is found or if the task has already completed.
+ """
+ task = None
- if scan_instance.output_location.startswith("s3://"):
+ if scan_instance.state == StateChoices.EXECUTING and scan_instance.task:
+ task = scan_instance.task
+ else:
try:
- s3_client = get_s3_client()
+ task = Task.objects.get(
+ task_runner_task__task_name="scan-report",
+ task_runner_task__task_args__contains=str(scan_instance.id),
+ )
+ except Task.DoesNotExist:
+ return None
+
+ self.response_serializer_class = TaskSerializer
+ serializer = self.get_serializer(task)
+
+ if serializer.data.get("state") != StateChoices.EXECUTING:
+ return None
+
+ return Response(
+ data=serializer.data,
+ status=status.HTTP_202_ACCEPTED,
+ headers={
+ "Content-Location": reverse(
+ "task-detail", kwargs={"pk": serializer.data["id"]}
+ )
+ },
+ )
+
+ def _load_file(self, path_pattern, s3=False, bucket=None, list_objects=False):
+ """
+ Loads a binary file (e.g., ZIP or CSV) and returns its content and filename.
+
+ Depending on the input parameters, this method supports loading:
+ - From S3 using a direct key.
+ - From S3 by listing objects under a prefix and matching suffix.
+ - From the local filesystem using glob pattern matching.
+
+ Args:
+ path_pattern (str): The key or glob pattern representing the file location.
+ s3 (bool, optional): Whether the file is stored in S3. Defaults to False.
+ bucket (str, optional): The name of the S3 bucket, required if `s3=True`. Defaults to None.
+ list_objects (bool, optional): If True and `s3=True`, list objects by prefix to find the file. Defaults to False.
+
+ Returns:
+ tuple[bytes, str]: A tuple containing the file content as bytes and the filename if successful.
+ Response: A DRF `Response` object with an appropriate status and error detail if an error occurs.
+ """
+ if s3:
+ try:
+ client = get_s3_client()
except (ClientError, NoCredentialsError, ParamValidationError):
return Response(
{"detail": "There is a problem with credentials."},
status=status.HTTP_403_FORBIDDEN,
)
-
- bucket_name = env.str("DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET")
- key = output_location[len(f"s3://{bucket_name}/") :]
+ if list_objects:
+ # list keys under prefix then match suffix
+ prefix = os.path.dirname(path_pattern)
+ suffix = os.path.basename(path_pattern)
+ try:
+ resp = client.list_objects_v2(Bucket=bucket, Prefix=prefix)
+ except ClientError as e:
+ sentry_sdk.capture_exception(e)
+ return Response(
+ {
+ "detail": "Unable to list compliance files in S3: encountered an AWS error."
+ },
+ status=status.HTTP_502_BAD_GATEWAY,
+ )
+ contents = resp.get("Contents", [])
+ keys = [obj["Key"] for obj in contents if obj["Key"].endswith(suffix)]
+ if not keys:
+ return Response(
+ {
+ "detail": f"No compliance file found for name '{os.path.splitext(suffix)[0]}'."
+ },
+ status=status.HTTP_404_NOT_FOUND,
+ )
+ # path_pattern here is prefix, but in compliance we build correct suffix check before
+ key = keys[0]
+ else:
+ # path_pattern is exact key
+ key = path_pattern
try:
- s3_object = s3_client.get_object(Bucket=bucket_name, Key=key)
+ s3_obj = client.get_object(Bucket=bucket, Key=key)
except ClientError as e:
- error_code = e.response.get("Error", {}).get("Code")
- if error_code == "NoSuchKey":
+ code = e.response.get("Error", {}).get("Code")
+ if code == "NoSuchKey":
return Response(
{"detail": "The scan has no reports."},
status=status.HTTP_404_NOT_FOUND,
@@ -1291,28 +1370,97 @@ class ScanViewSet(BaseRLSViewSet):
{"detail": "There is a problem with credentials."},
status=status.HTTP_403_FORBIDDEN,
)
- file_content = s3_object["Body"].read()
- filename = os.path.basename(output_location.split("/")[-1])
+ content = s3_obj["Body"].read()
+ filename = os.path.basename(key)
else:
- zip_files = glob.glob(output_location)
- try:
- file_path = zip_files[0]
- except IndexError as e:
- sentry_sdk.capture_exception(e)
+ files = glob.glob(path_pattern)
+ if not files:
return Response(
{"detail": "The scan has no reports."},
status=status.HTTP_404_NOT_FOUND,
)
- with open(file_path, "rb") as f:
- file_content = f.read()
- filename = os.path.basename(file_path)
+ filepath = files[0]
+ with open(filepath, "rb") as f:
+ content = f.read()
+ filename = os.path.basename(filepath)
- response = HttpResponse(
- file_content, content_type="application/x-zip-compressed"
- )
+ return content, filename
+
+ def _serve_file(self, content, filename, content_type):
+ response = HttpResponse(content, content_type=content_type)
response["Content-Disposition"] = f'attachment; filename="{filename}"'
+
return response
+ @action(detail=True, methods=["get"], url_name="report")
+ def report(self, request, pk=None):
+ scan = self.get_object()
+ # Check for executing tasks
+ running_resp = self._get_task_status(scan)
+ if running_resp:
+ return running_resp
+
+ if not scan.output_location:
+ return Response(
+ {"detail": "The scan has no reports."}, status=status.HTTP_404_NOT_FOUND
+ )
+
+ if scan.output_location.startswith("s3://"):
+ bucket = env.str("DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET", "")
+ key_prefix = scan.output_location.removeprefix(f"s3://{bucket}/")
+ loader = self._load_file(
+ key_prefix, s3=True, bucket=bucket, list_objects=False
+ )
+ else:
+ loader = self._load_file(scan.output_location, s3=False)
+
+ if isinstance(loader, Response):
+ return loader
+
+ content, filename = loader
+ return self._serve_file(content, filename, "application/x-zip-compressed")
+
+ @action(
+ detail=True,
+ methods=["get"],
+ url_path="compliance/(?P[^/]+)",
+ url_name="compliance",
+ )
+ def compliance(self, request, pk=None, name=None):
+ scan = self.get_object()
+ if name not in get_compliance_frameworks(scan.provider.provider):
+ return Response(
+ {"detail": f"Compliance '{name}' not found."},
+ status=status.HTTP_404_NOT_FOUND,
+ )
+
+ running_resp = self._get_task_status(scan)
+ if running_resp:
+ return running_resp
+
+ if not scan.output_location:
+ return Response(
+ {"detail": "The scan has no reports."}, status=status.HTTP_404_NOT_FOUND
+ )
+
+ if scan.output_location.startswith("s3://"):
+ bucket = env.str("DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET", "")
+ key_prefix = scan.output_location.removeprefix(f"s3://{bucket}/")
+ prefix = os.path.join(
+ os.path.dirname(key_prefix), "compliance", f"{name}.csv"
+ )
+ loader = self._load_file(prefix, s3=True, bucket=bucket, list_objects=True)
+ else:
+ base = os.path.dirname(scan.output_location)
+ pattern = os.path.join(base, "compliance", f"*_{name}.csv")
+ loader = self._load_file(pattern, s3=False)
+
+ if isinstance(loader, Response):
+ return loader
+
+ content, filename = loader
+ return self._serve_file(content, filename, "text/csv")
+
def create(self, request, *args, **kwargs):
input_serializer = self.get_serializer(data=request.data)
input_serializer.is_valid(raise_exception=True)
@@ -1525,10 +1673,24 @@ class ResourceViewSet(BaseRLSViewSet):
],
filters=True,
),
+ latest=extend_schema(
+ tags=["Finding"],
+ summary="List the latest findings",
+ description="Retrieve a list of the latest findings from the latest scans for each provider with options for "
+ "filtering by various criteria.",
+ filters=True,
+ ),
+ metadata_latest=extend_schema(
+ tags=["Finding"],
+ summary="Retrieve metadata values from the latest findings",
+ description="Fetch unique metadata values from a set of findings from the latest scans for each provider. "
+ "This is useful for dynamic filtering.",
+ filters=True,
+ ),
)
@method_decorator(CACHE_DECORATOR, name="list")
@method_decorator(CACHE_DECORATOR, name="retrieve")
-class FindingViewSet(BaseRLSViewSet):
+class FindingViewSet(PaginateByPkMixin, BaseRLSViewSet):
queryset = Finding.all_objects.all()
serializer_class = FindingSerializer
filterset_class = FindingFilter
@@ -1560,11 +1722,16 @@ class FindingViewSet(BaseRLSViewSet):
def get_serializer_class(self):
if self.action == "findings_services_regions":
return FindingDynamicFilterSerializer
- elif self.action == "metadata":
+ elif self.action in ["metadata", "metadata_latest"]:
return FindingMetadataSerializer
return super().get_serializer_class()
+ def get_filterset_class(self):
+ if self.action in ["latest", "metadata_latest"]:
+ return LatestFindingFilter
+ return FindingFilter
+
def get_queryset(self):
tenant_id = self.request.tenant_id
user_roles = get_role(self.request.user)
@@ -1604,21 +1771,14 @@ class FindingViewSet(BaseRLSViewSet):
return super().filter_queryset(queryset)
def list(self, request, *args, **kwargs):
- base_qs = self.filter_queryset(self.get_queryset())
- paginated_ids = self.paginate_queryset(base_qs.values_list("id", flat=True))
- if paginated_ids is not None:
- ids = list(paginated_ids)
- findings = (
- Finding.all_objects.filter(tenant_id=self.request.tenant_id, id__in=ids)
- .select_related("scan")
- .prefetch_related("resources")
- )
- # Re-sort in Python to preserve ordering:
- findings = sorted(findings, key=lambda x: ids.index(x.id))
- serializer = self.get_serializer(findings, many=True)
- return self.get_paginated_response(serializer.data)
- serializer = self.get_serializer(base_qs, many=True)
- return Response(serializer.data)
+ filtered_queryset = self.filter_queryset(self.get_queryset())
+ return self.paginate_by_pk(
+ request,
+ filtered_queryset,
+ manager=Finding.all_objects,
+ select_related=["scan"],
+ prefetch_related=["resources"],
+ )
@action(detail=False, methods=["get"], url_name="findings_services_regions")
def findings_services_regions(self, request):
@@ -1643,25 +1803,103 @@ class FindingViewSet(BaseRLSViewSet):
@action(detail=False, methods=["get"], url_name="metadata")
def metadata(self, request):
- tenant_id = self.request.tenant_id
- queryset = self.get_queryset()
- filtered_queryset = self.filter_queryset(queryset)
+ # Force filter validation
+ filtered_queryset = self.filter_queryset(self.get_queryset())
- filtered_ids = filtered_queryset.order_by().values("id")
+ tenant_id = request.tenant_id
+ query_params = request.query_params
- relevant_resources = Resource.all_objects.filter(
- tenant_id=tenant_id, findings__id__in=Subquery(filtered_ids)
- ).only("service", "region", "type")
+ queryset = ResourceScanSummary.objects.filter(tenant_id=tenant_id)
+ scan_based_filters = {}
- aggregation = relevant_resources.aggregate(
- services=ArrayAgg("service", flat=True),
- regions=ArrayAgg("region", flat=True),
- resource_types=ArrayAgg("type", flat=True),
+ if scans := query_params.get("filter[scan__in]") or query_params.get(
+ "filter[scan]"
+ ):
+ queryset = queryset.filter(scan_id__in=scans.split(","))
+ scan_based_filters = {"id__in": scans.split(",")}
+ else:
+ exact = query_params.get("filter[inserted_at]")
+ gte = query_params.get("filter[inserted_at__gte]")
+ lte = query_params.get("filter[inserted_at__lte]")
+
+ date_filters = {}
+ if exact:
+ date = parse_date(exact)
+ datetime_start = datetime.combine(
+ date, datetime.min.time(), tzinfo=timezone.utc
+ )
+ datetime_end = datetime_start + timedelta(days=1)
+ date_filters["scan_id__gte"] = uuid7_start(
+ datetime_to_uuid7(datetime_start)
+ )
+ date_filters["scan_id__lt"] = uuid7_start(
+ datetime_to_uuid7(datetime_end)
+ )
+ else:
+ if gte:
+ date_start = parse_date(gte)
+ datetime_start = datetime.combine(
+ date_start, datetime.min.time(), tzinfo=timezone.utc
+ )
+ date_filters["scan_id__gte"] = uuid7_start(
+ datetime_to_uuid7(datetime_start)
+ )
+ if lte:
+ date_end = parse_date(lte)
+ datetime_end = datetime.combine(
+ date_end + timedelta(days=1),
+ datetime.min.time(),
+ tzinfo=timezone.utc,
+ )
+ date_filters["scan_id__lt"] = uuid7_start(
+ datetime_to_uuid7(datetime_end)
+ )
+
+ if date_filters:
+ queryset = queryset.filter(**date_filters)
+ scan_based_filters = {
+ key.lstrip("scan_"): value for key, value in date_filters.items()
+ }
+
+ # ToRemove: Temporary fallback mechanism
+ if not queryset.exists():
+ scan_ids = Scan.objects.filter(
+ tenant_id=tenant_id, **scan_based_filters
+ ).values_list("id", flat=True)
+ for scan_id in scan_ids:
+ backfill_scan_resource_summaries_task.apply_async(
+ kwargs={"tenant_id": tenant_id, "scan_id": scan_id}
+ )
+ return Response(
+ get_findings_metadata_no_aggregations(tenant_id, filtered_queryset)
+ )
+
+ if service_filter := query_params.get("filter[service]") or query_params.get(
+ "filter[service__in]"
+ ):
+ queryset = queryset.filter(service__in=service_filter.split(","))
+ if region_filter := query_params.get("filter[region]") or query_params.get(
+ "filter[region__in]"
+ ):
+ queryset = queryset.filter(region__in=region_filter.split(","))
+ if resource_type_filter := query_params.get(
+ "filter[resource_type]"
+ ) or query_params.get("filter[resource_type__in]"):
+ queryset = queryset.filter(
+ resource_type__in=resource_type_filter.split(",")
+ )
+
+ services = list(
+ queryset.values_list("service", flat=True).distinct().order_by("service")
+ )
+ regions = list(
+ queryset.values_list("region", flat=True).distinct().order_by("region")
+ )
+ resource_types = list(
+ queryset.values_list("resource_type", flat=True)
+ .distinct()
+ .order_by("resource_type")
)
-
- services = sorted(set(aggregation["services"] or []))
- regions = sorted({region for region in aggregation["regions"] or [] if region})
- resource_types = sorted(set(aggregation["resource_types"] or []))
result = {
"services": services,
@@ -1671,7 +1909,110 @@ class FindingViewSet(BaseRLSViewSet):
serializer = self.get_serializer(data=result)
serializer.is_valid(raise_exception=True)
- return Response(serializer.data, status=status.HTTP_200_OK)
+ return Response(serializer.data)
+
+ @action(detail=False, methods=["get"], url_name="latest")
+ def latest(self, request):
+ tenant_id = request.tenant_id
+ filtered_queryset = self.filter_queryset(self.get_queryset())
+
+ latest_scan_ids = (
+ Scan.all_objects.filter(tenant_id=tenant_id, state=StateChoices.COMPLETED)
+ .order_by("provider_id", "-inserted_at")
+ .distinct("provider_id")
+ .values_list("id", flat=True)
+ )
+ filtered_queryset = filtered_queryset.filter(
+ tenant_id=tenant_id, scan_id__in=latest_scan_ids
+ )
+
+ return self.paginate_by_pk(
+ request,
+ filtered_queryset,
+ manager=Finding.all_objects,
+ select_related=["scan"],
+ prefetch_related=["resources"],
+ )
+
+ @action(
+ detail=False,
+ methods=["get"],
+ url_name="metadata_latest",
+ url_path="metadata/latest",
+ )
+ def metadata_latest(self, request):
+ # Force filter validation
+ filtered_queryset = self.filter_queryset(self.get_queryset())
+
+ tenant_id = request.tenant_id
+ query_params = request.query_params
+
+ latest_scan_ids = (
+ Scan.all_objects.filter(tenant_id=tenant_id, state=StateChoices.COMPLETED)
+ .order_by("provider_id", "-inserted_at")
+ .distinct("provider_id")
+ .values_list("id", flat=True)
+ )
+
+ queryset = ResourceScanSummary.objects.filter(
+ tenant_id=tenant_id, scan_id__in=latest_scan_ids
+ )
+ # ToRemove: Temporary fallback mechanism
+ scans_with_flag = latest_scan_ids.annotate(
+ has_summary=Exists(
+ ResourceScanSummary.objects.filter(
+ tenant_id=tenant_id,
+ scan_id=OuterRef("pk"),
+ )
+ )
+ )
+ if missing_scan_ids := scans_with_flag.filter(has_summary=False).values_list(
+ "id", flat=True
+ ):
+ for scan_id in missing_scan_ids:
+ backfill_scan_resource_summaries_task.apply_async(
+ kwargs={"tenant_id": tenant_id, "scan_id": scan_id}
+ )
+ return Response(
+ get_findings_metadata_no_aggregations(tenant_id, filtered_queryset)
+ )
+
+ if service_filter := query_params.get("filter[service]") or query_params.get(
+ "filter[service__in]"
+ ):
+ queryset = queryset.filter(service__in=service_filter.split(","))
+ if region_filter := query_params.get("filter[region]") or query_params.get(
+ "filter[region__in]"
+ ):
+ queryset = queryset.filter(region__in=region_filter.split(","))
+ if resource_type_filter := query_params.get(
+ "filter[resource_type]"
+ ) or query_params.get("filter[resource_type__in]"):
+ queryset = queryset.filter(
+ resource_type__in=resource_type_filter.split(",")
+ )
+
+ services = list(
+ queryset.values_list("service", flat=True).distinct().order_by("service")
+ )
+ regions = list(
+ queryset.values_list("region", flat=True).distinct().order_by("region")
+ )
+ resource_types = list(
+ queryset.values_list("resource_type", flat=True)
+ .distinct()
+ .order_by("resource_type")
+ )
+
+ result = {
+ "services": services,
+ "regions": regions,
+ "resource_types": resource_types,
+ }
+
+ serializer = self.get_serializer(data=result)
+ serializer.is_valid(raise_exception=True)
+ return Response(serializer.data)
@extend_schema_view(
@@ -2238,8 +2579,8 @@ class OverviewViewSet(BaseRLSViewSet):
def _get_filtered_queryset(model):
if role.unlimited_visibility:
- return model.objects.filter(tenant_id=self.request.tenant_id)
- return model.objects.filter(
+ return model.all_objects.filter(tenant_id=self.request.tenant_id)
+ return model.all_objects.filter(
tenant_id=self.request.tenant_id, scan__provider__in=providers
)
@@ -2283,18 +2624,20 @@ class OverviewViewSet(BaseRLSViewSet):
tenant_id = self.request.tenant_id
latest_scan_ids = (
- Scan.objects.filter(
- tenant_id=tenant_id,
- state=StateChoices.COMPLETED,
- )
+ Scan.all_objects.filter(tenant_id=tenant_id, state=StateChoices.COMPLETED)
.order_by("provider_id", "-inserted_at")
.distinct("provider_id")
.values_list("id", flat=True)
)
findings_aggregated = (
- ScanSummary.objects.filter(tenant_id=tenant_id, scan_id__in=latest_scan_ids)
- .values("scan__provider__provider")
+ ScanSummary.all_objects.filter(
+ tenant_id=tenant_id, scan_id__in=latest_scan_ids
+ )
+ .values(
+ "scan__provider_id",
+ provider=F("scan__provider__provider"),
+ )
.annotate(
findings_passed=Coalesce(Sum("_pass"), 0),
findings_failed=Coalesce(Sum("fail"), 0),
@@ -2304,22 +2647,20 @@ class OverviewViewSet(BaseRLSViewSet):
)
resources_aggregated = (
- Resource.objects.filter(tenant_id=tenant_id)
- .values("provider__provider")
+ Resource.all_objects.filter(tenant_id=tenant_id)
+ .values("provider_id")
.annotate(total_resources=Count("id"))
)
- resources_dict = {
- row["provider__provider"]: row["total_resources"]
- for row in resources_aggregated
+ resource_map = {
+ row["provider_id"]: row["total_resources"] for row in resources_aggregated
}
overview = []
for row in findings_aggregated:
- provider_type = row["scan__provider__provider"]
overview.append(
{
- "provider": provider_type,
- "total_resources": resources_dict.get(provider_type, 0),
+ "provider": row["provider"],
+ "total_resources": resource_map.get(row["scan__provider_id"], 0),
"total_findings": row["total_findings"],
"findings_passed": row["findings_passed"],
"findings_failed": row["findings_failed"],
@@ -2327,8 +2668,10 @@ class OverviewViewSet(BaseRLSViewSet):
}
)
- serializer = OverviewProviderSerializer(overview, many=True)
- return Response(serializer.data, status=status.HTTP_200_OK)
+ return Response(
+ OverviewProviderSerializer(overview, many=True).data,
+ status=status.HTTP_200_OK,
+ )
@action(detail=False, methods=["get"], url_name="findings")
def findings(self, request):
@@ -2336,22 +2679,16 @@ class OverviewViewSet(BaseRLSViewSet):
queryset = self.get_queryset()
filtered_queryset = self.filter_queryset(queryset)
- latest_scan_subquery = (
- Scan.objects.filter(
- tenant_id=tenant_id,
- state=StateChoices.COMPLETED,
- provider_id=OuterRef("scan__provider_id"),
- )
- .order_by("-inserted_at")
- .values("id")[:1]
+ latest_scan_ids = (
+ Scan.all_objects.filter(tenant_id=tenant_id, state=StateChoices.COMPLETED)
+ .order_by("provider_id", "-inserted_at")
+ .distinct("provider_id")
+ .values_list("id", flat=True)
)
-
- annotated_queryset = filtered_queryset.annotate(
- latest_scan_id=Subquery(latest_scan_subquery)
+ filtered_queryset = filtered_queryset.filter(
+ tenant_id=tenant_id, scan_id__in=latest_scan_ids
)
- filtered_queryset = annotated_queryset.filter(scan_id=F("latest_scan_id"))
-
aggregated_totals = filtered_queryset.aggregate(
_pass=Sum("_pass") or 0,
fail=Sum("fail") or 0,
@@ -2381,22 +2718,16 @@ class OverviewViewSet(BaseRLSViewSet):
queryset = self.get_queryset()
filtered_queryset = self.filter_queryset(queryset)
- latest_scan_subquery = (
- Scan.objects.filter(
- tenant_id=tenant_id,
- state=StateChoices.COMPLETED,
- provider_id=OuterRef("scan__provider_id"),
- )
- .order_by("-inserted_at")
- .values("id")[:1]
+ latest_scan_ids = (
+ Scan.all_objects.filter(tenant_id=tenant_id, state=StateChoices.COMPLETED)
+ .order_by("provider_id", "-inserted_at")
+ .distinct("provider_id")
+ .values_list("id", flat=True)
)
-
- annotated_queryset = filtered_queryset.annotate(
- latest_scan_id=Subquery(latest_scan_subquery)
+ filtered_queryset = filtered_queryset.filter(
+ tenant_id=tenant_id, scan_id__in=latest_scan_ids
)
- filtered_queryset = annotated_queryset.filter(scan_id=F("latest_scan_id"))
-
severity_counts = (
filtered_queryset.values("severity")
.annotate(count=Sum("total"))
@@ -2417,22 +2748,16 @@ class OverviewViewSet(BaseRLSViewSet):
queryset = self.get_queryset()
filtered_queryset = self.filter_queryset(queryset)
- latest_scan_subquery = (
- Scan.objects.filter(
- tenant_id=tenant_id,
- state=StateChoices.COMPLETED,
- provider_id=OuterRef("scan__provider_id"),
- )
- .order_by("-inserted_at")
- .values("id")[:1]
+ latest_scan_ids = (
+ Scan.all_objects.filter(tenant_id=tenant_id, state=StateChoices.COMPLETED)
+ .order_by("provider_id", "-inserted_at")
+ .distinct("provider_id")
+ .values_list("id", flat=True)
)
-
- annotated_queryset = filtered_queryset.annotate(
- latest_scan_id=Subquery(latest_scan_subquery)
+ filtered_queryset = filtered_queryset.filter(
+ tenant_id=tenant_id, scan_id__in=latest_scan_ids
)
- filtered_queryset = annotated_queryset.filter(scan_id=F("latest_scan_id"))
-
services_data = (
filtered_queryset.values("service")
.annotate(_pass=Sum("_pass"))
diff --git a/api/src/backend/config/django/base.py b/api/src/backend/config/django/base.py
index 876bd6096c..8f3f0bb42e 100644
--- a/api/src/backend/config/django/base.py
+++ b/api/src/backend/config/django/base.py
@@ -111,6 +111,7 @@ SPECTACULAR_SETTINGS = {
"PREPROCESSING_HOOKS": [
"drf_spectacular_jsonapi.hooks.fix_nested_path_parameters",
],
+ "TITLE": "API Reference - Prowler",
}
WSGI_APPLICATION = "config.wsgi.application"
diff --git a/api/src/backend/conftest.py b/api/src/backend/conftest.py
index acd33ea4d1..8f58c447de 100644
--- a/api/src/backend/conftest.py
+++ b/api/src/backend/conftest.py
@@ -10,6 +10,7 @@ from django.urls import reverse
from django_celery_results.models import TaskResult
from rest_framework import status
from rest_framework.test import APIClient
+from tasks.jobs.backfill import backfill_resource_scan_summaries
from api.db_utils import rls_transaction
from api.models import (
@@ -920,6 +921,55 @@ def integrations_fixture(providers_fixture):
return integration1, integration2
+@pytest.fixture
+def backfill_scan_metadata_fixture(scans_fixture, findings_fixture):
+ for scan_instance in scans_fixture:
+ tenant_id = scan_instance.tenant_id
+ scan_id = scan_instance.id
+ backfill_resource_scan_summaries(tenant_id=tenant_id, scan_id=scan_id)
+
+
+@pytest.fixture(scope="function")
+def latest_scan_finding(authenticated_client, providers_fixture, resources_fixture):
+ provider = providers_fixture[0]
+ tenant_id = str(providers_fixture[0].tenant_id)
+ resource = resources_fixture[0]
+ scan = Scan.objects.create(
+ name="latest completed scan",
+ provider=provider,
+ trigger=Scan.TriggerChoices.MANUAL,
+ state=StateChoices.COMPLETED,
+ tenant_id=tenant_id,
+ )
+ finding = Finding.objects.create(
+ tenant_id=tenant_id,
+ uid="test_finding_uid_1",
+ scan=scan,
+ delta="new",
+ status=Status.FAIL,
+ status_extended="test status extended ",
+ impact=Severity.critical,
+ impact_extended="test impact extended one",
+ severity=Severity.critical,
+ raw_result={
+ "status": Status.FAIL,
+ "impact": Severity.critical,
+ "severity": Severity.critical,
+ },
+ tags={"test": "dev-qa"},
+ check_id="test_check_id",
+ check_metadata={
+ "CheckId": "test_check_id",
+ "Description": "test description apple sauce",
+ },
+ first_seen_at="2024-01-02T00:00:00Z",
+ )
+
+ finding.add_resources([resource])
+ backfill_resource_scan_summaries(tenant_id, str(scan.id))
+ return finding
+
+
def get_authorization_header(access_token: str) -> dict:
return {"Authorization": f"Bearer {access_token}"}
diff --git a/api/src/backend/tasks/jobs/backfill.py b/api/src/backend/tasks/jobs/backfill.py
new file mode 100644
index 0000000000..6c83e6a69b
--- /dev/null
+++ b/api/src/backend/tasks/jobs/backfill.py
@@ -0,0 +1,61 @@
+from api.db_utils import rls_transaction
+from api.models import (
+ Resource,
+ ResourceFindingMapping,
+ ResourceScanSummary,
+ Scan,
+ StateChoices,
+)
+
+
+def backfill_resource_scan_summaries(tenant_id: str, scan_id: str):
+ with rls_transaction(tenant_id):
+ if ResourceScanSummary.objects.filter(
+ tenant_id=tenant_id, scan_id=scan_id
+ ).exists():
+ return {"status": "already backfilled"}
+
+ with rls_transaction(tenant_id):
+ if not Scan.objects.filter(
+ tenant_id=tenant_id,
+ id=scan_id,
+ state__in=(StateChoices.COMPLETED, StateChoices.FAILED),
+ ).exists():
+ return {"status": "scan is not completed"}
+
+ resource_ids_qs = (
+ ResourceFindingMapping.objects.filter(
+ tenant_id=tenant_id, finding__scan_id=scan_id
+ )
+ .values_list("resource_id", flat=True)
+ .distinct()
+ )
+
+ resource_ids = list(resource_ids_qs)
+
+ if not resource_ids:
+ return {"status": "no resources to backfill"}
+
+ resources_qs = Resource.objects.filter(
+ tenant_id=tenant_id, id__in=resource_ids
+ ).only("id", "service", "region", "type")
+
+ summaries = []
+ for resource in resources_qs.iterator():
+ summaries.append(
+ ResourceScanSummary(
+ tenant_id=tenant_id,
+ scan_id=scan_id,
+ resource_id=str(resource.id),
+ service=resource.service,
+ region=resource.region,
+ resource_type=resource.type,
+ )
+ )
+
+ for i in range(0, len(summaries), 500):
+ ResourceScanSummary.objects.bulk_create(
+ summaries[i : i + 500], ignore_conflicts=True
+ )
+
+ return {"status": "backfilled", "inserted": len(summaries)}
diff --git a/api/src/backend/tasks/jobs/export.py b/api/src/backend/tasks/jobs/export.py
index 11c9e5c4cf..fb405176d5 100644
--- a/api/src/backend/tasks/jobs/export.py
+++ b/api/src/backend/tasks/jobs/export.py
@@ -13,6 +13,38 @@ from prowler.config.config import (
json_ocsf_file_suffix,
output_file_timestamp,
)
+from prowler.lib.outputs.compliance.aws_well_architected.aws_well_architected import (
+ AWSWellArchitected,
+)
+from prowler.lib.outputs.compliance.cis.cis_aws import AWSCIS
+from prowler.lib.outputs.compliance.cis.cis_azure import AzureCIS
+from prowler.lib.outputs.compliance.cis.cis_gcp import GCPCIS
+from prowler.lib.outputs.compliance.cis.cis_kubernetes import KubernetesCIS
+from prowler.lib.outputs.compliance.cis.cis_m365 import M365CIS
+from prowler.lib.outputs.compliance.ens.ens_aws import AWSENS
+from prowler.lib.outputs.compliance.ens.ens_azure import AzureENS
+from prowler.lib.outputs.compliance.ens.ens_gcp import GCPENS
+from prowler.lib.outputs.compliance.iso27001.iso27001_aws import AWSISO27001
+from prowler.lib.outputs.compliance.iso27001.iso27001_azure import AzureISO27001
+from prowler.lib.outputs.compliance.iso27001.iso27001_gcp import GCPISO27001
+from prowler.lib.outputs.compliance.iso27001.iso27001_kubernetes import (
+ KubernetesISO27001,
+)
+from prowler.lib.outputs.compliance.kisa_ismsp.kisa_ismsp_aws import AWSKISAISMSP
+from prowler.lib.outputs.compliance.mitre_attack.mitre_attack_aws import AWSMitreAttack
+from prowler.lib.outputs.compliance.mitre_attack.mitre_attack_azure import (
+ AzureMitreAttack,
+)
+from prowler.lib.outputs.compliance.mitre_attack.mitre_attack_gcp import GCPMitreAttack
+from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_aws import (
+ ProwlerThreatScoreAWS,
+)
+from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_azure import (
+ ProwlerThreatScoreAzure,
+)
+from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_gcp import (
+ ProwlerThreatScoreGCP,
+)
from prowler.lib.outputs.csv.csv import CSV
from prowler.lib.outputs.html.html import HTML
from prowler.lib.outputs.ocsf.ocsf import OCSF
@@ -20,6 +52,43 @@ from prowler.lib.outputs.ocsf.ocsf import OCSF
logger = get_task_logger(__name__)
+COMPLIANCE_CLASS_MAP = {
+ "aws": [
+ (lambda name: name.startswith("cis_"), AWSCIS),
+ (lambda name: name == "mitre_attack_aws", AWSMitreAttack),
+ (lambda name: name.startswith("ens_"), AWSENS),
+ (
+ lambda name: name.startswith("aws_well_architected_framework"),
+ AWSWellArchitected,
+ ),
+ (lambda name: name.startswith("iso27001_"), AWSISO27001),
+ (lambda name: name.startswith("kisa"), AWSKISAISMSP),
+ (lambda name: name == "prowler_threatscore_aws", ProwlerThreatScoreAWS),
+ ],
+ "azure": [
+ (lambda name: name.startswith("cis_"), AzureCIS),
+ (lambda name: name == "mitre_attack_azure", AzureMitreAttack),
+ (lambda name: name.startswith("ens_"), AzureENS),
+ (lambda name: name.startswith("iso27001_"), AzureISO27001),
+ (lambda name: name == "prowler_threatscore_azure", ProwlerThreatScoreAzure),
+ ],
+ "gcp": [
+ (lambda name: name.startswith("cis_"), GCPCIS),
+ (lambda name: name == "mitre_attack_gcp", GCPMitreAttack),
+ (lambda name: name.startswith("ens_"), GCPENS),
+ (lambda name: name.startswith("iso27001_"), GCPISO27001),
+ (lambda name: name == "prowler_threatscore_gcp", ProwlerThreatScoreGCP),
+ ],
+ "kubernetes": [
+ (lambda name: name.startswith("cis_"), KubernetesCIS),
+ (lambda name: name.startswith("iso27001_"), KubernetesISO27001),
+ ],
+ "m365": [
+ (lambda name: name.startswith("cis_"), M365CIS),
+ ],
+}
+
+
# Predefined mapping for output formats and their configurations
OUTPUT_FORMATS_MAPPING = {
"csv": {
@@ -43,13 +112,17 @@ def _compress_output_files(output_directory: str) -> str:
str: The full path to the newly created ZIP archive.
"""
zip_path = f"{output_directory}.zip"
+ parent_dir = os.path.dirname(output_directory)
+ zip_path_abs = os.path.abspath(zip_path)
with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zipf:
- for suffix in [config["suffix"] for config in OUTPUT_FORMATS_MAPPING.values()]:
- zipf.write(
- f"{output_directory}{suffix}",
- f"output/{output_directory.split('/')[-1]}{suffix}",
- )
+ for foldername, _, filenames in os.walk(parent_dir):
+ for filename in filenames:
+ file_path = os.path.join(foldername, filename)
+ if os.path.abspath(file_path) == zip_path_abs:
+ continue
+ arcname = os.path.relpath(file_path, start=parent_dir)
+ zipf.write(file_path, arcname)
return zip_path
@@ -102,25 +175,38 @@ def _upload_to_s3(tenant_id: str, zip_path: str, scan_id: str) -> str:
Raises:
botocore.exceptions.ClientError: If the upload attempt to S3 fails for any reason.
"""
- if not base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET:
- return
+ bucket = base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET
+ if not bucket:
+ return None
try:
s3 = get_s3_client()
- s3_key = f"{tenant_id}/{scan_id}/{os.path.basename(zip_path)}"
+
+ # Upload the ZIP file (outputs) to the S3 bucket
+ zip_key = f"{tenant_id}/{scan_id}/{os.path.basename(zip_path)}"
s3.upload_file(
Filename=zip_path,
- Bucket=base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET,
- Key=s3_key,
+ Bucket=bucket,
+ Key=zip_key,
)
- return f"s3://{base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET}/{s3_key}"
+
+ # Upload the compliance directory to the S3 bucket
+ compliance_dir = os.path.join(os.path.dirname(zip_path), "compliance")
+ for filename in os.listdir(compliance_dir):
+ local_path = os.path.join(compliance_dir, filename)
+ if not os.path.isfile(local_path):
+ continue
+ file_key = f"{tenant_id}/{scan_id}/compliance/{filename}"
+ s3.upload_file(Filename=local_path, Bucket=bucket, Key=file_key)
+
+ return f"s3://{base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET}/{zip_key}"
except (ClientError, NoCredentialsError, ParamValidationError, ValueError) as e:
logger.error(f"S3 upload failed: {str(e)}")
def _generate_output_directory(
output_directory, prowler_provider: object, tenant_id: str, scan_id: str
-) -> str:
+) -> tuple[str, str]:
"""
Generate a file system path for the output directory of a prowler scan.
@@ -145,7 +231,8 @@ def _generate_output_directory(
Example:
>>> _generate_output_directory("/tmp", "aws", "tenant-1234", "scan-5678")
- '/tmp/tenant-1234/aws/scan-5678/prowler-output-2023-02-15T12:34:56'
+ '/tmp/tenant-1234/aws/scan-5678/prowler-output-2023-02-15T12:34:56',
+ '/tmp/tenant-1234/aws/scan-5678/compliance/prowler-output-2023-02-15T12:34:56'
"""
path = (
f"{output_directory}/{tenant_id}/{scan_id}/prowler-output-"
@@ -153,4 +240,10 @@ def _generate_output_directory(
)
os.makedirs("/".join(path.split("/")[:-1]), exist_ok=True)
- return path
+ compliance_path = (
+ f"{output_directory}/{tenant_id}/{scan_id}/compliance/prowler-output-"
+ f"{prowler_provider}-{output_file_timestamp}"
+ )
+ os.makedirs("/".join(compliance_path.split("/")[:-1]), exist_ok=True)
+
+ return path, compliance_path
diff --git a/api/src/backend/tasks/jobs/scan.py b/api/src/backend/tasks/jobs/scan.py
index d143d5d2c6..81fbfbb0e9 100644
--- a/api/src/backend/tasks/jobs/scan.py
+++ b/api/src/backend/tasks/jobs/scan.py
@@ -19,6 +19,7 @@ from api.models import (
Finding,
Provider,
Resource,
+ ResourceScanSummary,
ResourceTag,
Scan,
ScanSummary,
@@ -121,6 +122,7 @@ def perform_prowler_scan(
check_status_by_region = {}
exception = None
unique_resources = set()
+ scan_resource_cache: set[tuple[str, str, str, str]] = set()
start_time = time.time()
with rls_transaction(tenant_id):
@@ -295,6 +297,16 @@ def perform_prowler_scan(
continue
region_dict[finding.check_id] = finding.status.value
+ # Update scan resource summaries
+ scan_resource_cache.add(
+ (
+ str(resource_instance.id),
+ resource_instance.service,
+ resource_instance.region,
+ resource_instance.type,
+ )
+ )
+
# Update scan progress
with rls_transaction(tenant_id):
scan_instance.progress = progress
@@ -314,66 +326,90 @@ def perform_prowler_scan(
scan_instance.unique_resource_count = len(unique_resources)
scan_instance.save()
- if exception is None:
- try:
- regions = prowler_provider.get_regions()
- except AttributeError:
- regions = set()
-
- compliance_template = PROWLER_COMPLIANCE_OVERVIEW_TEMPLATE[
- provider_instance.provider
- ]
- compliance_overview_by_region = {
- region: deepcopy(compliance_template) for region in regions
- }
-
- for region, check_status in check_status_by_region.items():
- compliance_data = compliance_overview_by_region.setdefault(
- region, deepcopy(compliance_template)
- )
- for check_name, status in check_status.items():
- generate_scan_compliance(
- compliance_data,
- provider_instance.provider,
- check_name,
- status,
- )
-
- # Prepare compliance overview objects
- compliance_overview_objects = []
- for region, compliance_data in compliance_overview_by_region.items():
- for compliance_id, compliance in compliance_data.items():
- compliance_overview_objects.append(
- ComplianceOverview(
- tenant_id=tenant_id,
- scan=scan_instance,
- region=region,
- compliance_id=compliance_id,
- framework=compliance["framework"],
- version=compliance["version"],
- description=compliance["description"],
- requirements=compliance["requirements"],
- requirements_passed=compliance["requirements_status"]["passed"],
- requirements_failed=compliance["requirements_status"]["failed"],
- requirements_manual=compliance["requirements_status"]["manual"],
- total_requirements=compliance["total_requirements"],
- )
- )
- try:
- with rls_transaction(tenant_id):
- ComplianceOverview.objects.bulk_create(
- compliance_overview_objects, batch_size=100
- )
- except Exception as overview_exception:
- import sentry_sdk
-
- sentry_sdk.capture_exception(overview_exception)
- logger.error(
- f"Error storing compliance overview for scan {scan_id}: {overview_exception}"
- )
if exception is not None:
raise exception
+ try:
+ regions = prowler_provider.get_regions()
+ except AttributeError:
+ regions = set()
+
+ compliance_template = PROWLER_COMPLIANCE_OVERVIEW_TEMPLATE[
+ provider_instance.provider
+ ]
+ compliance_overview_by_region = {
+ region: deepcopy(compliance_template) for region in regions
+ }
+
+ for region, check_status in check_status_by_region.items():
+ compliance_data = compliance_overview_by_region.setdefault(
+ region, deepcopy(compliance_template)
+ )
+ for check_name, status in check_status.items():
+ generate_scan_compliance(
+ compliance_data,
+ provider_instance.provider,
+ check_name,
+ status,
+ )
+
+ # Prepare compliance overview objects
+ compliance_overview_objects = []
+ for region, compliance_data in compliance_overview_by_region.items():
+ for compliance_id, compliance in compliance_data.items():
+ compliance_overview_objects.append(
+ ComplianceOverview(
+ tenant_id=tenant_id,
+ scan=scan_instance,
+ region=region,
+ compliance_id=compliance_id,
+ framework=compliance["framework"],
+ version=compliance["version"],
+ description=compliance["description"],
+ requirements=compliance["requirements"],
+ requirements_passed=compliance["requirements_status"]["passed"],
+ requirements_failed=compliance["requirements_status"]["failed"],
+ requirements_manual=compliance["requirements_status"]["manual"],
+ total_requirements=compliance["total_requirements"],
+ )
+ )
+ try:
+ with rls_transaction(tenant_id):
+ ComplianceOverview.objects.bulk_create(
+ compliance_overview_objects, batch_size=500
+ )
+ except Exception as overview_exception:
+ import sentry_sdk
+
+ sentry_sdk.capture_exception(overview_exception)
+ logger.error(
+ f"Error storing compliance overview for scan {scan_id}: {overview_exception}"
+ )
+
+ try:
+ resource_scan_summaries = [
+ ResourceScanSummary(
+ tenant_id=tenant_id,
+ scan_id=scan_id,
+ resource_id=resource_id,
+ service=service,
+ region=region,
+ resource_type=resource_type,
+ )
+ for resource_id, service, region, resource_type in scan_resource_cache
+ ]
+ with rls_transaction(tenant_id):
+ ResourceScanSummary.objects.bulk_create(
+ resource_scan_summaries, batch_size=500, ignore_conflicts=True
+ )
+ except Exception as filter_exception:
+ import sentry_sdk
+
+ sentry_sdk.capture_exception(filter_exception)
+ logger.error(
+ f"Error storing filter values for scan {scan_id}: {filter_exception}"
+ )
+
serializer = ScanTaskSerializer(instance=scan_instance)
return serializer.data
diff --git a/api/src/backend/tasks/tasks.py b/api/src/backend/tasks/tasks.py
index 5af7895394..090c0c33d3 100644
--- a/api/src/backend/tasks/tasks.py
+++ b/api/src/backend/tasks/tasks.py
@@ -7,9 +7,11 @@ from celery.utils.log import get_task_logger
from config.celery import RLSTask
from config.django.base import DJANGO_FINDINGS_BATCH_SIZE, DJANGO_TMP_OUTPUT_DIRECTORY
from django_celery_beat.models import PeriodicTask
+from tasks.jobs.backfill import backfill_resource_scan_summaries
from tasks.jobs.connection import check_provider_connection
from tasks.jobs.deletion import delete_provider, delete_tenant
from tasks.jobs.export import (
+ COMPLIANCE_CLASS_MAP,
OUTPUT_FORMATS_MAPPING,
_compress_output_files,
_generate_output_directory,
@@ -18,11 +20,14 @@ from tasks.jobs.export import (
from tasks.jobs.scan import aggregate_findings, perform_prowler_scan
from tasks.utils import batched, get_next_execution_datetime
+from api.compliance import get_compliance_frameworks
from api.db_utils import rls_transaction
from api.decorators import set_tenant
from api.models import Finding, Provider, Scan, ScanSummary, StateChoices
from api.utils import initialize_prowler_provider
from api.v1.serializers import ScanTaskSerializer
+from prowler.lib.check.compliance_models import Compliance
+from prowler.lib.outputs.compliance.generic.generic import GenericCompliance
from prowler.lib.outputs.finding import Finding as FindingOutput
logger = get_task_logger(__name__)
@@ -251,84 +256,118 @@ def generate_outputs(scan_id: str, provider_id: str, tenant_id: str):
logger.info(f"No findings found for scan {scan_id}")
return {"upload": False}
- # Initialize the prowler provider
- prowler_provider = initialize_prowler_provider(Provider.objects.get(id=provider_id))
+ provider_obj = Provider.objects.get(id=provider_id)
+ prowler_provider = initialize_prowler_provider(provider_obj)
+ provider_uid = provider_obj.uid
+ provider_type = provider_obj.provider
- # Get the provider UID
- provider_uid = Provider.objects.get(id=provider_id).uid
-
- # Generate and ensure the output directory exists
- output_directory = _generate_output_directory(
+ frameworks_bulk = Compliance.get_bulk(provider_type)
+ frameworks_avail = get_compliance_frameworks(provider_type)
+ out_dir, comp_dir = _generate_output_directory(
DJANGO_TMP_OUTPUT_DIRECTORY, provider_uid, tenant_id, scan_id
)
- # Define auxiliary variables
+ def get_writer(writer_map, name, factory, is_last):
+ """
+ Return existing writer_map[name] or create via factory().
+ In both cases set `.close_file = is_last`.
+ """
+ initialization = False
+ if name not in writer_map:
+ writer_map[name] = factory()
+ initialization = True
+ w = writer_map[name]
+ w.close_file = is_last
+
+ return w, initialization
+
output_writers = {}
+ compliance_writers = {}
+
scan_summary = FindingOutput._transform_findings_stats(
ScanSummary.objects.filter(scan_id=scan_id)
)
- # Retrieve findings queryset
- findings_qs = Finding.all_objects.filter(scan_id=scan_id).order_by("uid")
+ qs = Finding.all_objects.filter(scan_id=scan_id).order_by("uid").iterator()
+ for batch, is_last in batched(qs, DJANGO_FINDINGS_BATCH_SIZE):
+ fos = [FindingOutput.transform_api_finding(f, prowler_provider) for f in batch]
- # Process findings in batches
- for batch, is_last_batch in batched(
- findings_qs.iterator(), DJANGO_FINDINGS_BATCH_SIZE
- ):
- finding_outputs = [
- FindingOutput.transform_api_finding(finding, prowler_provider)
- for finding in batch
- ]
-
- # Generate output files
- for mode, config in OUTPUT_FORMATS_MAPPING.items():
- kwargs = dict(config.get("kwargs", {}))
+ # Outputs
+ for mode, cfg in OUTPUT_FORMATS_MAPPING.items():
+ cls = cfg["class"]
+ suffix = cfg["suffix"]
+ extra = cfg.get("kwargs", {}).copy()
if mode == "html":
- kwargs["provider"] = prowler_provider
- kwargs["stats"] = scan_summary
+ extra.update(provider=prowler_provider, stats=scan_summary)
- writer_class = config["class"]
- if writer_class in output_writers:
- writer = output_writers[writer_class]
- writer.transform(finding_outputs)
- writer.close_file = is_last_batch
- else:
- writer = writer_class(
- findings=finding_outputs,
- file_path=output_directory,
- file_extension=config["suffix"],
+ writer, initialization = get_writer(
+ output_writers,
+ cls,
+ lambda cls=cls, fos=fos, suffix=suffix: cls(
+ findings=fos,
+ file_path=out_dir,
+ file_extension=suffix,
from_cli=False,
- )
- writer.close_file = is_last_batch
- output_writers[writer_class] = writer
+ ),
+ is_last,
+ )
+ if not initialization:
+ writer.transform(fos)
+ writer.batch_write_data_to_file(**extra)
+ writer._data.clear()
- # Write the current batch using the writer
- writer.batch_write_data_to_file(**kwargs)
+ # Compliance CSVs
+ for name in frameworks_avail:
+ compliance_obj = frameworks_bulk[name]
- # TODO: Refactor the output classes to avoid this manual reset
- writer._data = []
+ klass = GenericCompliance
+ for condition, cls in COMPLIANCE_CLASS_MAP.get(provider_type, []):
+ if condition(name):
+ klass = cls
+ break
- # Compress output files
- output_directory = _compress_output_files(output_directory)
+ filename = f"{comp_dir}_{name}.csv"
- # Save to configured storage
- uploaded = _upload_to_s3(tenant_id, output_directory, scan_id)
+ writer, initialization = get_writer(
+ compliance_writers,
+ name,
+ lambda klass=klass, fos=fos: klass(
+ findings=fos,
+ compliance=compliance_obj,
+ file_path=filename,
+ from_cli=False,
+ ),
+ is_last,
+ )
+ if not initialization:
+ writer.transform(fos, compliance_obj, name)
+ writer.batch_write_data_to_file()
+ writer._data.clear()
- if uploaded:
- # Remove the local files after upload
+ compressed = _compress_output_files(out_dir)
+ upload_uri = _upload_to_s3(tenant_id, compressed, scan_id)
+
+ if upload_uri:
try:
- rmtree(Path(output_directory).parent, ignore_errors=True)
- except FileNotFoundError as e:
+ rmtree(Path(compressed).parent, ignore_errors=True)
+ except Exception as e:
logger.error(f"Error deleting output files: {e}")
-
- output_directory = uploaded
- uploaded = True
+ final_location, did_upload = upload_uri, True
else:
- uploaded = False
+ final_location, did_upload = compressed, False
- # Update the scan instance with the output path
- Scan.all_objects.filter(id=scan_id).update(output_location=output_directory)
+ Scan.all_objects.filter(id=scan_id).update(output_location=final_location)
+ logger.info(f"Scan outputs at {final_location}")
+ return {"upload": did_upload}
- logger.info(f"Scan output files generated, output location: {output_directory}")
- return {"upload": uploaded}
+@shared_task(name="backfill-scan-resource-summaries", queue="backfill")
+def backfill_scan_resource_summaries_task(tenant_id: str, scan_id: str):
+ """
+ Tries to backfill the resource scan summaries table for a given scan.
+
+ Args:
+ tenant_id (str): The tenant identifier.
+ scan_id (str): The scan identifier.
+ """
+ return backfill_resource_scan_summaries(tenant_id=tenant_id, scan_id=scan_id)
diff --git a/api/src/backend/tasks/tests/test_backfill.py b/api/src/backend/tasks/tests/test_backfill.py
new file mode 100644
index 0000000000..b436f13151
--- /dev/null
+++ b/api/src/backend/tasks/tests/test_backfill.py
@@ -0,0 +1,79 @@
+from uuid import uuid4
+
+import pytest
+from tasks.jobs.backfill import backfill_resource_scan_summaries
+
+from api.models import ResourceScanSummary, Scan, StateChoices
+
+
+@pytest.mark.django_db
+class TestBackfillResourceScanSummaries:
+ @pytest.fixture(scope="function")
+ def resource_scan_summary_data(self, scans_fixture):
+ scan = scans_fixture[0]
+ return ResourceScanSummary.objects.create(
+ tenant_id=scan.tenant_id,
+ scan_id=scan.id,
+ resource_id=str(uuid4()),
+ service="aws",
+ region="us-east-1",
+ resource_type="instance",
+ )
+
+ @pytest.fixture(scope="function")
+ def get_not_completed_scans(self, providers_fixture):
+ provider_id = providers_fixture[0].id
+ tenant_id = providers_fixture[0].tenant_id
+ scan_1 = Scan.objects.create(
+ tenant_id=tenant_id,
+ trigger=Scan.TriggerChoices.MANUAL,
+ state=StateChoices.EXECUTING,
+ provider_id=provider_id,
+ )
+ scan_2 = Scan.objects.create(
+ tenant_id=tenant_id,
+ trigger=Scan.TriggerChoices.MANUAL,
+ state=StateChoices.AVAILABLE,
+ provider_id=provider_id,
+ )
+ return scan_1, scan_2
+
+ def test_already_backfilled(self, resource_scan_summary_data):
+ tenant_id = resource_scan_summary_data.tenant_id
+ scan_id = resource_scan_summary_data.scan_id
+
+ result = backfill_resource_scan_summaries(tenant_id, scan_id)
+
+ assert result == {"status": "already backfilled"}
+
+ def test_not_completed_scan(self, get_not_completed_scans):
+ for scan_instance in get_not_completed_scans:
+ tenant_id = scan_instance.tenant_id
+ scan_id = scan_instance.id
+ result = backfill_resource_scan_summaries(tenant_id, scan_id)
+
+ assert result == {"status": "scan is not completed"}
+
+ def test_successful_backfill_inserts_one_summary(
+ self, resources_fixture, findings_fixture
+ ):
+ tenant_id = findings_fixture[0].tenant_id
+ scan_id = findings_fixture[0].scan_id
+
+ # This scan affects the first two resources
+ resources = resources_fixture[:2]
+
+ result = backfill_resource_scan_summaries(tenant_id, scan_id)
+ assert result == {"status": "backfilled", "inserted": len(resources)}
+
+ # Verify correct values
+ summaries = ResourceScanSummary.objects.filter(
+ tenant_id=tenant_id, scan_id=scan_id
+ )
+ assert summaries.count() == len(resources)
+ for resource in resources:
+ summary = summaries.get(resource_id=resource.id)
+ assert summary.resource_id == resource.id
+ assert summary.service == resource.service
+ assert summary.region == resource.region
+ assert summary.resource_type == resource.type
diff --git a/api/src/backend/tasks/tests/test_export.py b/api/src/backend/tasks/tests/test_export.py
new file mode 100644
index 0000000000..6811fe7449
--- /dev/null
+++ b/api/src/backend/tasks/tests/test_export.py
@@ -0,0 +1,147 @@
+import os
+import zipfile
+from pathlib import Path
+from unittest.mock import MagicMock, patch
+
+import pytest
+from botocore.exceptions import ClientError
+from tasks.jobs.export import (
+ _compress_output_files,
+ _generate_output_directory,
+ _upload_to_s3,
+ get_s3_client,
+)
+
+
+@pytest.mark.django_db
+class TestOutputs:
+ def test_compress_output_files_creates_zip(self, tmpdir):
+ base_tmp = Path(str(tmpdir.mkdir("compress_output")))
+ output_dir = base_tmp / "output"
+ output_dir.mkdir()
+ file_path = output_dir / "result.csv"
+ file_path.write_text("data")
+
+ zip_path = _compress_output_files(str(output_dir))
+
+ assert zip_path.endswith(".zip")
+ assert os.path.exists(zip_path)
+ with zipfile.ZipFile(zip_path, "r") as zipf:
+ assert "output/result.csv" in zipf.namelist()
+
+ @patch("tasks.jobs.export.boto3.client")
+ @patch("tasks.jobs.export.settings")
+ def test_get_s3_client_success(self, mock_settings, mock_boto_client):
+ mock_settings.DJANGO_OUTPUT_S3_AWS_ACCESS_KEY_ID = "test"
+ mock_settings.DJANGO_OUTPUT_S3_AWS_SECRET_ACCESS_KEY = "test"
+ mock_settings.DJANGO_OUTPUT_S3_AWS_SESSION_TOKEN = "token"
+ mock_settings.DJANGO_OUTPUT_S3_AWS_DEFAULT_REGION = "eu-west-1"
+
+ client_mock = MagicMock()
+ mock_boto_client.return_value = client_mock
+
+ client = get_s3_client()
+ assert client is not None
+ client_mock.list_buckets.assert_called()
+
+ @patch("tasks.jobs.export.boto3.client")
+ @patch("tasks.jobs.export.settings")
+ def test_get_s3_client_fallback(self, mock_settings, mock_boto_client):
+ mock_boto_client.side_effect = [
+ ClientError({"Error": {"Code": "403"}}, "ListBuckets"),
+ MagicMock(),
+ ]
+ client = get_s3_client()
+ assert client is not None
+
+ @patch("tasks.jobs.export.get_s3_client")
+ @patch("tasks.jobs.export.base")
+ def test_upload_to_s3_success(self, mock_base, mock_get_client, tmpdir):
+ mock_base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET = "test-bucket"
+
+ base_tmp = Path(str(tmpdir.mkdir("upload_success")))
+ zip_path = base_tmp / "outputs.zip"
+ zip_path.write_bytes(b"dummy")
+
+ compliance_dir = base_tmp / "compliance"
+ compliance_dir.mkdir()
+ (compliance_dir / "report.csv").write_text("ok")
+
+ client_mock = MagicMock()
+ mock_get_client.return_value = client_mock
+
+ result = _upload_to_s3("tenant-id", str(zip_path), "scan-id")
+
+ expected_uri = "s3://test-bucket/tenant-id/scan-id/outputs.zip"
+ assert result == expected_uri
+ assert client_mock.upload_file.call_count == 2
+
+ @patch("tasks.jobs.export.get_s3_client")
+ @patch("tasks.jobs.export.base")
+ def test_upload_to_s3_missing_bucket(self, mock_base, mock_get_client):
+ mock_base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET = ""
+ result = _upload_to_s3("tenant", "/tmp/fake.zip", "scan")
+ assert result is None
+
+ @patch("tasks.jobs.export.get_s3_client")
+ @patch("tasks.jobs.export.base")
+ def test_upload_to_s3_skips_non_files(self, mock_base, mock_get_client, tmpdir):
+ mock_base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET = "test-bucket"
+ base_tmp = Path(str(tmpdir.mkdir("upload_skips_non_files")))
+
+ zip_path = base_tmp / "results.zip"
+ zip_path.write_bytes(b"zip")
+
+ compliance_dir = base_tmp / "compliance"
+ compliance_dir.mkdir()
+ (compliance_dir / "subdir").mkdir()
+
+ client_mock = MagicMock()
+ mock_get_client.return_value = client_mock
+
+ result = _upload_to_s3("tenant", str(zip_path), "scan")
+
+ expected_uri = "s3://test-bucket/tenant/scan/results.zip"
+ assert result == expected_uri
+ client_mock.upload_file.assert_called_once()
+
+ @patch(
+ "tasks.jobs.export.get_s3_client",
+ side_effect=ClientError({"Error": {}}, "Upload"),
+ )
+ @patch("tasks.jobs.export.base")
+ @patch("tasks.jobs.export.logger.error")
+ def test_upload_to_s3_failure_logs_error(
+ self, mock_logger, mock_base, mock_get_client, tmpdir
+ ):
+ mock_base.DJANGO_OUTPUT_S3_AWS_OUTPUT_BUCKET = "bucket"
+
+ base_tmp = Path(str(tmpdir.mkdir("upload_failure_logs")))
+ zip_path = base_tmp / "zipfile.zip"
+ zip_path.write_bytes(b"zip")
+
+ compliance_dir = base_tmp / "compliance"
+ compliance_dir.mkdir()
+ (compliance_dir / "report.csv").write_text("csv")
+
+ _upload_to_s3("tenant", str(zip_path), "scan")
+ mock_logger.assert_called()
+
+ def test_generate_output_directory_creates_paths(self, tmpdir):
+ from prowler.config.config import output_file_timestamp
+
+ base_tmp = Path(str(tmpdir.mkdir("generate_output")))
+ base_dir = str(base_tmp)
+ tenant_id = "t1"
+ scan_id = "s1"
+ provider = "aws"
+
+ path, compliance = _generate_output_directory(
+ base_dir, provider, tenant_id, scan_id
+ )
+
+ assert os.path.isdir(os.path.dirname(path))
+ assert os.path.isdir(os.path.dirname(compliance))
+
+ assert path.endswith(f"{provider}-{output_file_timestamp}")
+ assert compliance.endswith(f"{provider}-{output_file_timestamp}")
diff --git a/api/src/backend/tasks/tests/test_tasks.py b/api/src/backend/tasks/tests/test_tasks.py
new file mode 100644
index 0000000000..5f7c3fd94f
--- /dev/null
+++ b/api/src/backend/tasks/tests/test_tasks.py
@@ -0,0 +1,415 @@
+import uuid
+from pathlib import Path
+from unittest.mock import MagicMock, patch
+
+import pytest
+from tasks.tasks import generate_outputs
+
+
+@pytest.mark.django_db
+class TestGenerateOutputs:
+ def setup_method(self):
+ self.scan_id = str(uuid.uuid4())
+ self.provider_id = str(uuid.uuid4())
+ self.tenant_id = str(uuid.uuid4())
+
+ def test_no_findings_returns_early(self):
+ with patch("tasks.tasks.ScanSummary.objects.filter") as mock_filter:
+ mock_filter.return_value.exists.return_value = False
+
+ result = generate_outputs(
+ scan_id=self.scan_id,
+ provider_id=self.provider_id,
+ tenant_id=self.tenant_id,
+ )
+
+ assert result == {"upload": False}
+ mock_filter.assert_called_once_with(scan_id=self.scan_id)
+
+ @patch("tasks.tasks.rmtree")
+ @patch("tasks.tasks._upload_to_s3")
+ @patch("tasks.tasks._compress_output_files")
+ @patch("tasks.tasks.get_compliance_frameworks")
+ @patch("tasks.tasks.Compliance.get_bulk")
+ @patch("tasks.tasks.initialize_prowler_provider")
+ @patch("tasks.tasks.Provider.objects.get")
+ @patch("tasks.tasks.ScanSummary.objects.filter")
+ @patch("tasks.tasks.Finding.all_objects.filter")
+ def test_generate_outputs_happy_path(
+ self,
+ mock_finding_filter,
+ mock_scan_summary_filter,
+ mock_provider_get,
+ mock_initialize_provider,
+ mock_compliance_get_bulk,
+ mock_get_available_frameworks,
+ mock_compress,
+ mock_upload,
+ mock_rmtree,
+ ):
+ mock_scan_summary_filter.return_value.exists.return_value = True
+
+ mock_provider = MagicMock()
+ mock_provider.uid = "provider-uid"
+ mock_provider.provider = "aws"
+ mock_provider_get.return_value = mock_provider
+
+ prowler_provider = MagicMock()
+ mock_initialize_provider.return_value = prowler_provider
+
+ mock_compliance_get_bulk.return_value = {"cis": MagicMock()}
+ mock_get_available_frameworks.return_value = ["cis"]
+
+ dummy_finding = MagicMock(uid="f1")
+ mock_finding_filter.return_value.order_by.return_value.iterator.return_value = [
+ [dummy_finding],
+ True,
+ ]
+
+ mock_transformed_stats = {"some": "stats"}
+ with (
+ patch(
+ "tasks.tasks.FindingOutput._transform_findings_stats",
+ return_value=mock_transformed_stats,
+ ),
+ patch(
+ "tasks.tasks.FindingOutput.transform_api_finding",
+ return_value={"transformed": "f1"},
+ ),
+ patch(
+ "tasks.tasks.OUTPUT_FORMATS_MAPPING",
+ {
+ "json": {
+ "class": MagicMock(name="JSONWriter"),
+ "suffix": ".json",
+ "kwargs": {},
+ }
+ },
+ ),
+ patch(
+ "tasks.tasks.COMPLIANCE_CLASS_MAP",
+ {"aws": [(lambda x: True, MagicMock(name="CSVCompliance"))]},
+ ),
+ patch(
+ "tasks.tasks._generate_output_directory",
+ return_value=("out-dir", "comp-dir"),
+ ),
+ patch("tasks.tasks.Scan.all_objects.filter") as mock_scan_update,
+ ):
+ mock_compress.return_value = "/tmp/zipped.zip"
+ mock_upload.return_value = "s3://bucket/zipped.zip"
+
+ result = generate_outputs(
+ scan_id=self.scan_id,
+ provider_id=self.provider_id,
+ tenant_id=self.tenant_id,
+ )
+
+ assert result == {"upload": True}
+ mock_scan_update.return_value.update.assert_called_once_with(
+ output_location="s3://bucket/zipped.zip"
+ )
+ mock_rmtree.assert_called_once_with(
+ Path("/tmp/zipped.zip").parent, ignore_errors=True
+ )
+
+ def test_generate_outputs_fails_upload(self):
+ with (
+ patch("tasks.tasks.ScanSummary.objects.filter") as mock_filter,
+ patch("tasks.tasks.Provider.objects.get"),
+ patch("tasks.tasks.initialize_prowler_provider"),
+ patch("tasks.tasks.Compliance.get_bulk"),
+ patch("tasks.tasks.get_compliance_frameworks"),
+ patch("tasks.tasks.Finding.all_objects.filter") as mock_findings,
+ patch(
+ "tasks.tasks._generate_output_directory", return_value=("out", "comp")
+ ),
+ patch("tasks.tasks.FindingOutput._transform_findings_stats"),
+ patch("tasks.tasks.FindingOutput.transform_api_finding"),
+ patch(
+ "tasks.tasks.OUTPUT_FORMATS_MAPPING",
+ {
+ "json": {
+ "class": MagicMock(name="Writer"),
+ "suffix": ".json",
+ "kwargs": {},
+ }
+ },
+ ),
+ patch(
+ "tasks.tasks.COMPLIANCE_CLASS_MAP",
+ {"aws": [(lambda x: True, MagicMock())]},
+ ),
+ patch("tasks.tasks._compress_output_files", return_value="/tmp/compressed"),
+ patch("tasks.tasks._upload_to_s3", return_value=None),
+ patch("tasks.tasks.Scan.all_objects.filter") as mock_scan_update,
+ ):
+ mock_filter.return_value.exists.return_value = True
+ mock_findings.return_value.order_by.return_value.iterator.return_value = [
+ [MagicMock()],
+ True,
+ ]
+
+ result = generate_outputs(
+ scan_id="scan",
+ provider_id="provider",
+ tenant_id=self.tenant_id,
+ )
+
+ assert result == {"upload": False}
+ mock_scan_update.return_value.update.assert_called_once()
+
+ def test_generate_outputs_triggers_html_extra_update(self):
+ mock_finding_output = MagicMock()
+ mock_finding_output.compliance = {"cis": ["requirement-1", "requirement-2"]}
+
+ with (
+ patch("tasks.tasks.ScanSummary.objects.filter") as mock_filter,
+ patch("tasks.tasks.Provider.objects.get"),
+ patch("tasks.tasks.initialize_prowler_provider"),
+ patch("tasks.tasks.Compliance.get_bulk", return_value={"cis": MagicMock()}),
+ patch("tasks.tasks.get_compliance_frameworks", return_value=["cis"]),
+ patch("tasks.tasks.Finding.all_objects.filter") as mock_findings,
+ patch(
+ "tasks.tasks._generate_output_directory", return_value=("out", "comp")
+ ),
+ patch(
+ "tasks.tasks.FindingOutput._transform_findings_stats",
+ return_value={"some": "stats"},
+ ),
+ patch(
+ "tasks.tasks.FindingOutput.transform_api_finding",
+ return_value=mock_finding_output,
+ ),
+ patch("tasks.tasks._compress_output_files", return_value="/tmp/compressed"),
+ patch("tasks.tasks._upload_to_s3", return_value="s3://bucket/f.zip"),
+ patch("tasks.tasks.Scan.all_objects.filter"),
+ ):
+ mock_filter.return_value.exists.return_value = True
+ mock_findings.return_value.order_by.return_value.iterator.return_value = [
+ [MagicMock()],
+ True,
+ ]
+
+ html_writer_mock = MagicMock()
+ with (
+ patch(
+ "tasks.tasks.OUTPUT_FORMATS_MAPPING",
+ {
+ "html": {
+ "class": lambda *args, **kwargs: html_writer_mock,
+ "suffix": ".html",
+ "kwargs": {},
+ }
+ },
+ ),
+ patch(
+ "tasks.tasks.COMPLIANCE_CLASS_MAP",
+ {"aws": [(lambda x: True, MagicMock())]},
+ ),
+ ):
+ generate_outputs(
+ scan_id=self.scan_id,
+ provider_id=self.provider_id,
+ tenant_id=self.tenant_id,
+ )
+ html_writer_mock.batch_write_data_to_file.assert_called_once()
+
+ def test_transform_called_only_on_second_batch(self):
+ raw1 = MagicMock()
+ raw2 = MagicMock()
+
+ tf1 = MagicMock()
+ tf1.compliance = {}
+ tf2 = MagicMock()
+ tf2.compliance = {}
+
+ writer_instances = []
+
+ class TrackingWriter:
+ def __init__(self, findings, file_path, file_extension, from_cli):
+ self.transform_called = 0
+ self.batch_write_data_to_file = MagicMock()
+ self._data = []
+ self.close_file = False
+ writer_instances.append(self)
+
+ def transform(self, fos):
+ self.transform_called += 1
+
+ with (
+ patch("tasks.tasks.ScanSummary.objects.filter") as mock_summary,
+ patch("tasks.tasks.Provider.objects.get"),
+ patch("tasks.tasks.initialize_prowler_provider"),
+ patch("tasks.tasks.Compliance.get_bulk"),
+ patch("tasks.tasks.get_compliance_frameworks", return_value=[]),
+ patch("tasks.tasks.FindingOutput._transform_findings_stats"),
+ patch(
+ "tasks.tasks.FindingOutput.transform_api_finding",
+ side_effect=[tf1, tf2],
+ ),
+ patch(
+ "tasks.tasks._generate_output_directory",
+ return_value=("outdir", "compdir"),
+ ),
+ patch("tasks.tasks._compress_output_files", return_value="outdir.zip"),
+ patch("tasks.tasks._upload_to_s3", return_value="s3://bucket/outdir.zip"),
+ patch("tasks.tasks.rmtree"),
+ patch("tasks.tasks.Scan.all_objects.filter"),
+ patch(
+ "tasks.tasks.batched",
+ return_value=[
+ ([raw1], False),
+ ([raw2], True),
+ ],
+ ),
+ ):
+ mock_summary.return_value.exists.return_value = True
+
+ with patch(
+ "tasks.tasks.OUTPUT_FORMATS_MAPPING",
+ {
+ "json": {
+ "class": TrackingWriter,
+ "suffix": ".json",
+ "kwargs": {},
+ }
+ },
+ ):
+ result = generate_outputs(
+ scan_id=self.scan_id,
+ provider_id=self.provider_id,
+ tenant_id=self.tenant_id,
+ )
+
+ assert result == {"upload": True}
+ assert len(writer_instances) == 1
+ writer = writer_instances[0]
+ assert writer.transform_called == 1
+
+ def test_compliance_transform_called_on_second_batch(self):
+ raw1 = MagicMock()
+ raw2 = MagicMock()
+ compliance_obj = MagicMock()
+ writer_instances = []
+
+ class TrackingComplianceWriter:
+ def __init__(self, *args, **kwargs):
+ self.transform_calls = []
+ self._data = []
+ writer_instances.append(self)
+
+ def transform(self, fos, comp_obj, name):
+ self.transform_calls.append((fos, comp_obj, name))
+
+ def batch_write_data_to_file(self):
+ pass
+
+ two_batches = [
+ ([raw1], False),
+ ([raw2], True),
+ ]
+
+ with (
+ patch("tasks.tasks.ScanSummary.objects.filter") as mock_summary,
+ patch(
+ "tasks.tasks.Provider.objects.get",
+ return_value=MagicMock(uid="UID", provider="aws"),
+ ),
+ patch("tasks.tasks.initialize_prowler_provider"),
+ patch(
+ "tasks.tasks.Compliance.get_bulk", return_value={"cis": compliance_obj}
+ ),
+ patch("tasks.tasks.get_compliance_frameworks", return_value=["cis"]),
+ patch(
+ "tasks.tasks._generate_output_directory",
+ return_value=("outdir", "compdir"),
+ ),
+ patch("tasks.tasks.FindingOutput._transform_findings_stats"),
+ patch(
+ "tasks.tasks.FindingOutput.transform_api_finding",
+ side_effect=lambda f, prov: f,
+ ),
+ patch("tasks.tasks._compress_output_files", return_value="outdir.zip"),
+ patch("tasks.tasks._upload_to_s3", return_value="s3://bucket/outdir.zip"),
+ patch("tasks.tasks.rmtree"),
+ patch(
+ "tasks.tasks.Scan.all_objects.filter",
+ return_value=MagicMock(update=lambda **kw: None),
+ ),
+ patch("tasks.tasks.batched", return_value=two_batches),
+ patch("tasks.tasks.OUTPUT_FORMATS_MAPPING", {}),
+ patch(
+ "tasks.tasks.COMPLIANCE_CLASS_MAP",
+ {"aws": [(lambda name: True, TrackingComplianceWriter)]},
+ ),
+ ):
+ mock_summary.return_value.exists.return_value = True
+
+ result = generate_outputs(
+ scan_id=self.scan_id,
+ provider_id=self.provider_id,
+ tenant_id=self.tenant_id,
+ )
+
+ assert len(writer_instances) == 1
+ writer = writer_instances[0]
+ assert writer.transform_calls == [([raw2], compliance_obj, "cis")]
+ assert result == {"upload": True}
+
+ def test_generate_outputs_logs_rmtree_exception(self, caplog):
+ mock_finding_output = MagicMock()
+ mock_finding_output.compliance = {"cis": ["requirement-1", "requirement-2"]}
+
+ with (
+ patch("tasks.tasks.ScanSummary.objects.filter") as mock_filter,
+ patch("tasks.tasks.Provider.objects.get"),
+ patch("tasks.tasks.initialize_prowler_provider"),
+ patch("tasks.tasks.Compliance.get_bulk", return_value={"cis": MagicMock()}),
+ patch("tasks.tasks.get_compliance_frameworks", return_value=["cis"]),
+ patch("tasks.tasks.Finding.all_objects.filter") as mock_findings,
+ patch(
+ "tasks.tasks._generate_output_directory", return_value=("out", "comp")
+ ),
+ patch(
+ "tasks.tasks.FindingOutput._transform_findings_stats",
+ return_value={"some": "stats"},
+ ),
+ patch(
+ "tasks.tasks.FindingOutput.transform_api_finding",
+ return_value=mock_finding_output,
+ ),
+ patch("tasks.tasks._compress_output_files", return_value="/tmp/compressed"),
+ patch("tasks.tasks._upload_to_s3", return_value="s3://bucket/file.zip"),
+ patch("tasks.tasks.Scan.all_objects.filter"),
+ patch("tasks.tasks.rmtree", side_effect=Exception("Test deletion error")),
+ ):
+ mock_filter.return_value.exists.return_value = True
+ mock_findings.return_value.order_by.return_value.iterator.return_value = [
+ [MagicMock()],
+ True,
+ ]
+
+ with (
+ patch(
+ "tasks.tasks.OUTPUT_FORMATS_MAPPING",
+ {
+ "json": {
+ "class": lambda *args, **kwargs: MagicMock(),
+ "suffix": ".json",
+ "kwargs": {},
+ }
+ },
+ ),
+ patch(
+ "tasks.tasks.COMPLIANCE_CLASS_MAP",
+ {"aws": [(lambda x: True, MagicMock())]},
+ ),
+ ):
+ with caplog.at_level("ERROR"):
+ generate_outputs(
+ scan_id=self.scan_id,
+ provider_id=self.provider_id,
+ tenant_id=self.tenant_id,
+ )
+ assert "Error deleting output files" in caplog.text
diff --git a/api/tests/performance/benchmark.py b/api/tests/performance/benchmark.py
index 1df7f81645..c527a3c729 100644
--- a/api/tests/performance/benchmark.py
+++ b/api/tests/performance/benchmark.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import argparse
+import os
import re
import subprocess
import sys
@@ -122,8 +123,7 @@ def main() -> None:
args = parser.parse_args()
metrics_dir = Path(args.metrics_dir)
- if not metrics_dir.is_dir():
- sys.exit(f"Metrics directory not found: {metrics_dir}")
+ os.makedirs(metrics_dir, exist_ok=True)
metrics_data: dict[str, pd.DataFrame] = {}
for csv_file in sorted(metrics_dir.glob("*.csv")):
diff --git a/api/tests/performance/requirements.txt b/api/tests/performance/requirements.txt
index 139690df29..3b713953c7 100644
--- a/api/tests/performance/requirements.txt
+++ b/api/tests/performance/requirements.txt
@@ -1,2 +1,3 @@
locust==2.34.1
matplotlib==3.10.1
+pandas==2.2.3
diff --git a/api/tests/performance/scenarios/findings.py b/api/tests/performance/scenarios/findings.py
index aef484a7ea..acd32f2497 100644
--- a/api/tests/performance/scenarios/findings.py
+++ b/api/tests/performance/scenarios/findings.py
@@ -180,13 +180,27 @@ class APIUser(APIUserBase):
)
endpoint = (
- f"/findings?filter[{filter_name}]={filter_value}"
+ f"/findings/metadata?filter[{filter_name}]={filter_value}"
f"&filter[inserted_at]={TARGET_INSERTED_AT}"
f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}"
)
self.client.get(endpoint, headers=get_auth_headers(self.token), name=name)
- @task
+ @task(3)
+ def findings_metadata_resource_filter_scan_large(self):
+ name = "/findings/metadata?filter[resource_filter]&filter[scan_id] - 500k"
+ filter_name, filter_value = get_next_resource_filter(
+ self.available_resource_filters
+ )
+
+ endpoint = (
+ f"/findings/metadata?filter[{filter_name}]={filter_value}"
+ f"&filter[scan]={self.l_scan_id}"
+ f"&{get_sort_value(FINDINGS_UI_SORT_VALUES)}"
+ )
+ self.client.get(endpoint, headers=get_auth_headers(self.token), name=name)
+
+ @task(2)
def findings_resource_filter_large_scan_include(self):
name = "/findings?filter[resource_filter][scan]&include - 500k"
filter_name, filter_value = get_next_resource_filter(
diff --git a/dashboard/compliance/prowler_threatscore_m365.py b/dashboard/compliance/prowler_threatscore_m365.py
new file mode 100644
index 0000000000..94558f33ad
--- /dev/null
+++ b/dashboard/compliance/prowler_threatscore_m365.py
@@ -0,0 +1,24 @@
+import warnings
+
+from dashboard.common_methods import get_section_containers_cis
+
+warnings.filterwarnings("ignore")
+
+
+def get_table(data):
+ aux = data[
+ [
+ "REQUIREMENTS_ID",
+ "REQUIREMENTS_DESCRIPTION",
+ "REQUIREMENTS_ATTRIBUTES_SECTION",
+ "CHECKID",
+ "STATUS",
+ "REGION",
+ "ACCOUNTID",
+ "RESOURCEID",
+ ]
+ ].copy()
+
+ return get_section_containers_cis(
+ aux, "REQUIREMENTS_ID", "REQUIREMENTS_ATTRIBUTES_SECTION"
+ )
diff --git a/dashboard/pages/compliance.py b/dashboard/pages/compliance.py
index 6fa8288bcf..0eed0ace3f 100644
--- a/dashboard/pages/compliance.py
+++ b/dashboard/pages/compliance.py
@@ -408,7 +408,9 @@ def display_data(
compliance_module = importlib.import_module(
f"dashboard.compliance.{current}"
)
- data.drop_duplicates(keep="first", inplace=True)
+ data = data.drop_duplicates(
+ subset=["CHECKID", "STATUS", "MUTED", "RESOURCEID", "STATUSEXTENDED"]
+ )
if "threatscore" in analytics_input:
data = get_threatscore_mean_by_pillar(data)
@@ -431,6 +433,9 @@ def display_data(
)
df = data.copy()
+ # Remove Muted rows
+ if "MUTED" in df.columns:
+ df = df[df["MUTED"] == "False"]
df = df.groupby(["STATUS"]).size().reset_index(name="counts")
df = df.sort_values(by=["counts"], ascending=False)
diff --git a/docs/getting-started/requirements.md b/docs/getting-started/requirements.md
index d2ebd8a12b..a9318228ab 100644
--- a/docs/getting-started/requirements.md
+++ b/docs/getting-started/requirements.md
@@ -466,3 +466,19 @@ The required modules are:
- [ExchangeOnlineManagement](https://www.powershellgallery.com/packages/ExchangeOnlineManagement/3.6.0): Minimum version 3.6.0. Required for several checks across Exchange, Defender, and Purview.
- [MicrosoftTeams](https://www.powershellgallery.com/packages/MicrosoftTeams/6.6.0): Minimum version 6.6.0. Required for all Teams checks.
+
+## GitHub
+### Authentication
+
+Prowler supports multiple methods to [authenticate with GitHub](https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api). These include:
+
+- **Personal Access Token (PAT)**
+- **OAuth App Token**
+- **GitHub App Credentials**
+
+This flexibility allows you to scan and analyze your GitHub account, including repositories, organizations, and applications, using the method that best suits your use case.
+
+The provided credentials must have the appropriate permissions to perform all the required checks.
+
+???+ note
+ GitHub App Credentials support less checks than other authentication methods.
diff --git a/docs/img/compliance_download.png b/docs/img/compliance_download.png
new file mode 100644
index 0000000000..32aed141b3
Binary files /dev/null and b/docs/img/compliance_download.png differ
diff --git a/docs/img/compliance_section.png b/docs/img/compliance_section.png
new file mode 100644
index 0000000000..2b64031550
Binary files /dev/null and b/docs/img/compliance_section.png differ
diff --git a/docs/img/download_output.png b/docs/img/download_output.png
index 0ea2f73f72..452851b84d 100644
Binary files a/docs/img/download_output.png and b/docs/img/download_output.png differ
diff --git a/docs/img/m365-credentials.png b/docs/img/m365-credentials.png
new file mode 100644
index 0000000000..9c06343ce2
Binary files /dev/null and b/docs/img/m365-credentials.png differ
diff --git a/docs/img/output_folder.png b/docs/img/output_folder.png
index 1806924ec7..11ae4d9925 100644
Binary files a/docs/img/output_folder.png and b/docs/img/output_folder.png differ
diff --git a/docs/img/scan_jobs_section.png b/docs/img/scan_jobs_section.png
new file mode 100644
index 0000000000..e307cf7f60
Binary files /dev/null and b/docs/img/scan_jobs_section.png differ
diff --git a/docs/index.md b/docs/index.md
index a92d4b0444..ff0f3237a2 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -565,6 +565,7 @@ kubectl logs prowler-XXXXX --namespace prowler-ns
???+ note
By default, `prowler` will scan all namespaces in your active Kubernetes context. Use the flag `--context` to specify the context to be scanned and `--namespaces` to specify the namespaces to be scanned.
+
#### Microsoft 365
With M365 you need to specify which auth method is going to be used:
@@ -587,5 +588,29 @@ prowler m365 --browser-auth --tenant-id "XXXXXXXX"
See more details about M365 Authentication in [Requirements](getting-started/requirements.md#microsoft-365)
+#### GitHub
+
+Prowler allows you to scan your GitHub account, including your repositories, organizations or applications.
+
+There are several supported login methods:
+
+```console
+# Personal Access Token (PAT):
+prowler github --personal-access-token pat
+
+# OAuth App Token:
+prowler github --oauth-app-token oauth_token
+
+# GitHub App Credentials:
+prowler github --github-app-id app_id --github-app-key app_key
+```
+
+???+ note
+ If no login method is explicitly provided, Prowler will automatically attempt to authenticate using environment variables in the following order of precedence:
+
+ 1. `GITHUB_PERSONAL_ACCESS_TOKEN`
+ 2. `OAUTH_APP_TOKEN`
+ 3. `GITHUB_APP_ID` and `GITHUB_APP_KEY`
+
## Prowler v2 Documentation
For **Prowler v2 Documentation**, please check it out [here](https://github.com/prowler-cloud/prowler/blob/8818f47333a0c1c1a457453c87af0ea5b89a385f/README.md).
diff --git a/docs/tutorials/aws/getting-started-aws.md b/docs/tutorials/aws/getting-started-aws.md
index 840069a5e3..8414591c67 100644
--- a/docs/tutorials/aws/getting-started-aws.md
+++ b/docs/tutorials/aws/getting-started-aws.md
@@ -1,14 +1,14 @@
-# Getting Started with AWS on Prowler Cloud
+# Getting Started with AWS on Prowler Cloud/App
-Set up your AWS account to enable security scanning using Prowler Cloud.
+Set up your AWS account to enable security scanning using Prowler Cloud/App.
## Requirements
To configure your AWS account, you’ll need:
-1. Access to Prowler Cloud
+1. Access to Prowler Cloud/App
2. Properly configured AWS credentials (either static or via an assumed IAM role)
---
@@ -22,9 +22,9 @@ To configure your AWS account, you’ll need:
---
-## Step 2: Access Prowler Cloud
+## Step 2: Access Prowler Cloud/App
-1. Navigate to [Prowler Cloud](https://cloud.prowler.com/)
+1. Navigate to [Prowler Cloud](https://cloud.prowler.com/) or launch [Prowler App](../prowler-app.md)
2. Go to `Configuration` > `Cloud Providers`

@@ -117,7 +117,7 @@ This method grants permanent access and is the recommended setup for production
terraform apply
```
- 2. During `plan` and `apply`, you will be prompted for the **External ID**, which is available in the Prowler Cloud UI:
+ 2. During `plan` and `apply`, you will be prompted for the **External ID**, which is available in the Prowler Cloud/App UI:

@@ -135,7 +135,7 @@ This method grants permanent access and is the recommended setup for production

-10. Paste the ARN into the corresponding field in Prowler Cloud
+10. Paste the ARN into the corresponding field in Prowler Cloud/App

@@ -171,7 +171,7 @@ You can also configure your AWS account using static credentials (not recommende

- > ⚠️ Save these credentials securely and paste them into the Prowler Cloud setup screen.
+ > ⚠️ Save these credentials securely and paste them into the Prowler Cloud/App setup screen.
=== "Short term credentials (Recommended)"
@@ -203,9 +203,9 @@ You can also configure your AWS account using static credentials (not recommende
}
```
- > ⚠️ Save these credentials securely and paste them into the Prowler Cloud setup screen.
+ > ⚠️ Save these credentials securely and paste them into the Prowler Cloud/App setup screen.
-Complete the form in Prowler Cloud and click `Next`
+Complete the form in Prowler Cloud/App and click `Next`

diff --git a/docs/tutorials/azure/getting-started-azure.md b/docs/tutorials/azure/getting-started-azure.md
index 04240c692a..b9331703e8 100644
--- a/docs/tutorials/azure/getting-started-azure.md
+++ b/docs/tutorials/azure/getting-started-azure.md
@@ -1,15 +1,15 @@
-# Getting Started with Azure on Prowler Cloud
+# Getting Started with Azure on Prowler Cloud/App
-Set up your Azure subscription to enable security scanning using Prowler Cloud.
+Set up your Azure subscription to enable security scanning using Prowler Cloud/App.
## Requirements
To configure your Azure subscription, you’ll need:
1. Get the `Subscription ID`
-2. Access to Prowler Cloud
+2. Access to Prowler Cloud/App
3. Configure authentication in Azure:
3.1 Create a Service Principal
@@ -18,7 +18,7 @@ To configure your Azure subscription, you’ll need:
3.3 Assign permissions at the subscription level
-4. Add the credentials to Prowler Cloud
+4. Add the credentials to Prowler Cloud/App
---
@@ -32,9 +32,9 @@ To configure your Azure subscription, you’ll need:
---
-## Step 2: Access Prowler Cloud
+## Step 2: Access Prowler Cloud/App
-1. Go to [Prowler Cloud](https://cloud.prowler.com/)
+1. Go to [Prowler Cloud](https://cloud.prowler.com/) or launch [Prowler App](../prowler-app.md)
2. Navigate to `Configuration` > `Cloud Providers`

@@ -148,13 +148,13 @@ Assign the following Microsoft Graph permissions:
---
-## Step 4: Add Credentials to Prowler Cloud
+## Step 4: Add Credentials to Prowler Cloud/App
1. Go to your App Registration overview and copy the `Client ID` and `Tenant ID`

-2. Go to Prowler Cloud and paste:
+2. Go to Prowler Cloud/App and paste:
- `Client ID`
- `Tenant ID`
diff --git a/docs/tutorials/compliance.md b/docs/tutorials/compliance.md
index b3424dbf27..7e9d2f5e82 100644
--- a/docs/tutorials/compliance.md
+++ b/docs/tutorials/compliance.md
@@ -23,55 +23,7 @@ In order to see which compliance frameworks are cover by Prowler, you can use op
prowler --list-compliance
```
-### AWS
-
-- `aws_account_security_onboarding_aws`
-- `aws_audit_manager_control_tower_guardrails_aws`
-- `aws_foundational_security_best_practices_aws`
-- `aws_foundational_technical_review_aws`
-- `aws_well_architected_framework_reliability_pillar_aws`
-- `aws_well_architected_framework_security_pillar_aws`
-- `cis_1.4_aws`
-- `cis_1.5_aws`
-- `cis_2.0_aws`
-- `cis_3.0_aws`
-- `cisa_aws`
-- `ens_rd2022_aws`
-- `fedramp_low_revision_4_aws`
-- `fedramp_moderate_revision_4_aws`
-- `ffiec_aws`
-- `gdpr_aws`
-- `gxp_21_cfr_part_11_aws`
-- `gxp_eu_annex_11_aws`
-- `hipaa_aws`
-- `iso27001_2013_aws`
-- `kisa_isms_p_2023_aws`
-- `kisa_isms_p_2023_korean_aws`
-- `mitre_attack_aws`
-- `nist_800_171_revision_2_aws`
-- `nist_800_53_revision_4_aws`
-- `nist_800_53_revision_5_aws`
-- `nist_csf_1.1_aws`
-- `pci_3.2.1_aws`
-- `rbi_cyber_security_framework_aws`
-- `soc2_aws`
-
-### Azure
-
-- `cis_2.0_azure`
-- `cis_2.1_azure`
-- `ens_rd2022_azure`
-- `mitre_attack_azure`
-
-### GCP
-
-- `cis_2.0_gcp`
-- `ens_rd2022_gcp`
-- `mitre_attack_gcp`
-
-### Kubernetes
-
-- `cis_1.8_kubernetes`
+The full and updated list of supported compliance frameworks for each provider is available at [Prowler Hub](https://hub.prowler.com/compliance).
## List Requirements of Compliance Frameworks
For each compliance framework, you can use option `--list-compliance-requirements` to list its requirements:
diff --git a/docs/tutorials/gcp/getting-started-gcp.md b/docs/tutorials/gcp/getting-started-gcp.md
index c4de37d68e..9047b5e0ef 100644
--- a/docs/tutorials/gcp/getting-started-gcp.md
+++ b/docs/tutorials/gcp/getting-started-gcp.md
@@ -1,20 +1,20 @@
-# Getting Started with GCP on Prowler Cloud
+# Getting Started with GCP on Prowler Cloud/App
-Set up your GCP project to enable security scanning using Prowler Cloud.
+Set up your GCP project to enable security scanning using Prowler Cloud/App.
## Requirements
To configure your GCP project, you’ll need:
1. Get the `Project ID`
-2. Access to Prowler Cloud
+2. Access to Prowler Cloud/App
3. Configure authentication in GCP:
3.1 Retrieve credentials from Google Cloud
-4. Add the credentials to Prowler Cloud
+4. Add the credentials to Prowler Cloud/App
---
@@ -27,9 +27,9 @@ To configure your GCP project, you’ll need:
---
-## Step 2: Access Prowler Cloud
+## Step 2: Access Prowler Cloud/App
-1. Go to [Prowler Cloud](https://cloud.prowler.com/)
+1. Go to [Prowler Cloud](https://cloud.prowler.com/) or launch [Prowler App](../prowler-app.md)
2. Navigate to `Configuration` > `Cloud Providers`

@@ -86,7 +86,7 @@ To configure your GCP project, you’ll need:

-8. Extract the following values for Prowler Cloud:
+8. Extract the following values for Prowler Cloud/App:
- `client_id`
- `client_secret`
@@ -96,9 +96,9 @@ To configure your GCP project, you’ll need:
---
-## Step 4: Add Credentials to Prowler Cloud
+## Step 4: Add Credentials to Prowler Cloud/App
-1. Go back to Prowler Cloud and enter the required credentials, then click `Next`
+1. Go back to Prowler Cloud/App and enter the required credentials, then click `Next`

diff --git a/docs/tutorials/github/authentication.md b/docs/tutorials/github/authentication.md
new file mode 100644
index 0000000000..29f7795aba
--- /dev/null
+++ b/docs/tutorials/github/authentication.md
@@ -0,0 +1,44 @@
+# GitHub Authentication
+
+Prowler supports multiple methods to [authenticate with GitHub](https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api). These include:
+
+- **Personal Access Token (PAT)**
+- **OAuth App Token**
+- **GitHub App Credentials**
+
+This flexibility allows you to scan and analyze your GitHub account, including repositories, organizations, and applications, using the method that best suits your use case.
+
+## Supported Login Methods
+
+Here are the available login methods and their respective flags:
+
+### Personal Access Token (PAT)
+Use this method by providing your personal access token directly.
+
+```console
+prowler github --personal-access-token pat
+```
+
+### OAuth App Token
+Authenticate using an OAuth app token.
+
+```console
+prowler github --oauth-app-token oauth_token
+```
+
+### GitHub App Credentials
+Use GitHub App credentials by specifying the App ID and the private key.
+
+```console
+prowler github --github-app-id app_id --github-app-key app_key
+```
+
+### Automatic Login Method Detection
+If no login method is explicitly provided, Prowler will automatically attempt to authenticate using environment variables in the following order of precedence:
+
+1. `GITHUB_PERSONAL_ACCESS_TOKEN`
+2. `OAUTH_APP_TOKEN`
+3. `GITHUB_APP_ID` and `GITHUB_APP_KEY`
+
+???+ note
+ Ensure the corresponding environment variables are set up before running Prowler for automatic detection if you don't plan to specify the login method.
diff --git a/docs/tutorials/kubernetes/in-cluster.md b/docs/tutorials/kubernetes/in-cluster.md
index 9b16b21f09..667b1f6436 100644
--- a/docs/tutorials/kubernetes/in-cluster.md
+++ b/docs/tutorials/kubernetes/in-cluster.md
@@ -20,3 +20,19 @@ kubectl logs prowler-XXXXX --namespace prowler-ns
???+ note
By default, `prowler` will scan all namespaces in your active Kubernetes context. Use the [`--namespace`](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/kubernetes/namespace/) flag to specify the namespace(s) to be scanned.
+
+???+ tip "Identifying the cluster in reports"
+ When running in in-cluster mode, the Kubernetes API does not expose the actual cluster name by default.
+
+ To uniquely identify the cluster in logs and reports, you can:
+
+ - Use the `--cluster-name` flag to manually set the cluster name:
+ ```bash
+ prowler -p kubernetes --cluster-name production-cluster
+ ```
+ - Or set the `CLUSTER_NAME` environment variable:
+ ```yaml
+ env:
+ - name: CLUSTER_NAME
+ value: production-cluster
+ ```
diff --git a/docs/tutorials/microsoft365/getting-started-m365.md b/docs/tutorials/microsoft365/getting-started-m365.md
index 4cfaf1893f..067b31a1dd 100644
--- a/docs/tutorials/microsoft365/getting-started-m365.md
+++ b/docs/tutorials/microsoft365/getting-started-m365.md
@@ -1,6 +1,6 @@
-# Getting Started with M365 on Prowler Cloud
+# Getting Started with M365 on Prowler Cloud/App
-Set up your M365 account to enable security scanning using Prowler Cloud.
+Set up your M365 account to enable security scanning using Prowler Cloud/App.
## Requirements
@@ -8,7 +8,7 @@ To configure your M365 account, you’ll need:
1. Obtain your `Default Domain` from the Entra ID portal.
-2. Access Prowler Cloud and add a new cloud provider `Microsoft 365`.
+2. Access Prowler Cloud/App and add a new cloud provider `Microsoft 365`.
3. Configure your M365 account:
@@ -20,7 +20,7 @@ To configure your M365 account, you’ll need:
3.4 Retrieve your encrypted password.
-4. Add the credentials to Prowler Cloud.
+4. Add the credentials to Prowler Cloud/App.
## Step 1: Obtain your Domain
@@ -38,9 +38,9 @@ Once you are there just look for the `Default Domain` this should be something s
---
-## Step 2: Access Prowler Cloud
+## Step 2: Access Prowler Cloud/App
-1. Go to [Prowler Cloud](https://cloud.prowler.com/)
+1. Go to [Prowler Cloud](https://cloud.prowler.com/) or launch [Prowler App](../prowler-app.md)
2. Navigate to `Configuration` > `Cloud Providers`

@@ -180,13 +180,13 @@ For this step you will need to use PowerShell, here you will have to create your
---
-## Step 4: Add credentials to Prowler Cloud
+## Step 4: Add credentials to Prowler Cloud/App
1. Go to your App Registration overview and copy the `Client ID` and `Tenant ID`

-2. Go to Prowler Cloud and paste:
+2. Go to Prowler Cloud/App and paste:
- `Client ID`
- `Tenant ID`
@@ -194,7 +194,7 @@ For this step you will need to use PowerShell, here you will have to create your
- `M365_USER` your user using the default domain, more info [here](../../getting-started/requirements.md#service-principal-and-user-credentials-authentication-recommended)
- `M365_ENCRYPTED_PASSWORD` generated before
- 
+ 
3. Click `Next`
diff --git a/docs/tutorials/microsoft365/img/add-domain-id.png b/docs/tutorials/microsoft365/img/add-domain-id.png
new file mode 100644
index 0000000000..ba1a4cf440
Binary files /dev/null and b/docs/tutorials/microsoft365/img/add-domain-id.png differ
diff --git a/docs/tutorials/microsoft365/img/click-next-m365.png b/docs/tutorials/microsoft365/img/click-next-m365.png
new file mode 100644
index 0000000000..50fed40735
Binary files /dev/null and b/docs/tutorials/microsoft365/img/click-next-m365.png differ
diff --git a/docs/tutorials/microsoft365/img/launch-scan.png b/docs/tutorials/microsoft365/img/launch-scan.png
new file mode 100644
index 0000000000..07601cf63a
Binary files /dev/null and b/docs/tutorials/microsoft365/img/launch-scan.png differ
diff --git a/docs/tutorials/microsoft365/img/m365-credentials.png b/docs/tutorials/microsoft365/img/m365-credentials.png
new file mode 100644
index 0000000000..9c06343ce2
Binary files /dev/null and b/docs/tutorials/microsoft365/img/m365-credentials.png differ
diff --git a/docs/tutorials/microsoft365/img/select-m365-prowler-cloud.png b/docs/tutorials/microsoft365/img/select-m365-prowler-cloud.png
new file mode 100644
index 0000000000..6507c89839
Binary files /dev/null and b/docs/tutorials/microsoft365/img/select-m365-prowler-cloud.png differ
diff --git a/docs/tutorials/prowler-app.md b/docs/tutorials/prowler-app.md
index 07e7c8f109..0137689147 100644
--- a/docs/tutorials/prowler-app.md
+++ b/docs/tutorials/prowler-app.md
@@ -153,7 +153,7 @@ By default, the `kubeconfig` file is located at `~/.kube/config`.
### **Step 4.5: M365 Credentials**
For M365, Prowler App uses a service principal application with user and password to authenticate, for more information about the requirements needed for this provider check this [section](../getting-started/requirements.md#microsoft-365). Also, the detailed steps of how to add this provider to Prowler Cloud and start using it are [here](./microsoft365/getting-started-m365.md).
-
+
---
@@ -194,15 +194,45 @@ To view all `new` findings that have not been seen prior to this scan, click the
## **Step 9: Download the Outputs**
-Once the scan is complete, you can download the output files generated by Prowler as a single `zip` file. This archive contains the CSV, JSON-OSCF, and HTML reports detailing the findings.
+Once a scan is complete, navigate to the Scan Jobs section to download the output files generated by Prowler:
-To download these files, click the **Download** button. This button becomes available only after the scan has finished.
+
+
+These outputs are bundled into a single .zip archive containing:
+
+- CSV report
+
+- JSON-OSCF formatted results
+
+- HTML report
+
+- A folder with individual compliance reports
+
+???+ note "Note"
+ The Download button only becomes active after a scan completes successfully.
-This action downloads a `zip` file containing an `output` folder, which includes the files mentioned above: CSV, JSON-OSCF, and HTML reports.
+The `zip` file unpacks into a folder named like `prowler-output--`, which includes all of the above outputs. In the example below, you can see the `.csv`, .`json`, and `.html` reports alongside a subfolder for detailed compliance checks.
???+ note "API Note"
- To learn more about the API endpoint the UI uses to download ZIP exports, see: [Prowler API Reference - Download Scan Output](https://api.prowler.com/api/v1/docs#tag/Scan/operation/scans_report_retrieve)
+ For more information about the API endpoint used by the UI to download the ZIP archive, refer to: [Prowler API Reference - Download Scan Output](https://api.prowler.com/api/v1/docs#tag/Scan/operation/scans_report_retrieve)
+
+## **Step 10: Download specified compliance report**
+
+Once your scan has finished, you don’t need to grab the entire ZIP—just pull down the specific compliance report you want:
+
+- Navigate to the **Compliance** section of the UI.
+
+
+
+- Find the Framework report you need.
+
+- Click its **Download** icon to retrieve that report’s CSV file with all the detailed findings.
+
+
+
+???+ note "API Note"
+ To fetch a single compliance report via API, see the Retrieve compliance report as CSV endpoint in the Prowler API Reference.[Prowler API Reference - Retrieve compliance report as CSV](https://api.prowler.com/api/v1/docs#tag/Scan/operation/scans_compliance_retrieve)
diff --git a/poetry.lock b/poetry.lock
index 96465562a4..01c3b39bd3 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -884,7 +884,6 @@ description = "Foreign Function Interface for Python calling C code."
optional = false
python-versions = ">=3.8"
groups = ["main", "dev"]
-markers = "platform_python_implementation != \"PyPy\""
files = [
{file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"},
{file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"},
@@ -954,6 +953,7 @@ files = [
{file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"},
{file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"},
]
+markers = {dev = "platform_python_implementation != \"PyPy\""}
[package.dependencies]
pycparser = "*"
@@ -1907,14 +1907,14 @@ typing-extensions = {version = ">=4,<5", markers = "python_version < \"3.10\""}
[[package]]
name = "h11"
-version = "0.14.0"
+version = "0.16.0"
description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
groups = ["main"]
files = [
- {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"},
- {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
+ {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"},
+ {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"},
]
[[package]]
@@ -1947,19 +1947,19 @@ files = [
[[package]]
name = "httpcore"
-version = "1.0.8"
+version = "1.0.9"
description = "A minimal low-level HTTP client."
optional = false
python-versions = ">=3.8"
groups = ["main"]
files = [
- {file = "httpcore-1.0.8-py3-none-any.whl", hash = "sha256:5254cf149bcb5f75e9d1b2b9f729ea4a4b883d1ad7379fc632b727cec23674be"},
- {file = "httpcore-1.0.8.tar.gz", hash = "sha256:86e94505ed24ea06514883fd44d2bc02d90e77e7979c8eb71b90f41d364a1bad"},
+ {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"},
+ {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"},
]
[package.dependencies]
certifi = "*"
-h11 = ">=0.13,<0.15"
+h11 = ">=0.16"
[package.extras]
asyncio = ["anyio (>=4.0,<5.0)"]
@@ -2184,8 +2184,6 @@ python-versions = "*"
groups = ["dev"]
files = [
{file = "jsonpath-ng-1.7.0.tar.gz", hash = "sha256:f6f5f7fd4e5ff79c785f1573b394043b39849fb2bb47bcead935d12b00beab3c"},
- {file = "jsonpath_ng-1.7.0-py2-none-any.whl", hash = "sha256:898c93fc173f0c336784a3fa63d7434297544b7198124a68f9a3ef9597b0ae6e"},
- {file = "jsonpath_ng-1.7.0-py3-none-any.whl", hash = "sha256:f3d7f9e848cba1b6da28c55b1c26ff915dc9e0b1ba7e752a53d6da8d5cbd00b6"},
]
[package.dependencies]
@@ -3753,11 +3751,11 @@ description = "C parser in Python"
optional = false
python-versions = ">=3.8"
groups = ["main", "dev"]
-markers = "platform_python_implementation != \"PyPy\""
files = [
{file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"},
{file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"},
]
+markers = {dev = "platform_python_implementation != \"PyPy\""}
[[package]]
name = "pydantic"
@@ -3838,6 +3836,26 @@ files = [
{file = "pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f"},
]
+[[package]]
+name = "pygithub"
+version = "2.5.0"
+description = "Use the full Github API v3"
+optional = false
+python-versions = ">=3.8"
+groups = ["main"]
+files = [
+ {file = "PyGithub-2.5.0-py3-none-any.whl", hash = "sha256:b0b635999a658ab8e08720bdd3318893ff20e2275f6446fcf35bf3f44f2c0fd2"},
+ {file = "pygithub-2.5.0.tar.gz", hash = "sha256:e1613ac508a9be710920d26eb18b1905ebd9926aa49398e88151c1b526aad3cf"},
+]
+
+[package.dependencies]
+Deprecated = "*"
+pyjwt = {version = ">=2.4.0", extras = ["crypto"]}
+pynacl = ">=1.4.0"
+requests = ">=2.14.0"
+typing-extensions = ">=4.0.0"
+urllib3 = ">=1.26.0"
+
[[package]]
name = "pygments"
version = "2.19.1"
@@ -3924,6 +3942,59 @@ pyyaml = "*"
[package.extras]
extra = ["pygments (>=2.19.1)"]
+[[package]]
+name = "pynacl"
+version = "1.5.0"
+description = "Python binding to the Networking and Cryptography (NaCl) library"
+optional = false
+python-versions = ">=3.6"
+groups = ["main"]
+files = [
+ {file = "PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a36d4a9dda1f19ce6e03c9a784a2921a4b726b02e1c736600ca9c22029474394"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:0c84947a22519e013607c9be43706dd42513f9e6ae5d39d3613ca1e142fba44d"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06b8f6fa7f5de8d5d2f7573fe8c863c051225a27b61e6860fd047b1775807858"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:a422368fc821589c228f4c49438a368831cb5bbc0eab5ebe1d7fac9dded6567b"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:61f642bf2378713e2c2e1de73444a3778e5f0a38be6fee0fe532fe30060282ff"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-win32.whl", hash = "sha256:e46dae94e34b085175f8abb3b0aaa7da40767865ac82c928eeb9e57e1ea8a543"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-win_amd64.whl", hash = "sha256:20f42270d27e1b6a29f54032090b972d97f0a1b0948cc52392041ef7831fee93"},
+ {file = "PyNaCl-1.5.0.tar.gz", hash = "sha256:8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba"},
+]
+
+[package.dependencies]
+cffi = ">=1.4.1"
+
+[package.extras]
+docs = ["sphinx (>=1.6.5)", "sphinx-rtd-theme"]
+tests = ["hypothesis (>=3.27.0)", "pytest (>=3.2.1,!=3.3.0)"]
+
+[[package]]
+name = "pynacl"
+version = "1.5.0"
+description = "Python binding to the Networking and Cryptography (NaCl) library"
+optional = false
+python-versions = ">=3.6"
+files = [
+ {file = "PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a36d4a9dda1f19ce6e03c9a784a2921a4b726b02e1c736600ca9c22029474394"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:0c84947a22519e013607c9be43706dd42513f9e6ae5d39d3613ca1e142fba44d"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06b8f6fa7f5de8d5d2f7573fe8c863c051225a27b61e6860fd047b1775807858"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:a422368fc821589c228f4c49438a368831cb5bbc0eab5ebe1d7fac9dded6567b"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:61f642bf2378713e2c2e1de73444a3778e5f0a38be6fee0fe532fe30060282ff"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-win32.whl", hash = "sha256:e46dae94e34b085175f8abb3b0aaa7da40767865ac82c928eeb9e57e1ea8a543"},
+ {file = "PyNaCl-1.5.0-cp36-abi3-win_amd64.whl", hash = "sha256:20f42270d27e1b6a29f54032090b972d97f0a1b0948cc52392041ef7831fee93"},
+ {file = "PyNaCl-1.5.0.tar.gz", hash = "sha256:8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba"},
+]
+
+[package.dependencies]
+cffi = ">=1.4.1"
+
+[package.extras]
+docs = ["sphinx (>=1.6.5)", "sphinx-rtd-theme"]
+tests = ["hypothesis (>=3.27.0)", "pytest (>=3.2.1,!=3.3.0)"]
+
[[package]]
name = "pyparsing"
version = "3.2.3"
@@ -5409,4 +5480,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.1"
python-versions = ">3.9.1,<3.13"
-content-hash = "cc15c8ee6b064b3fda85177c0f1c24a57880c401682fe62daefc2d0f4043150a"
+content-hash = "f504af1d00a1da9dd65269509daf32f919c13be6c46f25cd9ef9bfba6b9c9a07"
diff --git a/prowler/CHANGELOG.md b/prowler/CHANGELOG.md
index a2257479ad..2e00f9ce1a 100644
--- a/prowler/CHANGELOG.md
+++ b/prowler/CHANGELOG.md
@@ -2,64 +2,97 @@
All notable changes to the **Prowler SDK** are documented in this file.
-## [v5.6.0] (Prowler UNRELEASED)
+## [v5.7.0] (Prowler v5.7.0)
+
+### Added
+- Update the compliance list supported for each provider from docs. [(#7694)](https://github.com/prowler-cloud/prowler/pull/7694)
+- Allow setting cluster name in in-cluster mode in Kubernetes. [(#7695)](https://github.com/prowler-cloud/prowler/pull/7695)
+- Add Prowler ThreatScore for M365 provider. [(#7692)](https://github.com/prowler-cloud/prowler/pull/7692)
+- Add GitHub provider. [(#5787)](https://github.com/prowler-cloud/prowler/pull/5787)
+- Add `repository_default_branch_requires_multiple_approvals` check for GitHub provider. [(#6160)](https://github.com/prowler-cloud/prowler/pull/6160)
+- Add `repository_default_branch_protection_enabled` check for GitHub provider. [(#6161)](https://github.com/prowler-cloud/prowler/pull/6161)
+- Add `repository_default_branch_requires_linear_history` check for GitHub provider. [(#6162)](https://github.com/prowler-cloud/prowler/pull/6162)
+- Add `repository_default_branch_disallows_force_push` check for GitHub provider. [(#6197)](https://github.com/prowler-cloud/prowler/pull/6197)
+- Add `repository_default_branch_deletion_disabled` check for GitHub provider. [(#6200)](https://github.com/prowler-cloud/prowler/pull/6200)
+- Add `repository_default_branch_status_checks_required` check for GitHub provider. [(#6204)](https://github.com/prowler-cloud/prowler/pull/6204)
+- Add `repository_default_branch_protection_applies_to_admins` check for GitHub provider. [(#6205)](https://github.com/prowler-cloud/prowler/pull/6205)
+- Add `organization_members_mfa_required` check for GitHub provider. [(#6304)](https://github.com/prowler-cloud/prowler/pull/6304)
+- Add GitHub provider documentation and CIS v1.0.0 compliance. [(#6116)](https://github.com/prowler-cloud/prowler/pull/6116)
+
+### Fixed
+- Update CIS 4.0 for M365 provider. [(#7699)](https://github.com/prowler-cloud/prowler/pull/7699)
+- Cover policies with conditions with SNS endpoint in `sns_topics_not_publicly_accessible`. [(#7750)](https://github.com/prowler-cloud/prowler/pull/7750)
+
+---
+
+## [v5.6.0] (Prowler v5.6.0)
### Added
-- Add SOC2 compliance framework to Azure [(#7489)](https://github.com/prowler-cloud/prowler/pull/7489).
-- Add check for unused Service Accounts in GCP [(#7419)](https://github.com/prowler-cloud/prowler/pull/7419).
-- Add Powershell to Microsoft365 [(#7331)](https://github.com/prowler-cloud/prowler/pull/7331).
-- Add service Defender to Microsoft365 with one check for Common Attachments filter enabled in Malware Policies [(#7425)](https://github.com/prowler-cloud/prowler/pull/7425).
-- Add check for Outbound Antispam Policy well configured in service Defender for M365 [(#7480)](https://github.com/prowler-cloud/prowler/pull/7480).
-- Add check for Antiphishing Policy well configured in service Defender in M365 [(#7453)](https://github.com/prowler-cloud/prowler/pull/7453).
-- Add check for Notifications for Internal users enabled in Malware Policies from service Defender in M365 [(#7435)](https://github.com/prowler-cloud/prowler/pull/7435).
-- Support CLOUDSDK_AUTH_ACCESS_TOKEN in GCP [(#7495)](https://github.com/prowler-cloud/prowler/pull/7495).
-- Add service Exchange to Microsoft365 with one check for Organizations Mailbox Auditing enabled [(#7408)](https://github.com/prowler-cloud/prowler/pull/7408)
-- Add check for Bypass Disable in every Mailbox for service Defender in M365 [(#7418)](https://github.com/prowler-cloud/prowler/pull/7418)
-- Add new check `teams_external_domains_restricted` [(#7557)](https://github.com/prowler-cloud/prowler/pull/7557)
-- Add new check `teams_email_sending_to_channel_disabled` [(#7533)](https://github.com/prowler-cloud/prowler/pull/7533)
-- Add new check for External Mails Tagged for service Exchange in M365 [(#7580)](https://github.com/prowler-cloud/prowler/pull/7580)
-- Add new check for WhiteList not used in Transport Rules for service Defender in M365 [(#7569)](https://github.com/prowler-cloud/prowler/pull/7569)
-- Add check for Inbound Antispam Policy with no allowed domains from service Defender in M365 [(#7500)](https://github.com/prowler-cloud/prowler/pull/7500)
-- Add new check `teams_meeting_anonymous_user_join_disabled` [(#7565)](https://github.com/prowler-cloud/prowler/pull/7565)
-- Add new check `teams_unmanaged_communication_disabled` [(#7561)](https://github.com/prowler-cloud/prowler/pull/7561)
-- Add new check `teams_external_users_cannot_start_conversations` [(#7562)](https://github.com/prowler-cloud/prowler/pull/7562)
-- Add new check for AllowList not used in the Connection Filter Policy from service Defender in M365 [(#7492)](https://github.com/prowler-cloud/prowler/pull/7492)
-- Add new check for SafeList not enabled in the Connection Filter Policy from service Defender in M365 [(#7492)](https://github.com/prowler-cloud/prowler/pull/7492)
-- Add new check for DKIM enabled for service Defender in M365 [(#7485)](https://github.com/prowler-cloud/prowler/pull/7485)
-- Add new check `teams_meeting_anonymous_user_start_disabled` [(#7567)](https://github.com/prowler-cloud/prowler/pull/7567)
-- Add new check `teams_meeting_external_lobby_bypass_disabled` [(#7568)](https://github.com/prowler-cloud/prowler/pull/7568)
-- Add new check `teams_meeting_dial_in_lobby_bypass_disabled` [(#7571)](https://github.com/prowler-cloud/prowler/pull/7571)
-- Add new check `teams_meeting_external_control_disabled` [(#7604)](https://github.com/prowler-cloud/prowler/pull/7604)
-- Add new check `teams_meeting_external_chat_disabled` [(#7605)](https://github.com/prowler-cloud/prowler/pull/7605)
-- Add new check `teams_meeting_recording_disabled` [(#7607)](https://github.com/prowler-cloud/prowler/pull/7607)
-- Add new check `teams_meeting_presenters_restricted` [(#7613)](https://github.com/prowler-cloud/prowler/pull/7613)
-- Add new check `teams_meeting_chat_anonymous_users_disabled` [(#7579)](https://github.com/prowler-cloud/prowler/pull/7579)
-- Add Prowler Threat Score Compliance Framework [(#7603)](https://github.com/prowler-cloud/prowler/pull/7603)
-- Add documentation for M365 provider [(#7622)](https://github.com/prowler-cloud/prowler/pull/7622)
-- Add support for m365 provider in Prowler Dashboard [(#7633)](https://github.com/prowler-cloud/prowler/pull/7633)
-- Add new check for Modern Authentication enabled for Exchange Online in M365 [(#7636)](https://github.com/prowler-cloud/prowler/pull/7636)
-- Add new check `sharepoint_onedrive_sync_restricted_unmanaged_devices` [(#7589)](https://github.com/prowler-cloud/prowler/pull/7589)
-- Add new check for Additional Storage restricted for Exchange in M365 [(#7638)](https://github.com/prowler-cloud/prowler/pull/7638)
-- Add new check for Roles Assignment Policy with no AddIns for Exchange in M365 [(#7644)](https://github.com/prowler-cloud/prowler/pull/7644)
-- Add new check for Auditing Mailbox on E3 users is enabled for Exchange in M365 [(#7642)](https://github.com/prowler-cloud/prowler/pull/7642)
-- Add new check for SMTP Auth disabled for Exchange in M365 [(#7640)](https://github.com/prowler-cloud/prowler/pull/7640)
-- Add new check for MailTips full enabled for Exchange in M365 [(#7637)](https://github.com/prowler-cloud/prowler/pull/7637)
-- Modified check `exchange_mailbox_properties_auditing_enabled` to make it configurable [(#7662)](https://github.com/prowler-cloud/prowler/pull/7662)
+- Add SOC2 compliance framework to Azure. [(#7489)](https://github.com/prowler-cloud/prowler/pull/7489)
+- Add check for unused Service Accounts in GCP. [(#7419)](https://github.com/prowler-cloud/prowler/pull/7419)
+- Add Powershell to Microsoft365. [(#7331)](https://github.com/prowler-cloud/prowler/pull/7331)
+- Add service Defender to Microsoft365 with one check for Common Attachments filter enabled in Malware Policies. [(#7425)](https://github.com/prowler-cloud/prowler/pull/7425)
+- Add check for Outbound Antispam Policy well configured in service Defender for M365. [(#7480)](https://github.com/prowler-cloud/prowler/pull/7480)
+- Add check for Antiphishing Policy well configured in service Defender in M365. [(#7453)](https://github.com/prowler-cloud/prowler/pull/7453)
+- Add check for Notifications for Internal users enabled in Malware Policies from service Defender in M365. [(#7435)](https://github.com/prowler-cloud/prowler/pull/7435)
+- Add support CLOUDSDK_AUTH_ACCESS_TOKEN in GCP. [(#7495)](https://github.com/prowler-cloud/prowler/pull/7495)
+- Add service Exchange to Microsoft365 with one check for Organizations Mailbox Auditing enabled. [(#7408)](https://github.com/prowler-cloud/prowler/pull/7408)
+- Add check for Bypass Disable in every Mailbox for service Defender in M365. [(#7418)](https://github.com/prowler-cloud/prowler/pull/7418)
+- Add new check `teams_external_domains_restricted`. [(#7557)](https://github.com/prowler-cloud/prowler/pull/7557)
+- Add new check `teams_email_sending_to_channel_disabled`. [(#7533)](https://github.com/prowler-cloud/prowler/pull/7533)
+- Add new check for External Mails Tagged for service Exchange in M365. [(#7580)](https://github.com/prowler-cloud/prowler/pull/7580)
+- Add new check for WhiteList not used in Transport Rules for service Defender in M365. [(#7569)](https://github.com/prowler-cloud/prowler/pull/7569)
+- Add check for Inbound Antispam Policy with no allowed domains from service Defender in M365. [(#7500)](https://github.com/prowler-cloud/prowler/pull/7500)
+- Add new check `teams_meeting_anonymous_user_join_disabled`. [(#7565)](https://github.com/prowler-cloud/prowler/pull/7565)
+- Add new check `teams_unmanaged_communication_disabled`. [(#7561)](https://github.com/prowler-cloud/prowler/pull/7561)
+- Add new check `teams_external_users_cannot_start_conversations`. [(#7562)](https://github.com/prowler-cloud/prowler/pull/7562)
+- Add new check for AllowList not used in the Connection Filter Policy from service Defender in M365. [(#7492)](https://github.com/prowler-cloud/prowler/pull/7492)
+- Add new check for SafeList not enabled in the Connection Filter Policy from service Defender in M365. [(#7492)](https://github.com/prowler-cloud/prowler/pull/7492)
+- Add new check for DKIM enabled for service Defender in M365. [(#7485)](https://github.com/prowler-cloud/prowler/pull/7485)
+- Add new check `teams_meeting_anonymous_user_start_disabled`. [(#7567)](https://github.com/prowler-cloud/prowler/pull/7567)
+- Add new check `teams_meeting_external_lobby_bypass_disabled`. [(#7568)](https://github.com/prowler-cloud/prowler/pull/7568)
+- Add new check `teams_meeting_dial_in_lobby_bypass_disabled`. [(#7571)](https://github.com/prowler-cloud/prowler/pull/7571)
+- Add new check `teams_meeting_external_control_disabled`. [(#7604)](https://github.com/prowler-cloud/prowler/pull/7604)
+- Add new check `teams_meeting_external_chat_disabled`. [(#7605)](https://github.com/prowler-cloud/prowler/pull/7605)
+- Add new check `teams_meeting_recording_disabled`. [(#7607)](https://github.com/prowler-cloud/prowler/pull/7607)
+- Add new check `teams_meeting_presenters_restricted`. [(#7613)](https://github.com/prowler-cloud/prowler/pull/7613)
+- Add new check `teams_security_reporting_enabled`. [(#7614)](https://github.com/prowler-cloud/prowler/pull/7614)
+- Add new check `defender_chat_report_policy_configured`. [(#7614)](https://github.com/prowler-cloud/prowler/pull/7614)
+- Add new check `teams_meeting_chat_anonymous_users_disabled`. [(#7579)](https://github.com/prowler-cloud/prowler/pull/7579)
+- Add Prowler Threat Score Compliance Framework. [(#7603)](https://github.com/prowler-cloud/prowler/pull/7603)
+- Add documentation for M365 provider. [(#7622)](https://github.com/prowler-cloud/prowler/pull/7622)
+- Add support for m365 provider in Prowler Dashboard. [(#7633)](https://github.com/prowler-cloud/prowler/pull/7633)
+- Add new check for Modern Authentication enabled for Exchange Online in M365. [(#7636)](https://github.com/prowler-cloud/prowler/pull/7636)
+- Add new check `sharepoint_onedrive_sync_restricted_unmanaged_devices`. [(#7589)](https://github.com/prowler-cloud/prowler/pull/7589)
+- Add new check for Additional Storage restricted for Exchange in M365. [(#7638)](https://github.com/prowler-cloud/prowler/pull/7638)
+- Add new check for Roles Assignment Policy with no AddIns for Exchange in M365. [(#7644)](https://github.com/prowler-cloud/prowler/pull/7644)
+- Add new check for Auditing Mailbox on E3 users is enabled for Exchange in M365. [(#7642)](https://github.com/prowler-cloud/prowler/pull/7642)
+- Add new check for SMTP Auth disabled for Exchange in M365. [(#7640)](https://github.com/prowler-cloud/prowler/pull/7640)
+- Add new check for MailTips full enabled for Exchange in M365. [(#7637)](https://github.com/prowler-cloud/prowler/pull/7637)
+- Add new check for Comprehensive Attachments Filter Applied for Defender in M365. [(#7661)](https://github.com/prowler-cloud/prowler/pull/7661)
+- Modified check `exchange_mailbox_properties_auditing_enabled` to make it configurable. [(#7662)](https://github.com/prowler-cloud/prowler/pull/7662)
+- Add snapshots to m365 documentation. [(#7673)](https://github.com/prowler-cloud/prowler/pull/7673)
+- Add support for static credentials for sending findings to Amazon S3 and AWS Security Hub. [(#7322)](https://github.com/prowler-cloud/prowler/pull/7322)
+- Add Prowler ThreatScore for M365 provider. [(#7692)](https://github.com/prowler-cloud/prowler/pull/7692)
+- Add Microsoft User and User Credential auth to reports [(#7681)](https://github.com/prowler-cloud/prowler/pull/7681)
### Fixed
-- Fix package name location in pyproject.toml while replicating for prowler-cloud [(#7531)](https://github.com/prowler-cloud/prowler/pull/7531).
-- Remove cache in PyPI release action [(#7532)](https://github.com/prowler-cloud/prowler/pull/7532).
-- Add the correct values for logger.info inside iam service [(#7526)](https://github.com/prowler-cloud/prowler/pull/7526).
-- Update S3 bucket naming validation to accept dots [(#7545)](https://github.com/prowler-cloud/prowler/pull/7545).
-- Handle new FlowLog model properties in Azure [(#7546)](https://github.com/prowler-cloud/prowler/pull/7546).
-- Improve compliance and dashboard [(#7596)](https://github.com/prowler-cloud/prowler/pull/7596)
-- Remove invalid parameter `create_file_descriptor` [(#7600)](https://github.com/prowler-cloud/prowler/pull/7600)
-- Remove first empty line in HTML output [(#7606)](https://github.com/prowler-cloud/prowler/pull/7606)
-- Remove empty files in Prowler [(#7627)](https://github.com/prowler-cloud/prowler/pull/7627)
-- Ensure that ContentType in upload_file matches the uploaded file’s format [(#7635)](https://github.com/prowler-cloud/prowler/pull/7635)
-- Fix incorrect check inside 4.4.1 requirement for Azure CIS 2.0 [(#7656)](https://github.com/prowler-cloud/prowler/pull/7656).
+- Fix package name location in pyproject.toml while replicating for prowler-cloud. [(#7531)](https://github.com/prowler-cloud/prowler/pull/7531)
+- Remove cache in PyPI release action. [(#7532)](https://github.com/prowler-cloud/prowler/pull/7532)
+- Add the correct values for logger.info inside iam service. [(#7526)](https://github.com/prowler-cloud/prowler/pull/7526)
+- Update S3 bucket naming validation to accept dots. [(#7545)](https://github.com/prowler-cloud/prowler/pull/7545)
+- Handle new FlowLog model properties in Azure. [(#7546)](https://github.com/prowler-cloud/prowler/pull/7546)
+- Improve compliance and dashboard. [(#7596)](https://github.com/prowler-cloud/prowler/pull/7596)
+- Remove invalid parameter `create_file_descriptor`. [(#7600)](https://github.com/prowler-cloud/prowler/pull/7600)
+- Remove first empty line in HTML output. [(#7606)](https://github.com/prowler-cloud/prowler/pull/7606)
+- Remove empty files in Prowler. [(#7627)](https://github.com/prowler-cloud/prowler/pull/7627)
+- Ensure that ContentType in upload_file matches the uploaded file's format. [(#7635)](https://github.com/prowler-cloud/prowler/pull/7635)
+- Fix incorrect check inside 4.4.1 requirement for Azure CIS 2.0. [(#7656)](https://github.com/prowler-cloud/prowler/pull/7656)
+- Remove muted findings on compliance page from Prowler Dashboard. [(#7683)](https://github.com/prowler-cloud/prowler/pull/7683)
+- Remove duplicated findings on compliance page from Prowler Dashboard. [(#7686)](https://github.com/prowler-cloud/prowler/pull/7686)
+- Fix incorrect values for Prowler Threatscore compliance LevelOfRisk inside requirements. [(#7667)](https://github.com/prowler-cloud/prowler/pull/7667)
---
@@ -67,8 +100,8 @@ All notable changes to the **Prowler SDK** are documented in this file.
### Fixed
-- Add default name to contacts in Azure Defender [(#7483)](https://github.com/prowler-cloud/prowler/pull/7483).
-- Handle projects without ID in GCP [(#7496)](https://github.com/prowler-cloud/prowler/pull/7496).
-- Restore packages location in PyProject [(#7510)](https://github.com/prowler-cloud/prowler/pull/7510).
+- Add default name to contacts in Azure Defender. [(#7483)](https://github.com/prowler-cloud/prowler/pull/7483)
+- Handle projects without ID in GCP. [(#7496)](https://github.com/prowler-cloud/prowler/pull/7496)
+- Restore packages location in PyProject. [(#7510)](https://github.com/prowler-cloud/prowler/pull/7510)
---
diff --git a/prowler/__main__.py b/prowler/__main__.py
index b201268da3..e22d7b7fa6 100644
--- a/prowler/__main__.py
+++ b/prowler/__main__.py
@@ -50,6 +50,7 @@ from prowler.lib.outputs.compliance.aws_well_architected.aws_well_architected im
from prowler.lib.outputs.compliance.cis.cis_aws import AWSCIS
from prowler.lib.outputs.compliance.cis.cis_azure import AzureCIS
from prowler.lib.outputs.compliance.cis.cis_gcp import GCPCIS
+from prowler.lib.outputs.compliance.cis.cis_github import GithubCIS
from prowler.lib.outputs.compliance.cis.cis_kubernetes import KubernetesCIS
from prowler.lib.outputs.compliance.cis.cis_m365 import M365CIS
from prowler.lib.outputs.compliance.compliance import display_compliance_table
@@ -79,6 +80,9 @@ from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_azur
from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_gcp import (
ProwlerThreatScoreGCP,
)
+from prowler.lib.outputs.compliance.prowler_threatscore.prowler_threatscore_m365 import (
+ ProwlerThreatScoreM365,
+)
from prowler.lib.outputs.csv.csv import CSV
from prowler.lib.outputs.finding import Finding
from prowler.lib.outputs.html.html import HTML
@@ -93,6 +97,7 @@ from prowler.providers.azure.models import AzureOutputOptions
from prowler.providers.common.provider import Provider
from prowler.providers.common.quick_inventory import run_provider_quick_inventory
from prowler.providers.gcp.models import GCPOutputOptions
+from prowler.providers.github.models import GithubOutputOptions
from prowler.providers.kubernetes.models import KubernetesOutputOptions
from prowler.providers.m365.models import M365OutputOptions
from prowler.providers.nhn.models import NHNOutputOptions
@@ -277,6 +282,10 @@ def prowler():
output_options = KubernetesOutputOptions(
args, bulk_checks_metadata, global_provider.identity
)
+ elif provider == "github":
+ output_options = GithubOutputOptions(
+ args, bulk_checks_metadata, global_provider.identity
+ )
elif provider == "m365":
output_options = M365OutputOptions(
args, bulk_checks_metadata, global_provider.identity
@@ -726,6 +735,18 @@ def prowler():
)
generated_outputs["compliance"].append(cis)
cis.batch_write_data_to_file()
+ elif compliance_name == "prowler_threatscore_m365":
+ filename = (
+ f"{output_options.output_directory}/compliance/"
+ f"{output_options.output_filename}_{compliance_name}.csv"
+ )
+ prowler_threatscore = ProwlerThreatScoreM365(
+ findings=finding_outputs,
+ compliance=bulk_compliance_frameworks[compliance_name],
+ file_path=filename,
+ )
+ generated_outputs["compliance"].append(prowler_threatscore)
+ prowler_threatscore.batch_write_data_to_file()
else:
filename = (
f"{output_options.output_directory}/compliance/"
@@ -767,6 +788,35 @@ def prowler():
generated_outputs["compliance"].append(generic_compliance)
generic_compliance.batch_write_data_to_file()
+ elif provider == "github":
+ for compliance_name in input_compliance_frameworks:
+ if compliance_name.startswith("cis_"):
+ # Generate CIS Finding Object
+ filename = (
+ f"{output_options.output_directory}/compliance/"
+ f"{output_options.output_filename}_{compliance_name}.csv"
+ )
+ cis = GithubCIS(
+ findings=finding_outputs,
+ compliance=bulk_compliance_frameworks[compliance_name],
+ file_path=filename,
+ )
+ generated_outputs["compliance"].append(cis)
+ cis.batch_write_data_to_file()
+ else:
+ filename = (
+ f"{output_options.output_directory}/compliance/"
+ f"{output_options.output_filename}_{compliance_name}.csv"
+ )
+ generic_compliance = GenericCompliance(
+ findings=finding_outputs,
+ compliance=bulk_compliance_frameworks[compliance_name],
+ create_file_descriptor=True,
+ file_path=filename,
+ )
+ generated_outputs["compliance"].append(generic_compliance)
+ generic_compliance.batch_write_data_to_file()
+
# AWS Security Hub Integration
if provider == "aws":
# Send output to S3 if needed (-B / -D) for all the output formats
diff --git a/prowler/compliance/aws/prowler_threatscore_aws.json b/prowler/compliance/aws/prowler_threatscore_aws.json
index dcc036f7f6..c53b7e1590 100644
--- a/prowler/compliance/aws/prowler_threatscore_aws.json
+++ b/prowler/compliance/aws/prowler_threatscore_aws.json
@@ -51,7 +51,7 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "To enhance security and reduce the risk of unauthorized access, Multi-Factor Authentication (MFA) should be enabled for all IAM users who have access to the AWS Management Console.",
"AdditionalInformation": "Without Multi-Factor Authentication (MFA), a compromised password alone is enough to allow an attacker to access the console, gaining full visibility and control over AWS resources.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -171,7 +171,7 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "AWS IAM users can authenticate and access AWS resources using various types of credentials, including passwords and access keys. To minimize security risks, it is recommended to deactivate or remove any credentials that have been unused for 45 days or more.",
"AdditionalInformation": "Disabling or removing inactive credentials reduces the attack surface and prevents unauthorized access through compromised or forgotten credentials. Unused credentials pose a security risk, as attackers may exploit them if they remain active without regular monitoring. Regularly auditing and revoking stale credentials enhances overall account security.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -188,30 +188,12 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "Access keys consist of an access key ID and a secret access key, which are used to authenticate and sign programmatic requests made to AWS. These keys allow users and applications to interact with AWS services via the AWS Command Line Interface (CLI), AWS SDKs, PowerShell tools, or direct API calls. To maintain security, it is recommended that all access keys be rotated regularly to minimize the risk of unauthorized access.",
"AdditionalInformation": "Regularly rotating access keys reduces the risk of compromised credentials being exploited. If an access key is leaked, cracked, or stolen, rotating it limits the window of opportunity for malicious use. Additionally, rotating keys ensures that inactive or outdated credentials cannot be used for unauthorized access, enhancing overall security and compliance.",
- "LevelOfRisk": 2
+ "LevelOfRisk": 3
}
]
},
{
"Id": "1.1.12",
- "Description": "Ensure credentials unused for 90 days or greater are disabled",
- "Checks": [
- "iam_user_accesskey_unused",
- "iam_user_console_access_unused"
- ],
- "Attributes": [
- {
- "Title": "Credentials unused for 90 days disabled",
- "Section": "1. IAM",
- "SubSection": "1.1 Authentication",
- "AttributeDescription": "AWS IAM credentials, such as passwords and access keys, grant access to AWS resources. Credentials that remain unused for 90 days or more pose a security risk, as they may belong to inactive users or forgotten accounts. It is recommended to disable or remove IAM credentials that have not been used for 90 days to reduce the risk of unauthorized access.",
- "AdditionalInformation": "Disabling unused credentials minimizes the attack surface by ensuring that inactive or abandoned accounts cannot be exploited by attackers. Stale credentials may become a target for brute-force attacks, credential stuffing, or insider threats. Regularly auditing and deactivating unused credentials helps maintain a least privilege security model, reducing the likelihood of unauthorized access.",
- "LevelOfRisk": 1
- }
- ]
- },
- {
- "Id": "1.1.13",
"Description": "Ensure IAM password policy expires passwords within 90 days or less",
"Checks": [
"iam_password_policy_expires_passwords_within_90_days_or_less"
@@ -228,7 +210,7 @@
]
},
{
- "Id": "1.1.14",
+ "Id": "1.1.13",
"Description": "Ensure no root account access key exists",
"Checks": [
"iam_no_root_access_key"
@@ -292,7 +274,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "IAM policies define permissions for users, groups, and roles, controlling access to AWS resources. Following the principle of least privilege, users should be granted only the permissions necessary to perform their tasks. Instead of assigning broad administrative privileges, permissions should be carefully crafted to allow only the required actions.",
"AdditionalInformation": "Starting with minimal permissions and granting additional access as needed is significantly more secure than providing excessive permissions and attempting to restrict them later. Assigning full administrative privileges increases the risk of unauthorized or accidental actions that could compromise AWS resources. IAM policies containing Effect: Allow, Action: , Resource: should be removed to prevent unrestricted access and enforce security best practices.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -326,7 +308,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "AWS instances can access AWS resources either by embedding access keys in API calls or by assigning an IAM role with the necessary permissions. Using IAM roles ensures secure, controlled access without hardcoding credentials.",
"AdditionalInformation": "IAM roles eliminate the risks associated with hardcoded credentials, reducing exposure to external threats. Unlike access keys, which can be used outside AWS if compromised, IAM roles require an attacker to maintain control of an instance to exploit privileges. Additionally, IAM roles simplify credential management by ensuring permissions are automatically updated without the need for manual key rotation.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -343,7 +325,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "To enable HTTPS connections for applications and websites hosted on AWS, an SSL/TLS server certificate is required. AWS provides two options for managing certificates: AWS Certificate Manager (ACM) – The preferred method for managing SSL/TLS certificates, automating renewals and deployment. IAM Certificate Storage – Used only when deploying SSL/TLS certificates in regions not supported by ACM. IAM securely encrypts private keys and stores them, but certificates must be obtained from an external provider. ACM certificates cannot be uploaded to IAM, and IAM certificates cannot be managed from the IAM Console.",
"AdditionalInformation": "Removing expired SSL/TLS certificates prevents the accidental deployment of invalid certificates, which could cause service disruptions, security warnings, and loss of credibility for applications using AWS services like Elastic Load Balancer (ELB). As a best practice, expired certificates should be deleted to maintain a secure and trusted application environment.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -360,7 +342,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "The root account in AWS has unrestricted administrative privileges and should be used only for initial account setup and emergency scenarios. Regular operations should be performed using IAM users or roles with least privilege access to minimize security risks.",
"AdditionalInformation": "Using the root account increases the risk of unauthorized access, accidental misconfigurations, and privilege misuse. By restricting root account usage and delegating tasks to IAM users or roles, organizations can enforce better access control, auditing, and security best practices.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -377,7 +359,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "Enable IAM Access Analyzer for all AWS regions to monitor IAM policies and identify resources with unintended external access. IAM Access Analyzer, introduced at AWS re:Invent 2019, scans resource-based policies and provides visibility into which resources—such as KMS keys, IAM roles, S3 buckets, Lambda functions, and SQS queues—are accessible by external accounts or federated users. This allows administrators to enforce least privilege access and mitigate unauthorized access risks. IAM Access Analyzer operates within the same AWS region as the resources being analyzed.",
"AdditionalInformation": "IAM Access Analyzer enhances security visibility by detecting AWS resources shared with external entities, helping organizations identify potential security risks and ensure compliance with least privilege principles. It continuously evaluates resource-based policies using logic-based analysis, allowing teams to promptly remediate misconfigurations that could lead to unauthorized access or data exposure.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -411,7 +393,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "AWS CloudShell provides a managed command-line interface (CLI) for interacting with AWS services. The AWSCloudShellFullAccess IAM policy grants full access to CloudShell, including file upload and download capabilities between a user’s local system and the CloudShell environment. Within CloudShell, users have sudo privileges and unrestricted internet access, making it possible to install software—such as file transfer tools—that could facilitate data movement to external servers.",
"AdditionalInformation": "Access to AWSCloudShellFullAccess should be restricted, as it can serve as a potential data exfiltration vector for malicious or compromised cloud administrators. Granting full permissions to CloudShell increases the risk of unauthorized data transfers outside the AWS environment. AWS provides guidance on creating more restrictive IAM policies to limit file transfer capabilities, reducing security risks.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -445,7 +427,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "Amazon S3 bucket permissions can be configured using a bucket policy to enforce access restrictions. To enhance security, objects within the bucket should be made accessible only via HTTPS, ensuring encrypted data transmission.",
"AdditionalInformation": "By default, Amazon S3 accepts both HTTP and HTTPS requests, which can expose data to interception. To enforce secure access, HTTP requests should be explicitly denied in the bucket policy. Simply allowing HTTPS without blocking HTTP does not fully comply with security best practices, as unencrypted requests may still be accepted.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -462,7 +444,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "AWS EC2 instances allow users to choose between Instance Metadata Service Version 1 (IMDSv1), which uses a request/response model, or Instance Metadata Service Version 2 (IMDSv2), which uses a session-based approach for enhanced security",
"AdditionalInformation": "Instance metadata refers to the data about an EC2 instance, such as host names, events, and security groups, that is used for managing and configuring the instance. When enabling the Metadata Service, users can opt for either IMDSv1, which operates via a simple request/response model, or IMDSv2, which implements session authentication for additional security. With IMDSv2, each request is secured by session-based authentication, ensuring that all interactions with the instance's metadata and credentials are protected. IMDSv1, on the other hand, may expose instances to Server-Side Request Forgery (SSRF) attacks. To improve security, Amazon recommends using IMDSv2",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -479,7 +461,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Enabling MFA Delete on a sensitive or classified Amazon S3 bucket adds an extra layer of protection by requiring two-factor authentication for critical actions, such as deleting object versions or changing the bucket’s versioning state.",
"AdditionalInformation": "MFA Delete helps prevent accidental or malicious deletions by requiring an additional authentication step. This mitigates the risk of data loss due to compromised credentials or unauthorized access, ensuring that critical objects remain protected.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -513,7 +495,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Each Amazon VPC includes a default security group that initially denies all inbound traffic, allows all outbound traffic, and permits unrestricted communication between instances within the group. If no security group is specified when launching an instance, it is automatically assigned to this default security group. Since security groups control stateful ingress and egress traffic, it is recommended to restrict all inbound and outbound traffic in the default security group.",
"AdditionalInformation": "Restricting all traffic in the default security group enforces least privilege access by ensuring that AWS resources are explicitly assigned to well-defined security groups. This approach reduces unintended exposure, improves network segmentation, and promotes secure resource placement within AWS environments.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -530,7 +512,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "After establishing a VPC peering connection, routing tables must be updated to enable communication between the peered VPCs. Routes can be configured with granular specificity, allowing connections to be restricted to a single host or a specific subnet within the peered VPC.",
"AdditionalInformation": "Defining highly specific routes in VPC peering connections enhances security by limiting access to only the necessary resources. This minimizes the potential impact of a security breach, ensuring that resources outside the defined routes remain inaccessible, reducing the risk of lateral movement within the network.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -549,7 +531,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Network Access Control Lists (NACLs) provide stateless filtering of ingress and egress traffic to AWS resources. It is recommended that NACLs do not allow unrestricted inbound access to remote administration ports, such as SSH (port 22) and RDP (port 3389), over TCP (6), UDP (17), or ALL (-1) protocols to prevent unauthorized access.",
"AdditionalInformation": "Exposing remote server administration ports (e.g., SSH on 22 and RDP on 3389) to the public internet increases the attack surface, making resources more vulnerable to brute-force attacks and unauthorized access. Restricting inbound access to these ports helps reduce security risks and limit potential exploitation.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -568,7 +550,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Security groups enforce stateful filtering of ingress and egress traffic to AWS resources. To enhance security, no security group should allow unrestricted inbound access to remote administration ports, such as SSH (port 22) and RDP (port 3389), over TCP (6), UDP (17), or ALL (-1) protocols.",
"AdditionalInformation": "Exposing remote administration ports to the public internet significantly increases the attack surface, making resources more vulnerable to brute-force attacks, exploitation, and unauthorized access. Restricting ingress traffic to these ports helps reduce security risks and prevent potential system compromises.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -602,7 +584,7 @@
"SubSection": "4.2 At-Rest",
"AttributeDescription": "Amazon Elastic Compute Cloud (EC2) supports encryption at rest for Elastic Block Store (EBS) volumes, ensuring that stored data remains protected. While EBS encryption is disabled by default, organizations can enforce automatic encryption of newly created volumes to enhance data security and compliance.",
"AdditionalInformation": "Enforcing EBS volume encryption reduces the risk of data exposure, unauthorized access, and compliance violations. If encryption remains intact, even if storage is compromised, data remains unreadable to unauthorized users. Encrypting data at rest ensures that sensitive information is protected against accidental disclosure, insider threats, and external attacks.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -619,7 +601,7 @@
"SubSection": "4.2 At-Rest",
"AttributeDescription": "Amazon Relational Database Service (RDS) supports encryption at rest using the industry-standard AES-256 encryption algorithm to secure database instances and their associated storage. Once enabled, RDS encryption automatically handles access authentication and decryption, ensuring secure data storage with minimal performance impact.",
"AdditionalInformation": "Databases often contain sensitive and business-critical information, making encryption essential to protect against unauthorized access and data breaches. Enabling RDS encryption ensures that underlying storage, automated backups, read replicas, and snapshots are all encrypted, preventing accidental or malicious data exposure while maintaining compliance with security best practices.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -636,7 +618,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Simple Notification Service (SNS) topics enable messaging between AWS services, applications, and users. By default, SNS topics should be restricted to trusted AWS accounts or IAM roles to prevent unauthorized access. Allowing global send (sns:Publish) or subscribe (sns:Subscribe) permissions means any AWS account or unauthenticated entity could send messages or subscribe to the topic, potentially leading to spam, data leaks, or misuse of notifications.",
"AdditionalInformation": "SNS topics with global send or subscribe permissions expose AWS environments to unauthorized message injection, data exfiltration, and Denial-of-Service (DoS) attacks. An attacker could flood an SNS topic with malicious or fraudulent messages, leading to unexpected charges or service disruptions. Restricting access ensures that only authorized AWS accounts, applications, or IAM roles can send and receive messages, reducing security risks and protecting system integrity.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -687,7 +669,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon Redshift clusters store and process large-scale data for analytics and business intelligence workloads. By default, Redshift clusters can be configured with a public endpoint, making them accessible from the internet. To minimize security risks, Redshift clusters should be restricted to private networks and should not have a public endpoint unless absolutely necessary and properly secured.",
"AdditionalInformation": "Exposing a Redshift cluster to the public internet increases the risk of unauthorized access, data breaches, and cyberattacks. Attackers could attempt brute-force login attempts, exploit misconfigurations, or access sensitive business data. Keeping Redshift clusters within private subnets and restricting access via security groups, VPC settings, and IAM policies ensures that only trusted networks and users can connect, reducing the attack surface and enhancing data security.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -704,7 +686,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "AWS API Gateway allows developers to create, deploy, and manage APIs that connect applications to backend services. By default, API Gateway endpoints can be publicly accessible, meaning they can be invoked from anywhere on the internet. To enhance security, API Gateway endpoints should be restricted to private networks using VPC links, private API settings, or access control mechanisms to ensure that only authorized entities can interact with the API.",
"AdditionalInformation": "Publicly accessible API Gateway endpoints can expose backend services to unauthorized access, data leaks, and potential exploitation. Attackers may attempt brute-force authentication, injection attacks, or abuse API functionality if access is not properly restricted. To reduce the attack surface, API Gateway endpoints should be limited to internal use or protected with authentication, IAM permissions, WAF rules, or private VPC access to ensure only trusted users and systems can invoke the API.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -721,7 +703,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon EC2 instances launched via Auto Scaling groups can automatically scale workloads based on demand. By default, instances can be assigned public IP addresses, making them accessible from the internet. To enhance security, EC2 instances in Auto Scaling group launch configurations should not have public IP addresses, ensuring they remain within a private network and are only accessible through secure channels such as bastion hosts or VPN connections.",
"AdditionalInformation": "Assigning public IP addresses to Auto Scaling group instances increases the risk of unauthorized access, brute-force attacks, and potential exploitation. Publicly accessible instances can become targets for malicious actors, leading to data breaches or service disruptions. By restricting public IP addresses, organizations can enforce network segmentation, ensuring that EC2 instances are accessed securely via private networks, VPNs, or load balancers.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -738,7 +720,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "AWS Lambda functions allow running code without managing servers. Lambda supports resource-based policies that define who can invoke the function. If a Lambda function’s resource-based policy allows public access, it can be triggered by anyone on the internet, posing a significant security risk. To prevent unauthorized execution, Lambda functions should not be publicly accessible unless explicitly required and properly secured.",
"AdditionalInformation": "Publicly accessible Lambda functions can be abused for unauthorized execution, leading to service disruptions, data exfiltration, or increased AWS costs due to excessive invocations. Attackers could exploit misconfigured functions to perform malicious actions, extract sensitive data, or abuse compute resources. To reduce security risks, Lambda functions should only be accessible to specific IAM roles, AWS services, or trusted accounts, enforcing least privilege access and maintaining secure function execution.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -755,7 +737,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "AWS Lambda function URLs provide a built-in HTTPS endpoint that allows functions to be invoked directly via HTTP requests. By default, Lambda function URLs can be publicly accessible, meaning anyone on the internet can invoke the function if proper access controls are not enforced. To minimize security risks, Lambda function URLs should not be publicly accessible unless explicitly required and properly restricted.",
"AdditionalInformation": "Exposing Lambda function URLs to the public internet increases the risk of unauthorized access, API abuse, and potential exploitation. Attackers may invoke functions maliciously, leading to data leaks, unauthorized operations, increased costs, or denial-of-service (DoS) attacks. To enhance security, Lambda function URLs should be restricted to specific IAM roles, AWS services, or trusted clients, ensuring that only authorized users can trigger the function.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -789,7 +771,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "AWS DocumentDB manual cluster snapshots store backups of DocumentDB clusters, containing sensitive database information such as application data, configurations, and credentials. By default, snapshots are private, but they can be manually shared or made public, which poses a significant security risk. To prevent unauthorized access, DocumentDB manual cluster snapshots should never be publicly accessible unless explicitly required and properly secured.",
"AdditionalInformation": "Publicly accessible DocumentDB snapshots expose critical database information, increasing the risk of data breaches, unauthorized access, and compliance violations. Attackers could restore the snapshot in their own AWS account and gain full access to the database content. To protect sensitive data, DocumentDB snapshots should only be shared with specific AWS accounts or remain private, following least privilege principles and AWS security best practices.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -806,7 +788,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon EC2 Amazon Machine Images (AMIs) contain pre-configured operating system and application environments that can be used to launch new EC2 instances. By default, AMIs are private, but they can be manually shared or made public, which poses a security risk if sensitive data or proprietary configurations are exposed. To prevent unauthorized access and data leaks, EC2 AMIs should not be set as public unless explicitly required and properly secured.",
"AdditionalInformation": "Publicly accessible EC2 AMIs increase the risk of data exposure, unauthorized access, and compliance violations. Attackers could copy, analyze, or exploit public AMIs to extract sensitive credentials, misconfigurations, or proprietary software. Keeping AMIs private or shared only with specific AWS accounts ensures that only trusted users or teams can access and launch instances from them, reducing security risks and preventing unintended data exposure.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -823,7 +805,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon Elastic Block Store (EBS) snapshots are backups of EC2 volumes that may contain sensitive data, such as credentials, application configurations, and customer records. By default, EBS snapshots are private, but they can be manually shared or made public, allowing anyone to copy or restore them. To prevent unauthorized access and data exposure, public access to EBS snapshots should always be disabled.",
"AdditionalInformation": "Publicly accessible EBS snapshots pose a significant security risk, as attackers can restore and extract sensitive data if a snapshot is exposed. Misconfigured public snapshots have led to data breaches and compliance violations in the past. To mitigate this risk, EBS snapshots should be kept private or explicitly shared only with trusted AWS accounts, following least privilege principles to protect critical data and maintain security compliance.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -856,7 +838,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Amazon EC2 instances can run various services that communicate over common ports such as 22 (SSH), 3389 (RDP), 80 (HTTP), and 443 (HTTPS) (and more). If these ports are open to the internet, attackers can attempt unauthorized access, brute-force attacks, or exploit known vulnerabilities. To reduce security risks, EC2 instances should be configured so that common ports are not exposed to the public internet, unless explicitly required and properly secured.",
"AdditionalInformation": "Exposing common ports directly to the internet increases the attack surface and risks unauthorized access or system compromise. Attackers frequently scan for open ports to target misconfigured or unpatched services. To enhance security, access to EC2 common ports should be restricted using security groups, network ACLs, and VPC configurations, ensuring that only trusted networks and users can connect.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -887,7 +869,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Amazon EC2 security groups act as virtual firewalls, controlling inbound and outbound traffic to instances. If a security group allows ingress (incoming traffic) from the internet (0.0.0.0/0 or ::/0) to common ports such as 22 (SSH), 3389 (RDP), 80 (HTTP), or 443 (HTTPS) (and more), it creates a significant security risk. To minimize exposure, security groups should be configured to restrict ingress access to these ports to only trusted IP addresses or internal networks.",
"AdditionalInformation": "Allowing unrestricted inbound traffic to common ports increases the risk of brute-force attacks, unauthorized access, and exploitation of vulnerabilities. Attackers actively scan for open ports on public-facing EC2 instances to gain unauthorized control. To reduce security risks, ingress rules should be restricted using least privilege principles, IP whitelisting, VPN access, or bastion hosts, ensuring that only authorized users and networks can connect.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 5
}
]
},
@@ -904,7 +886,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Elastic Container Registry (ECR) repositories store and manage container images for deployment in AWS services. By default, ECR repositories are private, but they can be manually configured as public, allowing anyone to pull container images. To prevent unauthorized access and potential security risks, ECR repositories should not be set as public unless explicitly required and properly secured.",
"AdditionalInformation": "Publicly accessible ECR repositories expose container images to unauthorized users, increasing the risk of intellectual property theft, malware injection, or unauthorized use of containerized applications. Attackers could analyze public images for vulnerabilities or use misconfigured images for malicious purposes. To mitigate this risk, ECR repositories should remain private or be explicitly shared with trusted AWS accounts, ensuring secure access and compliance with best practices.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -921,7 +903,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Elastic Container Service (ECS) allows running containerized applications on AWS. By default, ECS services can be configured to assign public IP addresses to tasks or services, making them directly accessible from the internet. To enhance security, ECS services should be configured not to automatically assign public IPs, ensuring they remain within a private network and are accessed securely through internal load balancers, VPC peering, or private endpoints.",
"AdditionalInformation": "Automatically assigning public IPs to ECS services exposes them to the internet, increasing the risk of unauthorized access, brute-force attacks, and data breaches. Attackers could target publicly exposed containers, exploit vulnerabilities, or disrupt services. To mitigate these risks, ECS services should be restricted to private subnets and accessed through secure networking configurations, such as AWS PrivateLink, VPNs, or internal ALBs.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -938,7 +920,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Elastic Container Service (ECS) task sets manage multiple versions of a service during deployments. By default, ECS task sets can be configured to automatically assign public IP addresses, making them directly accessible from the internet. To enhance security, ECS task sets should be restricted to private subnets and should not automatically receive public IP addresses unless explicitly required and properly secured.",
"AdditionalInformation": "Automatically assigning public IPs to ECS task sets increases the risk of unauthorized access, cyberattacks, and data exposure. Publicly exposed tasks can be targeted by attackers, leading to service disruptions or exploitation of vulnerabilities. To mitigate these risks, ECS task sets should be restricted to private networking environments, accessed only through internal load balancers, VPC endpoints, or secure VPN connections, ensuring controlled and secure communication.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -955,7 +937,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon Elastic File System (EFS) provides scalable, shared file storage for AWS services. EFS mount targets allow instances to connect to the file system within a VPC. By default, EFS mount targets can be configured with public accessibility, making them reachable from the internet. To enhance security, EFS mount targets should be restricted to private networks and should not be publicly accessible unless explicitly required and properly secured.",
"AdditionalInformation": "Publicly accessible EFS mount targets expose stored data to unauthorized access, cyberattacks, and data breaches. Attackers could exploit misconfigured security groups or network ACLs to access or modify files. To reduce security risks, EFS mount targets should be restricted to private subnets, with access limited to trusted VPCs, security groups, and IAM roles, ensuring secure file storage and controlled access.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -972,7 +954,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon Elastic File System (EFS) provides shared storage that can be accessed by multiple EC2 instances and services within a VPC. EFS access is controlled through resource-based policies that define which clients can connect. If an EFS policy allows access to any client within the VPC, it increases the risk of unauthorized access and data exposure. To enhance security, EFS policies should be restricted to specific IAM roles, security groups, or trusted resources instead of granting broad access to all VPC clients.",
"AdditionalInformation": "Allowing any client within a VPC to access an EFS file system increases the risk of data leaks, accidental modifications, or unauthorized access by compromised instances or misconfigured services. To minimize exposure, EFS policies should enforce least privilege access, restricting permissions to specific instances, roles, or users that require access, ensuring secure file storage and controlled data access.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -989,7 +971,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "A Network Policy defines how network traffic is controlled and restricted between workloads within a cloud environment. Enforcing network policies ensures that only authorized communication occurs between services, reducing the risk of unauthorized access and lateral movement. It is recommended to enable Network Policies and configure them appropriately to enforce least privilege access and secure communication between workloads.",
"AdditionalInformation": "Without properly configured Network Policies, workloads may be exposed to unnecessary or unauthorized network traffic, increasing the risk of data leaks, exploitation, or lateral movement by attackers. By enabling and enforcing Network Policies, organizations can limit communication between workloads, ensuring that only approved and necessary network interactions are allowed, minimizing the attack surface and enhancing overall security.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1006,7 +988,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Amazon Elastic Kubernetes Service (EKS) clusters manage containerized applications and can be configured with either private or public access. If an EKS cluster is publicly accessible, it means that the Kubernetes API endpoint can be reached from the internet, increasing the risk of unauthorized access and attacks. To enhance security, EKS clusters should be restricted to private networks and accessed only through secure VPNs, VPC peering, or AWS PrivateLink.",
"AdditionalInformation": "Exposing an EKS cluster to the public internet increases the risk of brute-force attacks, credential theft, and unauthorized access to Kubernetes workloads. Attackers could exploit misconfigured RBAC policies or API vulnerabilities to gain control over the cluster. To reduce security risks, EKS clusters should be configured with private endpoints, ensuring that only trusted networks and IAM-authenticated users can manage Kubernetes resources.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -1023,7 +1005,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Amazon Elastic Kubernetes Service (EKS) clusters run workloads on worker nodes, which can be either public or private. If EKS clusters are created with public nodes, these nodes are assigned public IP addresses, making them accessible from the internet, which increases the risk of unauthorized access and potential attacks. To enhance security, EKS clusters should be created with private nodes that operate within private subnets and are only accessible through secured networking configurations such as VPNs, VPC peering, or AWS PrivateLink.",
"AdditionalInformation": "Using public nodes in EKS exposes Kubernetes workloads to the internet, increasing the risk of unauthorized access, lateral movement, and potential exploitation. Attackers can target misconfigured workloads, open services, or unsecured API endpoints. By creating EKS clusters with private nodes, organizations can restrict access, limit exposure to public threats, and enforce network segmentation, ensuring that workloads remain secure and isolated within a private VPC environment.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1040,7 +1022,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon ElastiCache provides in-memory caching services using Redis and Memcached. By default, ElastiCache clusters can be deployed in either public or private subnets. If an ElastiCache cluster is placed in a public subnet, it becomes accessible from the internet, which significantly increases the risk of unauthorized access and data breaches. To enhance security, ElastiCache clusters should only be deployed in private subnets, ensuring restricted access within a VPC.",
"AdditionalInformation": "Deploying an ElastiCache cluster in a public subnet exposes it to external threats, such as unauthorized access, brute-force attacks, and potential data exfiltration. Attackers could exploit misconfigurations to access cached data or disrupt services. By restricting ElastiCache clusters to private subnets, organizations can limit access to trusted resources, enforce VPC security controls, and reduce the attack surface, ensuring secure and efficient caching operations.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1057,7 +1039,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Elastic Load Balancers (ELBs) distribute incoming traffic across multiple targets, such as EC2 instances, containers, and Lambda functions. By default, ELBs can be configured as either internet-facing or internal (private). If an ELB is publicly accessible, it exposes backend services to the internet, increasing the risk of unauthorized access and attacks. To enhance security, ELBs should be restricted to private networks unless explicitly required and properly secured.",
"AdditionalInformation": "Publicly accessible Elastic Load Balancers can serve as entry points for unauthorized traffic, brute-force attacks, and potential data breaches. Attackers may exploit misconfigured security groups, open ports, or exposed application endpoints behind the load balancer. To reduce security risks, ELBs should be configured as internal (private), allowing access only from trusted networks, VPNs, or specific VPCs, ensuring that backend services remain protected and isolated from external threats.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1074,7 +1056,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Elastic MapReduce (EMR) is a managed big data processing service that can access S3, EC2, and other AWS resources. The EMR Account Public Access Block setting helps prevent public access to EMR resources, such as data stored in S3 buckets. If this setting is not enabled, there is a risk that EMR-related data and configurations could be exposed to the public, leading to unauthorized access or data breaches. To enhance security, the Public Access Block should be enabled for the EMR account.",
"AdditionalInformation": "Allowing public access to EMR resources increases the risk of data leaks, unauthorized access, and compliance violations. Attackers could exploit misconfigured policies or publicly accessible S3 buckets to access sensitive data processed by EMR. Enabling EMR Account Public Access Block ensures that S3 data and other EMR-related resources cannot be accessed publicly, reducing exposure and maintaining strong access controls in AWS.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1091,7 +1073,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Elastic MapReduce (EMR) is a managed service for processing big data workloads using Apache Spark, Hadoop, and other frameworks. By default, EMR clusters can be configured with public or private access. If an EMR cluster is publicly accessible, it exposes data processing nodes and services to the internet, increasing the risk of unauthorized access and potential exploitation. To enhance security, EMR clusters should only be deployed in private subnets and restricted to trusted networks.",
"AdditionalInformation": "Publicly accessible EMR clusters increase the risk of data breaches, unauthorized access, and attacks on running workloads. Malicious actors could exploit misconfigured security groups, open ports, or weak authentication settings to compromise the cluster. To reduce exposure, EMR clusters should be placed in private subnets, restricted using VPC security controls, IAM permissions, and firewall rules, ensuring secure data processing and access management.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -1108,7 +1090,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "AWS EventBridge is a serverless event bus service that enables communication between AWS services, third-party applications, and custom event sources. By default, EventBridge event buses can be configured to allow events from any AWS account or external source. If an event bus is exposed to everyone, unauthorized entities could send events to your environment, potentially leading to security risks, data injection attacks, or service disruptions. To enhance security, event buses should be restricted to specific AWS accounts, services, or trusted IAM roles.",
"AdditionalInformation": "Allowing unrestricted access to an EventBridge event bus increases the risk of malicious event injection, unauthorized access, and data manipulation. Attackers could flood the event bus with malicious events, leading to unexpected behavior, security breaches, or excessive AWS costs. To reduce exposure, event buses should be secured using IAM policies and resource-based permissions, ensuring that only trusted AWS services and accounts can send or receive events.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1125,7 +1107,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon S3 Glacier provides low-cost, long-term storage for archival data. Glacier vaults can be configured with resource-based policies that control access. If a Glacier vault policy allows access to everyone, unauthorized users could retrieve or delete archived data, leading to data exposure or loss. To enhance security, Glacier vault policies should be restricted to specific AWS accounts, IAM roles, or trusted entities, ensuring only authorized users can access or manage archived data.",
"AdditionalInformation": "Allowing public access to S3 Glacier vaults poses a significant security risk, increasing the chance of data breaches, unauthorized deletions, or compliance violations. Attackers could restore and download sensitive archived data if the vault is misconfigured. To prevent unauthorized access, Glacier vaults should have strict access controls, using IAM policies, encryption, and resource-based permissions, ensuring that only trusted users and systems can interact with archived data.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -1142,7 +1124,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "AWS Glue Data Catalog is a centralized metadata repository used to store and manage schema information for data lakes and analytics workflows. By default, Glue Data Catalogs can be configured to allow public access, which poses a significant security risk if sensitive metadata is exposed. To enhance security, Glue Data Catalogs should be restricted to specific AWS accounts, IAM roles, or trusted services, ensuring that only authorized users can access or modify catalog information.",
"AdditionalInformation": "Allowing public access to Glue Data Catalogs increases the risk of unauthorized access, data leaks, and compliance violations. Attackers could gain insights into an organization’s data structure or modify catalog entries, leading to potential data corruption or unauthorized data exposure. To reduce security risks, Glue Data Catalogs should be secured using IAM policies, resource-based permissions, and AWS Lake Formation, ensuring that only trusted accounts and services can interact with metadata.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -1159,7 +1141,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Managed Streaming for Apache Kafka (MSK) allows organizations to build and manage real-time data streaming applications. If a Kafka cluster is publicly accessible, it exposes data streams, configurations, and messaging topics to the internet, increasing the risk of unauthorized access, data interception, and service disruptions. To enhance security, Kafka clusters should be restricted to private networks, ensuring that only trusted AWS resources, VPCs, and IAM-authenticated users can interact with the service.",
"AdditionalInformation": "Exposing a Kafka cluster to the public internet creates significant security risks, including unauthorized data ingestion, data leaks, and message tampering. Attackers could consume, modify, or inject malicious data into Kafka topics, disrupting real-time analytics and application workflows. To mitigate these risks, Kafka clusters should be deployed in private subnets, with access restricted via VPC security groups, IAM policies, and AWS PrivateLink, ensuring secure and controlled data streaming.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1176,7 +1158,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "AWS Key Management Service (KMS) provides secure encryption key management for data encryption and cryptographic operations. If KMS keys are exposed to the internet, unauthorized entities could potentially use, modify, or compromise encryption keys, leading to data breaches and security vulnerabilities. To enhance security, KMS keys should be restricted to trusted AWS accounts, IAM roles, and specific AWS services, ensuring that only authorized users and systems can access and manage them.",
"AdditionalInformation": "Exposing KMS keys to the public poses a critical security risk, as compromised keys can lead to unauthorized data decryption, loss of data integrity, and compliance violations. Attackers could potentially use public KMS keys to encrypt or decrypt sensitive data, undermining security controls. To prevent unauthorized access, KMS key policies should enforce strict access control using IAM permissions, VPC endpoint policies, and AWS PrivateLink, ensuring that encryption operations remain fully secured and isolated from the public internet.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1193,7 +1175,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "AWS Lightsail Databases provide managed database solutions for applications. If a Lightsail database is set to public mode, it is directly accessible from the internet, increasing the risk of unauthorized access and data breaches. To enhance security, Lightsail databases should be configured in private mode, ensuring they are accessible only from trusted instances, private networks, or VPN connections.",
"AdditionalInformation": "Publicly accessible Lightsail databases expose sensitive data to unauthorized access, brute-force attacks, and potential exploitation. Attackers can attempt to compromise credentials, inject malicious queries, or exfiltrate data. To mitigate these risks, Lightsail databases should remain private, with access controlled through firewalls, IAM authentication, and private networking configurations, ensuring secure database connectivity and data protection.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1210,7 +1192,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "AWS Lightsail instances provide a simple way to deploy and manage cloud-based virtual machines. If a Lightsail instance is publicly accessible, it can be directly reached from the internet, increasing the risk of unauthorized access, attacks, and data breaches. To enhance security, Lightsail instances should be restricted to private access, ensuring they are reachable only through secure connections, such as VPNs, bastion hosts, or private networking configurations.",
"AdditionalInformation": "Publicly exposed Lightsail instances create a larger attack surface, making them vulnerable to brute-force attacks, unauthorized access, and exploitation of software vulnerabilities. Attackers could compromise credentials, gain control over the instance, or disrupt services. To mitigate these risks, Lightsail instances should be secured using firewalls, private IP configurations, security group restrictions, and IAM-based access controls, ensuring that only trusted users and networks can connect.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -1227,7 +1209,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "AWS MQ brokers manage message queues for applications, facilitating secure and reliable communication between distributed services. If an MQ broker is publicly accessible, it can be reached from the internet, increasing the risk of unauthorized access, message interception, and data breaches. To enhance security, MQ brokers should be restricted to private networks, ensuring they are accessible only from trusted VPCs, private endpoints, or secure VPN connections.",
"AdditionalInformation": "Publicly exposed MQ brokers pose a significant security risk, as attackers can attempt to intercept messages, inject malicious data, or disrupt message delivery. This could lead to data manipulation, unauthorized access to sensitive information, and system-wide outages. To mitigate these risks, MQ brokers should be configured within private subnets, with access restricted using security groups, IAM policies, and VPC endpoint controls, ensuring secure and controlled message queue operations.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -1244,7 +1226,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon NeptuneDB manual cluster snapshots store backups of graph database clusters, containing sensitive data such as relationships, metadata, and application configurations. By default, NeptuneDB snapshots are private, but they can be manually shared or made public, which can expose critical database information. To enhance security, NeptuneDB manual snapshots should never be publicly accessible, ensuring they are only shared with trusted AWS accounts when necessary.",
"AdditionalInformation": "Publicly accessible NeptuneDB snapshots pose a significant security risk, as attackers could restore the snapshot in their own AWS account and gain full access to the database contents. This could lead to data leaks, compliance violations, and unauthorized access to sensitive business information. To prevent data exposure, NeptuneDB snapshots should be restricted using IAM policies and AWS resource-based permissions, ensuring that only authorized users and services can access and manage database backups securely.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -1261,7 +1243,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Neptune clusters provide a fully managed graph database service designed for applications requiring complex relationship queries. By default, Neptune clusters can be deployed in either public or private subnets. If a Neptune cluster is placed in a public subnet, it becomes accessible from the internet, significantly increasing the risk of unauthorized access and data breaches. To enhance security, Neptune clusters should only be deployed in private subnets, ensuring access is restricted to trusted VPCs, IAM roles, and security group configurations.",
"AdditionalInformation": "Deploying a Neptune cluster in a public subnet exposes the database endpoints to external threats, making them vulnerable to brute-force attacks, unauthorized queries, and data exfiltration. Attackers could exploit misconfigurations to gain access to sensitive graph data, leading to potential compliance violations and security incidents. To reduce exposure, Neptune clusters should be restricted to private subnets, with access controlled through VPC security groups, IAM authentication, and private endpoint configurations, ensuring secure database operations and protected data access.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1295,7 +1277,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon S3 buckets store and manage data, files, and application assets. Bucket policies control access permissions, and if an S3 bucket has a policy that allows WRITE access to everyone, unauthorized users can upload, modify, or delete objects, leading to data tampering, security breaches, or service disruptions. To enhance security, S3 bucket policies should be restricted to specific AWS accounts, IAM roles, or trusted services, ensuring only authorized users have WRITE permissions.",
"AdditionalInformation": "Allowing unrestricted WRITE access to an S3 bucket increases the risk of unauthorized modifications, data injection attacks, and accidental data loss. Attackers could upload malicious files, delete critical data, or overwrite important configurations. To prevent unauthorized changes, S3 bucket policies should explicitly deny public WRITE access, enforce least privilege access control, and use AWS Block Public Access settings to ensure secure and controlled data storage.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1312,7 +1294,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon S3 buckets store sensitive data and should have restricted access permissions. If an S3 bucket is listable by Everyone or Any AWS customer, unauthorized users can enumerate the objects within the bucket, potentially exposing sensitive information such as filenames, metadata, or even public datasets. To enhance security, S3 bucket permissions should be configured to restrict LIST access to only authorized IAM roles, AWS accounts, or specific services.",
"AdditionalInformation": "Allowing public or AWS-wide LIST access increases the risk of data enumeration, unauthorized access, and information leaks. Attackers or unauthorized users could identify and analyze stored files, extract metadata, or infer sensitive data. To mitigate this risk, S3 bucket policies should explicitly deny public LIST access, enforce least privilege permissions, and use AWS Block Public Access settings to prevent unintended data exposure.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1329,7 +1311,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Amazon S3 buckets should have strict access controls to prevent unauthorized modifications. If an S3 bucket is writable by Everyone or Any AWS customer, it allows unauthorized users to upload, modify, or delete objects, leading to data corruption, security breaches, and compliance risks. To enhance security, S3 bucket permissions should be restricted to trusted IAM roles, AWS accounts, or specific services.",
"AdditionalInformation": "Allowing public or AWS-wide WRITE access creates a significant security risk, as attackers can inject malicious files, overwrite critical data, or delete essential objects. This could lead to data loss, malware distribution, or unauthorized system modifications. To prevent unauthorized changes, S3 bucket policies should explicitly deny public WRITE access, enforce least privilege access, and use AWS Block Public Access settings to secure data integrity and prevent unauthorized modifications.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1346,7 +1328,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon SageMaker Notebook instances provide an interactive environment for machine learning development and data analysis. By default, these instances can be configured with direct internet access, which increases the risk of unauthorized access, data leaks, and exposure to malicious external threats. To enhance security, SageMaker Notebook instances should be restricted to private networks, ensuring they are accessed only through secure VPC connections, IAM authentication, or VPNs.",
"AdditionalInformation": "Allowing direct internet access to SageMaker Notebook instances poses a significant security risk, as attackers could exploit misconfigurations, exfiltrate data, or inject malicious code. Publicly accessible notebooks can lead to data breaches, intellectual property theft, or compromised model training workflows. To mitigate these risks, SageMaker Notebook instances should be configured within private subnets, with internet access disabled, and restricted using security groups, IAM policies, and VPC endpoint configurations to ensure secure and controlled machine learning operations.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1363,7 +1345,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "AWS Secrets Manager is used to securely store and manage sensitive information, such as API keys, database credentials, and encryption keys. By default, Secrets Manager secrets should be restricted to authorized IAM roles and AWS services. If a secret is publicly accessible, it can be exposed to unauthorized users, leading to data leaks, security breaches, and potential exploitation of sensitive credentials. To enhance security, Secrets Manager secrets should be strictly controlled using IAM policies and resource-based permissions.",
"AdditionalInformation": "Allowing public access to Secrets Manager secrets creates a critical security vulnerability, as attackers could retrieve, misuse, or exfiltrate sensitive information. Compromised secrets could lead to unauthorized access to databases, applications, or cloud services, resulting in data breaches, financial loss, or compliance violations. To mitigate this risk, Secrets Manager secrets should be restricted using least privilege IAM permissions, encrypted with AWS KMS, and accessed only by trusted AWS services and roles, ensuring secure and controlled secret management.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -1380,7 +1362,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Simple Email Service (SES) identities (such as email addresses or domains) are used to send and receive emails through AWS. By default, SES identities should be restricted to authorized AWS accounts and IAM roles. If an SES identity is publicly accessible, unauthorized users could send emails using the identity, leading to email spoofing, phishing attacks, or misuse of the domain for malicious purposes. To enhance security, SES identities should be properly restricted using IAM policies and verified senders.",
"AdditionalInformation": "Allowing public access to SES identities creates a security and reputational risk, as attackers could impersonate the identity, send spam, or launch phishing campaigns. This could lead to domain blacklisting, compliance violations, and damage to the organization’s email reputation. To mitigate these risks, SES identities should be restricted to trusted AWS accounts and IAM roles, ensuring that only authorized services and users can send emails, protecting the integrity and security of email communications.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -1397,7 +1379,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Amazon Simple Queue Service (SQS) queues enable asynchronous message processing between distributed systems. By default, SQS queues should be restricted to authorized AWS accounts and IAM roles. If an SQS queue has a public policy, it allows anyone on the internet to send, receive, or delete messages, leading to data leaks, unauthorized message injection, and potential denial-of-service (DoS) attacks. To enhance security, SQS queue policies should be configured to allow access only to trusted AWS accounts, IAM roles, or specific AWS services.",
"AdditionalInformation": "Publicly accessible SQS queues pose a significant security risk, as attackers could inject malicious messages, disrupt processing workflows, or delete critical messages, leading to system failures and data integrity issues. To prevent unauthorized access, SQS policies should explicitly deny public access, enforce least privilege access control, and use IAM policies and VPC endpoint restrictions to ensure secure and controlled messaging operations.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 5
}
]
},
@@ -1414,7 +1396,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "AWS Systems Manager (SSM) Documents define configuration, automation, and maintenance tasks for AWS resources. By default, SSM documents should be restricted to specific AWS accounts, IAM roles, or AWS services. If an SSM document is set as public, unauthorized users could access, modify, or execute automation tasks on AWS infrastructure, leading to misconfigurations, security breaches, or unintended system modifications. To enhance security, SSM documents should be kept private and assigned only to trusted AWS entities.",
"AdditionalInformation": "Publicly accessible SSM documents pose a significant security risk, as attackers could execute malicious commands, modify system configurations, or disrupt AWS operations. This could lead to unauthorized access, data leaks, compliance violations, or system downtime. To prevent security threats, SSM documents should explicitly deny public access, enforce least privilege permissions, and use IAM policies and resource-based access controls to ensure only trusted users and systems can manage AWS resources.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1431,7 +1413,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "AWS CloudTrail is a service that records and monitors AWS API calls across an account, providing detailed logs of who performed what action, when, and from where. CloudTrail captures API activity from the AWS Management Console, SDKs, CLI, and AWS services such as CloudFormation. The logs include key details such as the identity of the API caller, timestamp, source IP address, request parameters, and response elements.",
"AdditionalInformation": "CloudTrail enhances security, auditing, and compliance by providing a complete history of API activities in an AWS account. Enabling a multi-region trail ensures: Detection of unauthorized activity in rarely used AWS regions. Global Service Logging is automatically enabled, capturing API calls from global services such as IAM and AWS Organizations. Tracking of all management events, ensuring that both read and write operations across AWS resources are recorded for improved security monitoring and compliance.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1448,7 +1430,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "AWS CloudTrail log file validation generates digitally signed digest files containing cryptographic hashes of each log file stored in Amazon S3. These digest files allow users to verify whether logs have been altered, deleted, or remain unchanged after being delivered by CloudTrail. Enabling log file validation ensures data integrity and auditability for security and compliance purposes.",
"AdditionalInformation": "Enabling log file validation enhances security by ensuring the integrity of CloudTrail logs, preventing tampering or unauthorized modifications. This helps: Detect log file alterations, ensuring logs remain trustworthy for audits and investigations. Improve compliance with frameworks that require log integrity, such as PCI DSS, SOC 2, and ISO 27001. Strengthen forensic capabilities, allowing security teams to verify log authenticity in case of a security incident.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1465,7 +1447,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "AWS Config is a service that continuously monitors, records, and evaluates configuration changes in AWS resources within an account. It tracks configuration items, relationships between resources, and changes over time, delivering logs for security analysis, change management, and compliance auditing. To ensure comprehensive monitoring, AWS Config should be enabled in all regions.",
"AdditionalInformation": "Enabling AWS Config in all regions improves security, visibility, and compliance by: Tracking resource changes, allowing for quick identification of misconfigurations. Supporting security audits and forensic investigations by maintaining a historical record of configurations.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1482,7 +1464,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "Server access logging provides detailed records of requests made to an S3 bucket, including request type, accessed resources, timestamp, and requester details. Enabling server access logging on the CloudTrail S3 bucket ensures that all interactions with CloudTrail logs are recorded, improving security visibility and auditability",
"AdditionalInformation": "Enabling server access logging on CloudTrail S3 buckets enhances security monitoring, incident response, and compliance by: Capturing all events affecting CloudTrail logs, helping detect unauthorized access or modifications. Providing an audit trail for forensic investigations and compliance reporting. Enhancing security workflows by storing access logs in a separate, dedicated logging bucket for improved log integrity and analysis.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1499,7 +1481,7 @@
"SubSection": "4.2 At-Rest",
"AttributeDescription": "AWS CloudTrail records API activity across an AWS account, and its logs contain sensitive security and operational data. AWS Key Management Service (KMS) provides encryption key management using customer-managed keys (CMKs) and Hardware Security Modules (HSMs) to ensure secure key storage and usage. CloudTrail logs can be encrypted using Server-Side Encryption (SSE) with KMS (SSE-KMS) to add an extra layer of protection and access control",
"AdditionalInformation": "Using SSE-KMS encryption for CloudTrail logs enhances security by adding an extra layer of access control. This ensures that only authorized users with both S3 read permissions and KMS decryption rights can access log data, protecting sensitive security information from unauthorized access or tampering. It also helps maintain compliance with security and regulatory standards by enforcing strict encryption controls.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1516,7 +1498,7 @@
"SubSection": "3.2 Retention",
"AttributeDescription": "AWS Key Management Service (KMS) allows users to manage encryption keys securely. Key rotation enables the automatic replacement of the backing key (the cryptographic material tied to a customer-managed key (CMK)), ensuring continuous security without disrupting access to previously encrypted data. AWS automatically retains previous backing keys to allow seamless decryption of older data while using a newly generated key for encryption. It is recommended to enable key rotation for symmetric CMKs, as asymmetric keys do not support this feature.",
"AdditionalInformation": "Regularly rotating encryption keys minimizes the risk associated with key compromise by ensuring that newly encrypted data is protected with a fresh key, reducing the potential impact of an exposed key. Since AWS KMS retains prior backing keys for seamless decryption, rotation does not disrupt access to previously encrypted data. Implementing key rotation enhances security by limiting the exposure window of any single encryption key and aligning with best practices for cryptographic hygiene.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1533,7 +1515,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "VPC Flow Logs capture and record IP traffic information for network interfaces within a VPC, allowing administrators to monitor and analyze network activity. These logs are stored in Amazon CloudWatch Logs for retrieval and analysis. It is recommended to enable VPC Flow Logs for rejected packets to track unauthorized access attempts, misconfigurations, or potential security threats within the VPC.",
"AdditionalInformation": "Enabling VPC Flow Logs for rejected traffic enhances network visibility and security monitoring by detecting suspicious activity, failed connection attempts, and potential threats. These logs help identify anomalous traffic patterns, troubleshoot connectivity issues, and support incident response workflows, improving overall security posture.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1584,7 +1566,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of API calls can be achieved by forwarding CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. By configuring metric filters and alarms, organizations can automatically detect and respond to unauthorized API calls, improving security visibility. It is recommended to establish a metric filter and alarm for unauthorized API calls to enhance threat detection and incident response.",
"AdditionalInformation": "Monitoring unauthorized API calls helps identify potential security incidents faster, reducing the time attackers have to exploit vulnerabilities. CloudWatch provides real-time monitoring and alerting, while SIEM solutions offer centralized security event analysis. Detecting unauthorized API calls early allows organizations to take immediate action, investigate potential threats, and strengthen overall AWS security posture.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1601,7 +1583,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by directing CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. By setting up metric filters and alarms, organizations can detect and respond to security risks effectively. It is recommended to establish a metric filter and alarm for AWS console logins that are not protected by multi-factor authentication (MFA) to enhance security monitoring.",
"AdditionalInformation": "Monitoring console logins without MFA improves visibility into accounts that lack strong authentication controls. Accounts without MFA are more vulnerable to credential theft, brute-force attacks, and unauthorized access. By detecting these login attempts in real-time, organizations can identify security gaps, enforce MFA policies, and reduce the risk of account compromise.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1618,7 +1600,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be achieved by directing CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. Setting up metric filters and alarms helps detect potential security threats. It is recommended to establish a metric filter and alarm for root account login attempts to identify unauthorized access or improper use of the highly privileged root account.",
"AdditionalInformation": "Monitoring root account logins enhances visibility into the usage of the most privileged AWS account, which should be used only in exceptional cases. Frequent or unauthorized root logins increase security risks by exposing critical administrative controls. Detecting root login attempts in real time enables organizations to identify potential security incidents, enforce least privilege principles, and limit unnecessary use of the root account.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -1635,7 +1617,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by directing CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. By configuring metric filters and alarms, organizations can detect critical security events. It is recommended to establish a metric filter and alarm for changes to Identity and Access Management (IAM) policies to track modifications that could affect authentication and authorization controls.",
"AdditionalInformation": "Monitoring IAM policy changes helps ensure that access controls remain secure and intact. Unauthorized or unintended modifications to IAM policies can lead to privilege escalation, misconfigurations, and security breaches. Detecting these changes in real-time allows organizations to respond quickly to potential threats, enforce least privilege principles, and maintain a strong security posture.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1652,7 +1634,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by directing CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. By configuring metric filters and alarms, organizations can track critical security events. It is recommended to establish a metric filter and alarm to detect changes to CloudTrail configurations, ensuring that logging remains active and tamper-proof.",
"AdditionalInformation": "Monitoring CloudTrail configuration changes helps maintain continuous visibility into AWS account activity. Unauthorized modifications to CloudTrail settings could disable or alter logging, potentially allowing malicious activity to go undetected. Detecting these changes in real time enables organizations to quickly respond to threats, enforce security best practices, and ensure compliance with auditing requirements.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1669,7 +1651,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by directing CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. By setting up metric filters and alarms, organizations can detect potential security threats. It is recommended to establish a metric filter and alarm for failed console authentication attempts to identify potential unauthorized access attempts or brute-force attacks.",
"AdditionalInformation": "Monitoring failed console logins helps detect brute-force attempts and unauthorized access attempts early. Repeated failed authentication attempts can indicate malicious activity, and tracking them allows security teams to identify suspicious IP addresses, correlate with other security events, and take proactive measures to protect AWS accounts.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1686,7 +1668,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be achieved by forwarding CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. By configuring metric filters and alarms, organizations can detect security-critical changes. It is recommended to set up a metric filter and alarm for customer-managed KMS keys (CMKs) that are disabled or scheduled for deletion to prevent unintended encryption key loss.",
"AdditionalInformation": "Disabling or deleting a customer-managed CMK can render encrypted data permanently inaccessible, leading to data loss and service disruptions. Monitoring CMK state changes helps detect unauthorized or accidental modifications, ensuring encryption keys remain available and aligned with security policies. Detecting such changes in real time allows organizations to prevent data loss, maintain compliance, and take corrective action if needed.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1703,7 +1685,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by forwarding CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. By configuring metric filters and alarms, organizations can track critical security-related changes. It is recommended to set up a metric filter and alarm for modifications to S3 bucket policies to detect potential misconfigurations or unauthorized access changes.",
"AdditionalInformation": "Monitoring S3 bucket policy changes helps detect and respond to overly permissive configurations that could expose sensitive data. Unauthorized or accidental modifications may grant public access or excessive permissions, increasing the risk of data breaches and compliance violations. Real-time alerts allow security teams to quickly identify, investigate, and correct risky policy changes, reducing exposure and strengthening data security.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1720,7 +1702,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by directing CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. By configuring metric filters and alarms, organizations can detect critical configuration changes. It is recommended to establish a metric filter and alarm for modifications to AWS Config’s configurations to ensure continuous monitoring and compliance.",
"AdditionalInformation": "Monitoring AWS Config configuration changes helps maintain visibility and control over resource configurations. Unauthorized or accidental modifications to AWS Config settings may result in gaps in security monitoring, misconfigurations going undetected, and compliance violations. Real-time alerts allow security teams to quickly detect, investigate, and respond to changes, ensuring the integrity of configuration tracking across the AWS environment.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1754,7 +1736,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by forwarding CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. Network Access Control Lists (NACLs) act as stateless packet filters that control inbound and outbound traffic for subnets within a VPC. It is recommended to establish a metric filter and alarm to detect changes to NACLs to prevent unauthorized modifications that could compromise network security.",
"AdditionalInformation": "Monitoring NACL changes helps ensure that network traffic controls remain properly configured and that AWS resources are not unintentionally exposed. Unauthorized or accidental modifications to NACL rules can lead to misconfigured security policies, increased attack surfaces, and potential data breaches. Real-time alerts enable security teams to detect, investigate, and respond to NACL modifications quickly, maintaining strong network security controls.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1771,7 +1753,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by forwarding CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. Network gateways serve as the primary route for traffic entering and leaving a VPC, facilitating communication with external networks. It is recommended to establish a metric filter and alarm for changes to network gateways to ensure that network traffic is securely routed through controlled paths.",
"AdditionalInformation": "Monitoring network gateway changes helps maintain secure ingress and egress traffic flows within a VPC. Unauthorized or accidental modifications to network gateways can disrupt connectivity, introduce security vulnerabilities, or expose AWS resources to external threats. Real-time alerts enable security teams to detect, investigate, and respond to changes quickly, ensuring that all traffic follows a controlled and secure routing policy.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1788,7 +1770,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be achieved by forwarding CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. Route tables determine how network traffic is directed between subnets and network gateways within a VPC. It is recommended to establish a metric filter and alarm for changes to route tables to detect unauthorized or accidental modifications that could impact network security and connectivity.",
"AdditionalInformation": "Monitoring route table changes ensures that VPC traffic follows the intended and secure routing paths. Unauthorized modifications can result in misrouted traffic, exposure of sensitive resources, or connectivity disruptions. Real-time alerts enable security teams to detect, investigate, and respond to route table changes promptly, preventing potential security risks and maintaining a controlled and secure network environment.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1805,7 +1787,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be implemented by forwarding CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. AWS accounts can contain multiple Virtual Private Clouds (VPCs), and VPC peering connections allow network traffic to flow between them. It is recommended to establish a metric filter and alarm for changes made to VPC configurations to detect unauthorized modifications that could impact network security and connectivity.",
"AdditionalInformation": "Monitoring VPC configuration changes helps ensure network integrity, security, and proper traffic flow within AWS environments. Unauthorized or accidental modifications can result in misconfigured routing, unintended internet exposure, or connectivity disruptions between resources. Real-time alerts enable security teams to detect, investigate, and respond to VPC changes promptly, preventing security risks and ensuring consistent network accessibility and isolation.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1822,7 +1804,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Real-time monitoring of AWS API calls can be achieved by forwarding CloudTrail logs to Amazon CloudWatch Logs or an external Security Information and Event Management (SIEM) system. AWS Organizations allows centralized management of multiple AWS accounts, and modifications to its configuration can significantly impact access control, account governance, and security policies. It is recommended to establish a metric filter and alarm for changes made to AWS Organizations in the master AWS account to detect unauthorized or unintended modifications.",
"AdditionalInformation": "Monitoring AWS Organizations configuration changes helps prevent unwanted, accidental, or malicious modifications that could lead to unauthorized access, policy misconfigurations, or security breaches. Detecting changes in real time ensures that unexpected modifications can be investigated and remediated quickly, reducing the risk of compromised governance structures and ensuring compliance with organizational security policies.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1856,7 +1838,7 @@
"SubSection": "3.2 Retention",
"AttributeDescription": "AWS CloudWatch Log Groups store logs from various AWS services and applications, enabling monitoring, debugging, and security auditing. By default, CloudWatch logs are retained indefinitely, which can lead to unnecessary data storage costs and compliance risks. To manage log lifecycle effectively, it is recommended to set a retention policy for CloudWatch Log Groups, ensuring logs are retained only for a specific number of days based on operational and compliance requirements.",
"AdditionalInformation": "Setting a retention policy for CloudWatch logs helps balance cost management, compliance, and security. Retaining logs for too long increases storage costs and potential exposure to sensitive data, while keeping them for too short a duration can limit forensic investigations and compliance reporting. By defining a specific retention period, organizations can ensure logs are available for troubleshooting and audits while adhering to data retention best practices and regulatory requirements.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
}
diff --git a/prowler/compliance/azure/prowler_threatscore_azure.json b/prowler/compliance/azure/prowler_threatscore_azure.json
index db479fb616..12ad818a27 100644
--- a/prowler/compliance/azure/prowler_threatscore_azure.json
+++ b/prowler/compliance/azure/prowler_threatscore_azure.json
@@ -68,7 +68,7 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "This recommendation ensures that users accessing the Windows Azure Service Management API (e.g., Azure PowerShell, Azure CLI, Azure Resource Manager API) are required to authenticate using multi-factor authentication (MFA) before accessing resources.",
"AdditionalInformation": "Administrative access to the Azure Service Management API should be secured with enhanced authentication measures to prevent unauthorized changes. Enforcing MFA helps mitigate the risk of credential compromise, privilege abuse, and unauthorized modifications to administrative settings. IMPORTANT: While exceptions for specific users or groups may be configured, they should be carefully tracked and periodically reviewed through an Access Review process. The policy should apply to all users by default, ensuring that only explicitly exempted accounts bypass MFA.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -85,7 +85,7 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "This recommendation ensures that users accessing Microsoft Admin Portals (such as Microsoft 365 Admin, Microsoft 365 Defender, Exchange Admin Center, and Azure Portal) must authenticate using multi-factor authentication (MFA) before logging in.",
"AdditionalInformation": "Microsoft Admin Portals provide privileged access to critical settings and resources, requiring enhanced security measures. Enforcing MFA reduces the risk of unauthorized access, credential compromise, and administrative abuse, preventing intruders from making unauthorized changes to administrative settings.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -102,7 +102,7 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "Ensure that privileged virtual machines do not allow logins from identities without multi-factor authentication (MFA) and that access is restricted to necessary permissions only. Unauthorized access can enable attackers to move laterally and misuse the virtual machine’s managed identity for further privilege escalation or unauthorized operations.",
"AdditionalInformation": "Requiring MFA for privileged VM access reduces the risk of credential compromise, lateral movement, and unauthorized access to cloud resources. Attackers can exploit valid accounts to access virtual machines and escalate privileges using the managed identity. Enforcing MFA and least privilege access helps mitigate these risks by preventing unauthorized logins and restricting administrative permissions to only what is necessary.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -119,7 +119,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "Restrict the ability to create new Microsoft Entra ID or Azure AD B2C tenants to administrators or appropriately delegated users.",
"AdditionalInformation": "Limiting tenant creation to authorized administrators prevents unauthorized users from creating new tenants, reducing the risk of uncontrolled environments, misconfigurations, and potential security gaps. This ensures that only approved users can establish and manage tenant resources.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -136,7 +136,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "To maintain security and operational efficiency, it is recommended to have a minimum of two and a maximum of four users assigned the Global Administrator role in Microsoft Entra ID. This ensures redundancy while minimizing the risk of excessive privileged access.",
"AdditionalInformation": "The Global Administrator role holds broad privileges across Microsoft Entra ID services and should not be used for daily tasks. Administrators should have separate accounts for regular activities and privileged actions. Limiting the number of Global Administrators reduces the risk of unauthorized access, human error, and privilege misuse, while ensuring at least two administrators are available to prevent disruptions in case of unavailability. This approach aligns with the principle of least privilege and strengthens the security posture of an Azure tenant.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -153,7 +153,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "Restrict guest user permissions to prevent unauthorized access to directory resources and administrative roles.",
"AdditionalInformation": "Limiting guest access ensures that guest accounts cannot enumerate users, groups, or directory objects and prevents them from being assigned administrative roles. Guest access has three levels of restriction, with the most secure option being: “Guest user access is restricted to their own directory object” (most restrictive). This setting minimizes the risk of unauthorized access and ensures guests only interact with their assigned resources.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -170,7 +170,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "Require administrators to provide consent before applications can access Microsoft Entra ID resources, preventing unauthorized or malicious app integrations.",
"AdditionalInformation": "Allowing users to grant application permissions without restrictions increases the risk of data exfiltration and privilege abuse by malicious applications. Restricting app consent to administrators ensures that only verified and approved applications gain access, protecting sensitive data and privileged accounts from unauthorized use.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -187,7 +187,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "Allow users to grant consent only for selected permissions when the request comes from a verified publisher, ensuring tighter control over third-party application access.",
"AdditionalInformation": "Restricting app consent to verified publishers helps mitigate the risk of unauthorized data access and privilege abuse. Malicious applications may attempt to exploit user-granted permissions, so ensuring only trusted, verified applications can request access enhances security while maintaining flexibility for approved integrations.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -204,7 +204,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "Microsoft Entra ID Conditional Access allows organizations to define Named Locations and categorize them as trusted or untrusted. These locations can be based on geographical regions, specific IP addresses, or IP ranges to enhance access control policies.",
"AdditionalInformation": "Defining trusted IP addresses or ranges enables organizations to enforce Conditional Access policies based on user location. Users authenticating from trusted locations may receive fewer access restrictions, while those from untrusted sources can be subject to stricter security controls, reducing the risk of unauthorized access.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -221,7 +221,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "Limit the ability to create security groups to administrators only, preventing unauthorized users from managing group memberships.",
"AdditionalInformation": "Allowing all users to create and manage security groups can lead to uncontrolled access, misconfigurations, and potential security risks. Unless business requirements justify broader delegation, restricting security group creation to administrators ensures that group permissions and memberships are properly managed, reducing the risk of unauthorized access.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -238,7 +238,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "Restrict the ability to register third-party applications to administrators or appropriately delegated users, ensuring better security control over app integrations.",
"AdditionalInformation": "Allowing unrestricted application registration can expose Microsoft Entra ID data to security risks. Requiring administrator approval ensures that custom-developed applications undergo a formal security review before being granted access. Organizations may delegate permissions to developers or high-request users as needed, but policies should be reviewed to align with security best practices and operational needs.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -255,7 +255,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "Limit the ability to send invitations to users with specific administrative roles, preventing unauthorized guest access to cloud resources.",
"AdditionalInformation": "Restricting guest invitations to designated administrators helps enforce “Need to Know” permissions, reducing the risk of unintended data exposure. By default, anyone in the organization—including guests and non-admins—can invite external users, which can lead to unauthorized access. Restricting this capability ensures that only approved accounts can extend access to the tenant, strengthening security and access control.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -272,7 +272,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "Limit Microsoft 365 group creation to administrators only, ensuring that group management remains under centralized control.",
"AdditionalInformation": "Restricting group creation to administrators prevents unauthorized or unnecessary group creation, ensuring that only appropriate groups are created and managed. This reduces the risk of misconfigurations, access issues, and uncontrolled resource sharing within the organization.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -289,7 +289,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Regularly review Network Security Groups (NSGs) for misconfigured or overly permissive rules, especially those exposing ports and protocols to the public internet. Any unnecessary exposure should be restricted to reduce security risks.",
"AdditionalInformation": "Exposing Remote Desktop Protocol (RDP) or other critical services to the internet increases the risk of brute-force attacks, which could lead to unauthorized access to Azure Virtual Machines. Compromised VMs can be used to launch attacks on other networked resources, both inside and outside Azure. Periodic NSG evaluations help minimize attack surfaces and ensure that only explicitly required access is permitted.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -306,7 +306,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Regularly review Network Security Groups (NSGs) for misconfigured or overly permissive rules, particularly those exposing SSH (port 22) or other critical services to the internet. Any unnecessary exposure should be restricted to reduce security risks.",
"AdditionalInformation": "Exposing SSH over the internet increases the risk of brute-force attacks, allowing attackers to gain unauthorized access to Azure Virtual Machines. Once compromised, a VM can be used as a pivot point to attack other machines within the Azure Virtual Network or even external systems. Periodic NSG evaluations help minimize attack surfaces and ensure that only explicitly required access is permitted.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -323,7 +323,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Regularly review Network Security Groups (NSGs) for misconfigured or overly permissive UDP rules, especially those exposing UDP-based services to the internet. Any unnecessary exposure should be restricted to prevent security risks.",
"AdditionalInformation": "Exposing UDP services to the internet increases the risk of Distributed Denial-of-Service (DDoS) amplification attacks, where attackers can reflect and amplify spoofed traffic from Azure Virtual Machines. Commonly exploited UDP services include DNS, NTP, SSDP, SNMP, and CLDAP, which can be used to disrupt services or launch attacks against other networked systems inside and outside Azure. Regular NSG evaluations help minimize attack surfaces and prevent VMs from being leveraged in DDoS attacks.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -340,7 +340,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Regularly review Network Security Groups (NSGs) for misconfigured or overly permissive HTTP(S) rules, ensuring that exposure to the internet is necessary and narrowly configured. Restrict access where it is not explicitly required.",
"AdditionalInformation": "Exposing HTTP(S) services to the internet increases the risk of brute-force attacks, credential stuffing, and exploitation of vulnerabilities in web applications or services. If compromised, an attacker can use the affected resource as a pivot point to escalate privileges, move laterally, and compromise other Azure resources within the tenant. Periodic NSG evaluations help reduce attack surfaces and enforce least privilege access.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -357,7 +357,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Enable Azure Bastion to securely access Azure Virtual Machines (VMs) over the internet without exposing RDP (3389/TCP) or SSH (22/TCP) ports directly to the public network. Azure Bastion provides remote access through TLS (443/TCP) while integrating with Azure Active Directory (AAD) security policies.",
"AdditionalInformation": "Using Azure Bastion eliminates the need to assign public IP addresses to VMs, reducing exposure to brute-force attacks and unauthorized access. It enhances security by enabling browser-based RDP/SSH access, leveraging Azure Active Directory controls, and supporting Multi-Factor Authentication (MFA), Conditional Access Policies, and other hardening measures for a centralized and secure access solution.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 2
}
]
},
@@ -374,7 +374,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Use Microsoft Entra authentication for SQL Database to centralize identity and credential management, enhancing security and simplifying access control. By leveraging Microsoft Entra ID, organizations can manage database users, permissions, and authentication policies in a single location, reducing complexity and improving security.",
"AdditionalInformation": "Microsoft Entra authentication eliminates the need for separate SQL authentication, preventing identity sprawl and simplifying password management. It enables centralized permission management, supports token-based authentication, integrates with Active Directory Federation Services (ADFS), and enhances security with Multi-Factor Authentication (MFA). Using Entra ID authentication also eliminates the need to store passwords, enabling secure, modern authentication methods while ensuring seamless access control for users and applications.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -391,7 +391,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Disable access from Azure services to PostgreSQL flexible servers to restrict inbound connections and enhance security.",
"AdditionalInformation": "Allowing access from all Azure services bypasses firewall restrictions and permits connections from any Azure resource, including those outside your subscription. This can expose the database to unauthorized access and security risks. Instead, configure firewall rules or Virtual Network (VNet) rules to allow only specific, trusted network ranges, ensuring tighter access control.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -408,7 +408,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Restrict Cosmos DB access to whitelisted networks to minimize exposure and reduce potential attack vectors.",
"AdditionalInformation": "Limiting Cosmos DB communication to specific trusted networks prevents unauthorized access from unapproved sources, including the public internet. This enhances security by reducing the attack surface and ensuring only designated networks can interact with the database.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 2
}
]
},
@@ -425,7 +425,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Use private endpoints for Cosmos DB to restrict network traffic to approved sources, ensuring secure and private communication.",
"AdditionalInformation": "For sensitive data, private endpoints provide granular control over which services can access Cosmos DB, preventing exposure to unauthorized networks. This setup ensures that all traffic remains within a private network, reducing security risks and enhancing data protection.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -442,7 +442,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Use Microsoft Entra ID for Cosmos DB client authentication, leveraging Azure RBAC for enhanced security, centralized management, and MFA support.",
"AdditionalInformation": "Entra ID authentication is significantly more secure than token-based authentication, as tokens must be stored persistently on the client, increasing the risk of compromise. Entra ID eliminates this risk by securely handling credentials, integrating seamlessly with Azure RBAC, and supporting multi-factor authentication (MFA) for stronger access control.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -459,7 +459,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Disable public network access for Azure Storage accounts, ensuring that access settings for individual containers cannot override this restriction. This applies to Azure Resource Manager deployment model storage accounts, as classic deployment model accounts will be retired by August 31, 2024.",
"AdditionalInformation": "By default, Azure Storage accounts allow users with appropriate permissions to enable public access to containers and blobs, granting read-only access without requiring authentication. To minimize the risk of unauthorized data exposure, public access should be restricted unless explicitly required. Instead, use Azure AD RBAC or shared access signatures (SAS) to grant controlled and time-limited access to storage resources.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -476,7 +476,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Restricting default network access enhances security by preventing unrestricted connections to Azure Storage accounts. By default, storage accounts accept connections from any network, so access should be limited to selected networks by modifying the default configuration.",
"AdditionalInformation": "Storage accounts should deny access from all networks by default, except for explicitly allowed Azure Virtual Networks or specific IP address ranges. This approach creates a secure network boundary, ensuring only authorized applications can connect. Even when network rules allow access, proper authentication (via access keys or SAS tokens) is still required, adding an extra layer of security.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -493,7 +493,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "This recommendation assumes that public network access is set to “Enabled from selected virtual networks and IP addresses” and that the default network access rule for storage accounts is set to deny. Some Azure services require access to storage accounts from networks that cannot be explicitly granted permissions through network rules. To allow these services to function properly, enable the trusted Azure services exception, which allows selected Azure services to bypass network restrictions while still enforcing strong authentication.",
"AdditionalInformation": "Enabling firewall rules on a storage account blocks access to all incoming requests, including those from other Azure services. Allowing access to trusted Azure services ensures that essential Azure functions, such as Azure Backup, Event Grid, Monitor, and Site Recovery, can interact with storage accounts securely without exposing them to broader public access.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 2
}
]
},
@@ -510,7 +510,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Use private endpoints for Azure Storage accounts to enable secure, encrypted access over a Private Link. Private endpoints assign an IP address from the Virtual Network (VNet) for each service, ensuring that network traffic remains isolated and encrypted within the VNet. This configuration helps segment network traffic, preventing external access while allowing secure communication between services. Additionally, VNets can extend addressing spaces or act as secure tunnels over public networks, connecting remote infrastructures securely.",
"AdditionalInformation": "Encrypting traffic between services protects sensitive data from interception and unauthorized access. Using private endpoints ensures that data remains within a controlled network environment, reducing exposure to external threats and enhancing overall security posture.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 2
}
]
},
@@ -527,7 +527,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Ensure that Azure SQL Databases do not allow ingress from 0.0.0.0/0 (ANY IP), as this would expose them to the public internet. Azure SQL Server includes a firewall that blocks unauthorized connections by default, but it allows defining more granular IP address rules to restrict access. Allowing 0.0.0.0/0 effectively grants open access, increasing security risks.",
"AdditionalInformation": "Leaving Azure SQL firewall rules open to ANY IP significantly increases the attack surface, making databases vulnerable to brute-force attacks and unauthorized access. Instead, firewall rules should be restricted to specific, trusted IP ranges from known datacenters or internal resources. Additionally, enabling Allow Azure services and resources to access this server could allow access from outside your organization’s subscription or region, potentially bypassing SQL Server’s network ACLs and exposing the database to malicious activity.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 5
}
]
},
@@ -544,7 +544,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Enable Azure App Service Authentication to restrict anonymous HTTP requests and enforce authentication using identity providers before requests reach the application.",
"AdditionalInformation": "Enabling App Service Authentication ensures that all incoming HTTP requests are validated and authenticated before being processed by the application. It integrates with Microsoft Entra ID, Google, Facebook, Microsoft Accounts, and Twitter to manage authentication, token validation, and session handling. Additionally, disabling HTTP Basic Authentication helps mitigate risks from legacy authentication methods, strengthening application security.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -561,7 +561,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Ensure that FTP access is disabled for Azure App Services, or if required, enforce FTPS (FTP over SSL/TLS) for secure authentication and data transmission.",
"AdditionalInformation": "FTP transmits data, including credentials, in plaintext, making it vulnerable to interception, credential theft, and data exfiltration. Requiring FTPS ensures that all FTP connections are encrypted, reducing the risk of unauthorized access, persistence, and lateral movement within the environment. If FTP is not needed, disabling it entirely enhances security by eliminating an unnecessary attack vector.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -697,7 +697,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "Ensure that network flow logs are collected and sent to a central Log Analytics workspace for monitoring and analysis.",
"AdditionalInformation": "Capturing network flow logs provides visibility into traffic patterns across your network, helping detect anomalies, potential lateral movement, and security threats. These logs integrate with Azure Monitor and Azure Sentinel, enabling advanced analytics and visualization for improved network security and incident response.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -714,7 +714,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "Enable AppServiceHTTPLogs for Azure App Service instances to capture and centrally log all HTTP requests.",
"AdditionalInformation": "Logging web requests provides critical data for security monitoring and incident response. Captured logs can be ingested into a SIEM or central log aggregation system, helping security analysts detect anomalies, investigate threats, and enhance application security.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 1
}
]
},
@@ -816,7 +816,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an Activity Log Alert for the Delete SQL Server Firewall Rule event to monitor and track firewall rule removals in SQL Server.",
"AdditionalInformation": "Monitoring firewall rule deletions helps detect unauthorized or accidental changes that could expose the database to security risks. Timely alerts ensure quick detection and response to prevent unauthorized network access and maintain a secure SQL environment.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -850,7 +850,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an Activity Log Alert for the Delete Public IP Address event to monitor and track the removal of public IP addresses.",
"AdditionalInformation": "Monitoring public IP deletions helps detect unauthorized or accidental changes that could impact network accessibility or security. Timely alerts enable quick investigation and response, ensuring that critical network configurations remain intact and secure.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -867,7 +867,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Application Insights in Azure serves as an Application Performance Monitoring (APM) solution, providing valuable insights into application performance, telemetry data, and trace logs. It helps organizations monitor application health and troubleshoot incidents efficiently.",
"AdditionalInformation": "Enabling Application Insights enhances security monitoring and performance optimization by collecting metrics, telemetry, and trace logs. These logs aid in proactive performance tuning to reduce costs and support incident response by helping identify the root cause of potential security or operational issues. Integrating Application Insights into a broader logging and monitoring strategy strengthens an organization’s overall observability and security posture.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 1
}
]
},
@@ -901,7 +901,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Ensure endpoint protection is installed on all Azure Virtual Machines (VMs) to provide real-time security monitoring and threat detection.",
"AdditionalInformation": "Endpoint protection helps detect and remove malware, viruses, and other security threats, protecting VMs from compromise and unauthorized access. It also provides configurable alerts for suspicious activity, enhancing security monitoring and incident response across Azure environments.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -918,7 +918,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Ensure that all Windows and Linux Virtual Machines (VMs) have the latest OS patches and security updates applied to mitigate vulnerabilities and improve system stability.",
"AdditionalInformation": "Keeping VMs updated helps address security vulnerabilities, bug fixes, and stability improvements. Microsoft Defender for Cloud continuously checks for missing critical and security updates using Windows Update, WSUS, or Linux package managers. Applying recommended updates reduces the risk of exploits, malware, and performance issues, ensuring a secure and resilient cloud environment.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -935,7 +935,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Ensure that all Microsoft Cloud Security Benchmark (MCSB) policies are enabled to effectively evaluate resource configurations against best practice security recommendations.",
"AdditionalInformation": "The MCSB Policy Initiative enforces security best practices and helps ensure compliance with organizational and regulatory requirements. If a policy’s Effect is set to Disabled, it will not be evaluated, potentially preventing administrators from detecting security misconfigurations. Keeping all MCSB policies enabled allows Microsoft Defender for Cloud to assess relevant resources and provide actionable security insights to strengthen cloud security.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -952,7 +952,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Ensure that security alert emails are enabled for subscription owners to receive notifications about potential security threats and vulnerabilities.",
"AdditionalInformation": "Enabling security alert emails ensures that subscription owners are promptly informed of security incidents, threats, or misconfigurations detected by Microsoft Defender for Cloud. Timely notifications allow administrators to take immediate action, mitigate risks, and maintain a strong security posture within the Azure environment.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -969,7 +969,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Configure Microsoft Defender for Cloud to send high-severity security alerts to a designated security contact email in addition to the subscription owner.",
"AdditionalInformation": "By default, Microsoft Defender for Cloud notifies only subscription owners of critical security alerts. Adding a security contact email ensures that the security team is promptly informed of potential threats, allowing for faster response and risk mitigation to maintain a secure Azure environment.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -1003,7 +1003,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Enable security alert emails to notify the subscription owner or designated security contacts about potential security threats.",
"AdditionalInformation": "Ensuring security alerts are sent to the appropriate personnel allows for timely detection and response to security incidents. This helps mitigate risks by ensuring that critical threats and vulnerabilities are addressed promptly, improving the overall security posture of the Azure environment.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -1020,7 +1020,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Enable Microsoft Defender for DNS to monitor and scan outgoing DNS traffic within a subscription for potential security threats. (Note: As of August 1, 2023, new subscribers receive DNS threat alerts as part of Defender for Servers P2.)",
"AdditionalInformation": "Defender for DNS analyzes DNS queries against a dynamic threat intelligence list to detect potential malicious activity, compromised services, or security breaches. Monitoring DNS lookups helps identify and prevent threats such as data exfiltration, command and control (C2) communications, and phishing attacks, improving overall network security.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -1037,7 +1037,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an activity log alert for the Create Policy Assignment event to track changes in Azure Policy assignments.",
"AdditionalInformation": "Monitoring policy assignment events helps detect unauthorized or unintended changes in Azure policies, providing greater visibility and reducing the time required to identify and respond to policy modifications.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -1054,7 +1054,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an activity log alert for the Delete Policy Assignment event to monitor and track policy removal activities in Azure Policy assignments.",
"AdditionalInformation": "Monitoring policy deletions helps detect unauthorized or unintended changes, ensuring policy integrity and reducing the time required to identify and respond to security or compliance violations.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -1071,7 +1071,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an Activity Log Alert for the Create or Update Network Security Group (NSG) event to track changes in network security configurations.",
"AdditionalInformation": "Monitoring NSG creation and updates provides visibility into network access changes, helping to detect unauthorized modifications and identify potential security risks in a timely manner.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -1088,7 +1088,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an Activity Log Alert for the Delete Network Security Group (NSG) event to monitor and track network security group removals.",
"AdditionalInformation": "Monitoring NSG deletions provides visibility into network access changes, helping to detect unauthorized modifications and identify potential security threats before they impact the environment.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -1105,7 +1105,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an Activity Log Alert for the Create or Update Security Solution event to track modifications to security solutions in your environment.",
"AdditionalInformation": "Monitoring security solution changes provides visibility into updates, additions, or modifications to active security configurations. This helps detect unauthorized changes or suspicious activity and ensures that security controls remain properly configured.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -1122,7 +1122,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an Activity Log Alert for the Delete Security Solution event to monitor and track the removal of security solutions in your environment.",
"AdditionalInformation": "Monitoring security solution deletions helps detect unauthorized removals or suspicious activity, ensuring that critical security controls are not accidentally or maliciously disabled. This improves security visibility and helps maintain a strong security posture.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -1139,7 +1139,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "Create an Activity Log Alert for the Create or Update SQL Server Firewall Rule event to track changes in SQL Server firewall configurations.",
"AdditionalInformation": "Monitoring firewall rule modifications provides visibility into network access changes, helping detect unauthorized updates that could expose the database to security risks. Timely alerts can reduce the time needed to identify and respond to suspicious activity, ensuring a secure SQL environment.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -1156,7 +1156,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "Enable require_secure_transport on PostgreSQL flexible servers to enforce SSL connections between the database server and client applications, ensuring encrypted communication.",
"AdditionalInformation": "Requiring SSL encryption helps protect data in transit from man-in-the-middle attacks by securing the connection between the database server and client applications. Enforcing secure transport prevents unauthorized access and strengthens data integrity and confidentiality.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -1173,7 +1173,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "Enable require_secure_transport on MySQL flexible servers to enforce SSL encryption between the database server and client applications, ensuring secure communication.",
"AdditionalInformation": "Requiring SSL connectivity protects data in transit from man-in-the-middle attacks by encrypting communication between client applications and the database server. Enforcing secure transport helps prevent unauthorized access and data interception, strengthening the overall security posture of the database.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1207,7 +1207,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "Configure Azure App Service to enforce HTTPS-only traffic, ensuring that all HTTP requests are automatically redirected to HTTPS for secure communication.",
"AdditionalInformation": "Enforcing HTTPS protects data in transit by using TLS/SSL encryption, preventing man-in-the-middle attacks and ensuring secure authentication. Redirecting non-secure HTTP traffic to HTTPS enhances the confidentiality and integrity of application communications, reducing exposure to security vulnerabilities.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -1224,7 +1224,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "Ensure that Azure App Service is configured to use TLS 1.2 or higher to secure data transmission and align with industry security standards.",
"AdditionalInformation": "TLS 1.0 and 1.1 are outdated protocols with known vulnerabilities that expose web applications to security threats, including data interception and man-in-the-middle attacks. TLS 1.2 is the recommended encryption standard by industry frameworks such as PCI DSS, providing stronger encryption and improved security for web app connections.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -1241,7 +1241,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "Ensure that Azure App Service is configured to use the latest supported HTTP version to benefit from security improvements, performance enhancements, and new functionalities.",
"AdditionalInformation": "Newer HTTP versions provide security enhancements, performance optimizations, and better resource management. HTTP/2, for example, improves efficiency by addressing issues such as head-of-line blocking, header compression, and request prioritization. Keeping apps updated to the latest HTTP version ensures they leverage modern security protocols and enhanced data transmission capabilities while maintaining compatibility and performance standards.",
- "LevelOfRisk": 2
+ "LevelOfRisk": 1
}
]
},
@@ -1258,7 +1258,7 @@
"SubSection": "4.2 At-Rest",
"AttributeDescription": "Enable encryption at rest using Customer Managed Keys (CMK) instead of Microsoft Managed Keys to maintain greater control over sensitive data encryption in Azure Storage accounts.",
"AdditionalInformation": "By default, Azure encrypts all storage resources (blobs, disks, files, queues, and tables) using Microsoft Managed Keys. However, using Customer Managed Keys (CMK) allows organizations to control, manage, and rotate their encryption keys through Azure Key Vault, ensuring compliance with security policies. CMKs also support automatic key version updates for enhanced security. Since this recommendation applies specifically to storage accounts holding critical data, its assessment remains manual rather than automated.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -1275,7 +1275,7 @@
"SubSection": "4.2 At-Rest",
"AttributeDescription": "Enable Transparent Data Encryption (TDE) with Customer-Managed Keys (CMK) to enhance control, security, and separation of duties over the TDE Protector. TDE encrypts data at rest using a database encryption key (DEK). Traditionally, DEKs were protected by Azure SQL Service-managed certificates, but with Customer-Managed Key support, the DEK can now be secured using an asymmetric key stored in Azure Key Vault. Azure Key Vault provides centralized key management, FIPS 140-2 Level 2 validated HSMs, and additional security through key and data separation. Based on business needs and data sensitivity, organizations should use Customer-Managed Keys for TDE encryption.",
"AdditionalInformation": "Using Customer-Managed Keys for TDE gives organizations full control over encryption keys, including who can access them and when. Azure Key Vault serves as a secure external key management system, ensuring that TDE encryption keys remain protected from unauthorized access. When configured, the asymmetric key is set at the server level and inherited by all databases under that server, providing consistent encryption management across the environment.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
diff --git a/prowler/compliance/gcp/prowler_threatscore_gcp.json b/prowler/compliance/gcp/prowler_threatscore_gcp.json
index 2ccb7e7add..f21949095f 100644
--- a/prowler/compliance/gcp/prowler_threatscore_gcp.json
+++ b/prowler/compliance/gcp/prowler_threatscore_gcp.json
@@ -17,7 +17,7 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "Service account keys consist of a key ID (private_key_id) and a private key, which are used to authenticate programmatic requests to Google Cloud services. It is recommended to regularly rotate service account keys to enhance security and reduce the risk of unauthorized access.",
"AdditionalInformation": "Regularly rotating service account keys minimizes the risk of a compromised, lost, or stolen key being used to access cloud resources. Google-managed keys are automatically rotated daily for internal authentication, ensuring strong security. For user-managed (external) keys, users are responsible for key security, storage, and rotation. Since Google does not retain private keys once generated, proper key management practices must be followed. Google Cloud allows up to 10 external keys per service account, making it easier to rotate them without disruption. Implementing regular key rotation ensures that old keys are not left active, reducing the potential attack surface.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 1
}
]
},
@@ -34,7 +34,7 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "API keys should only be used when no other authentication method is available, as they pose significant security risks. Unused API keys with active permissions may still exist within a project, potentially exposing resources to unauthorized access. It is recommended to use standard authentication flows such as OAuth 2.0 or service account authentication instead.",
"AdditionalInformation": "API keys are inherently insecure because they: Are simple encrypted strings that can be easily exposed in browsers, client-side applications, or devices. Do not authenticate users or applications making API requests. Can be accidentally leaked in logs, repositories, or web traffic.To enhance security, API keys should be avoided when possible, and unused keys should be deleted to minimize the risk of unauthorized access.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -51,7 +51,7 @@
"SubSection": "1.1 Authentication",
"AttributeDescription": "API keys should only be used when no other authentication method is available. If API keys are in use, it is recommended to rotate them every 90 days to minimize security risks.",
"AdditionalInformation": "API keys are inherently insecure because: They are simple encrypted strings that can be easily exposed. They do not authenticate users or applications making API requests. They are often accessible to clients, increasing the risk of theft and misuse. Unlike credentials with expiration policies, stolen API keys remain valid indefinitely unless revoked or regenerated. Regularly rotating API keys reduces the risk of unauthorized access by ensuring that compromised keys cannot be used for extended periods. To enhance security, API keys should be rotated every 90 days or as part of a proactive security policy.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -68,7 +68,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "Service accounts should not use user-managed keys, as they introduce security risks and require manual management. Instead, use Google Cloud-managed keys, which are automatically rotated and secured by Google.",
"AdditionalInformation": "User-managed keys are downloadable and manually managed, making them vulnerable to leaks, mismanagement, and unauthorized access. In contrast, GCP-managed keys are non-downloadable, automatically rotated weekly, and securely handled by Google Cloud services like App Engine and Compute Engine. Managing user-generated keys requires key storage, distribution, rotation, revocation, and protectionall of which introduce potential security gaps. Common risks include keys being exposed in source code repositories, left in unsecured locations, or unintentionally shared. To minimize security risks, it is recommended to disable user-managed service account keys and rely on GCP-managed keys instead.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -85,7 +85,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "A service account is a special Google account assigned to an application or virtual machine (VM) rather than an individual user. It is used to authenticate API requests on behalf of the application. Service accounts should not be granted admin privileges to minimize security risks.",
"AdditionalInformation": "Service accounts control resource access based on their assigned roles. Granting admin privileges to a service account allows full control over applications or VMs, enabling actions like deletion, updates, and configuration changes without user intervention. This increases the risk of misconfigurations, privilege escalation, or potential security breaches. To follow the principle of least privilege, it is recommended to restrict admin access for service accounts and assign only the necessary permissions.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -102,7 +102,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "The IAM policy on Cloud KMS cryptographic keys should not allow anonymous (allUsers) or public (allAuthenticatedUsers) access to prevent unauthorized key usage.",
"AdditionalInformation": "Granting permissions to allUsers or allAuthenticatedUsers allows anyone to access the cryptographic keys, which can lead to data exposure, unauthorized encryption/decryption operations, or potential key compromise. This is particularly critical if sensitive data is protected using these keys. To maintain data security and compliance, ensure that Cloud KMS cryptographic keys are only accessible to authorized users, groups, or service accounts and do not have public or anonymous access permissions.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -119,7 +119,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "Google Cloud Key Management Service (KMS) organizes cryptographic keys in a hierarchical structure to facilitate secure and efficient access control. Keys should be configured with a defined rotation schedule to ensure their cryptographic strength is maintained over time.",
"AdditionalInformation": "Key rotation ensures that new key versions are automatically generated at regular intervals, reducing the risk of key compromise and unauthorized access. The key material (actual encryption bits) changes over time, even though the keys logical identity remains the same. Since cryptographic keys protect sensitive data, setting a specific rotation period ensures that encrypted data remains secure, minimizes the impact of a potential key leak, and aligns with best security practices.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 1
}
]
},
@@ -136,7 +136,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "The principle of Separation of Duties should be enforced when assigning Google Cloud Key Management Service (KMS) roles to users. This prevents excessive privileges and reduces security risks.",
"AdditionalInformation": "The Cloud KMS Admin role grants the ability to create, delete, and manage keys, while the Cloud KMS CryptoKey Encrypter/Decrypter, Encrypter, and Decrypter roles control encryption and decryption of data. Granting both administrative and cryptographic privileges to the same user violates the Separation of Duties principle, potentially allowing unauthorized access to sensitive data. To mitigate risks and prevent privilege escalation, no user should hold the Cloud KMS Admin role along with any of the CryptoKey Encrypter/Decrypter roles. Enforcing Separation of Duties helps ensure secure key management and aligns with security best practices.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -153,7 +153,7 @@
"SubSection": "1.2 Authorization",
"AttributeDescription": "API keys should only be used when no other authentication method is available, as they pose a higher security risk due to their public visibility. To minimize exposure, API keys should be restricted to access only the specific APIs required by an application.",
"AdditionalInformation": "API keys present several security risks, including: They are simple encrypted strings that can be easily exposed in client-side applications or browsers. They do not authenticate the user or application making API requests. They are often accessible to clients, making them susceptible to discovery and theft. Google recommends using standard authentication methods instead of API keys whenever possible. However, in limited scenarios where API keys are necessary (e.g., mobile applications using Google Cloud Translation API without a backend server), restricting API key access to only the required APIs helps enforce least privilege access and reduces attack surfaces.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -170,7 +170,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "It is recommended to assign the Service Account User (iam.serviceAccountUser) and Service Account Token Creator (iam.serviceAccountTokenCreator) roles to users at the service account level rather than granting them project-wide access.",
"AdditionalInformation": "Service accounts are identities used by applications and virtual machines (VMs) to interact with Google Cloud APIs. They also function as resources with IAM policies defining who can use them. Granting service account permissions at the project level allows users to access all service accounts within the project, including any created in the future. This increases the risk of privilege escalation, as users with Compute Instance Admin or App Engine Deployer roles could execute code as a service account, gaining access to additional resources. To enforce the principle of least privilege, users should be assigned service account roles at the specific service account level rather than at the project level. This ensures that each user has access only to the necessary service accounts while preventing unintended privilege escalation.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -187,7 +187,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "It is recommended to enforce the principle of Separation of Duties when assigning service account-related IAM roles to users to prevent excessive privileges and security risks.",
"AdditionalInformation": "The Service Account Admin role allows a user to create, delete, and manage service accounts, while the Service Account User role allows a user to assign service accounts to applications or compute instances. Granting both roles to the same user violates the Separation of Duties principle, as it would allow an individual to create and assign service accounts, potentially leading to unauthorized access or privilege escalation. To minimize security risks, no user should be assigned both Service Account Admin and Service Account User roles simultaneously. Enforcing Separation of Duties ensures better access control, reduces the risk of privilege abuse, and aligns with security best practices.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -204,7 +204,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "Cloud Audit Logging should be configured to track all administrative activities and read/write access to user data. This ensures comprehensive visibility into who accessed or modified resources within a project, folder, or organization.",
"AdditionalInformation": "Cloud Audit Logging maintains two types of audit logs: 1. Admin Activity Logs Captures API calls and administrative actions that modify configurations or metadata. These logs are enabled by default and cannot be disabled. 2. Data Access Logs Tracks API calls that create, modify, or read user data. These logs are disabled by default and should be enabled for better monitoring. Data Access Logs provide three types of visibility: Admin Read Tracks metadata or configuration reads. Data Read Logs operations where user-provided data is accessed. Data Write Captures modifications to user-provided data.To ensure effective logging, it is recommended to: 1. Enable DATA_READ logs (for user activity tracking) and DATA_WRITE logs (to track modifications). 2. Apply audit logging to all supported services where Data Access logs are available. 3.Avoid exempting users from audit logs to maintain full tracking capabilities. Properly configuring Cloud Audit Logging helps strengthen security, detect unauthorized access, and ensure compliance with security policies.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -221,7 +221,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "In order to prevent unnecessary project ownership assignments to users or service accounts and mitigate potential misuse of projects and resources, all role assignments to roles/Owner should be monitored. Users or service accounts assigned the roles/Owner primitive role are considered project owners. The Owner role grants full control over the project, including: full viewer permissions on all GCP services, permissions to modify the state of all services, manage roles and permissions for the project and its resources, and set up billing for the project. Granting the Owner role allows the member to modify the IAM policy, which contains sensitive access control data. To minimize security risks, the Owner role should only be assigned when strictly necessary, and the number of users with this role should be kept to a minimum.",
"AdditionalInformation": "Project ownership has the highest level of privileges within a project, making it a high-risk role if misused. To reduce potential security risks, all project ownership assignments and changes should be monitored and alerted to security teams or relevant recipients. Critical events to monitor include: sending project ownership invitations, acceptance or rejection of ownership invites, assigning the roles/Owner role to a user or service account, and removing a user or service account from the roles/Owner role. Monitoring these activities helps prevent unauthorized access, enforces least privilege principles, and improves security auditing and compliance.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -238,7 +238,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "Google Cloud Platform (GCP) services generate audit log entries in the Admin Activity and Data Access logs, providing visibility into who performed what action, where, and when within GCP projects. These logs capture key details such as the identity of the API caller, timestamp, source IP address, request parameters, and response data. Cloud audit logging records API calls made through the GCP Console, SDKs, command-line tools, and other GCP services, offering a comprehensive activity history for security monitoring and compliance.",
"AdditionalInformation": "Admin activity and data access logs play a critical role in security analysis, resource change tracking, and compliance auditing. Configuring metric filters and alerts for audit configuration changes ensures that audit logging remains in its recommended state, allowing organizations to detect and respond to unauthorized modifications while ensuring all project activities remain fully auditable at any time.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -255,7 +255,7 @@
"SubSection": "1.3 Privilege Escalation Prevention",
"AttributeDescription": "It is recommended to set up a metric filter and alarm to track changes to Identity and Access Management (IAM) roles, including their creation, deletion, and updates. Google Cloud IAM provides predefined roles for granular access control but also allows organizations to create custom roles to meet specific needs.",
"AdditionalInformation": "IAM role modifications can impact security by granting excessive privileges if not properly managed. Monitoring role creation, deletion, and updates helps detect potential misconfigurations or over-privileged roles early, ensuring that only intended access permissions are assigned within the organization.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -272,7 +272,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "A project should not have a default network to prevent the use of preconfigured and potentially insecure network settings.",
"AdditionalInformation": "The default network automatically creates permissive firewall rules, including unrestricted internal traffic, SSH, RDP, and ICMP access, which increases the risk of unauthorized access. Additionally, it is an auto mode network, limiting flexibility in subnet configuration and restricting the use of Cloud VPN or VPC Network Peering. Organizations should create a custom network tailored to their security and networking needs and remove the default network to minimize exposure.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -289,7 +289,7 @@
"SubSection": "2.1 Network",
"AttributeDescription": "Projects should not have a legacy network configured to prevent the use of outdated and inflexible networking models. While new projects can no longer create legacy networks, older projects should be checked to ensure they are not still using them.",
"AdditionalInformation": "Legacy networks use a single global IPv4 prefix and a single gateway IP for the entire network, lacking subnetting capabilities. This design limits flexibility, prevents migration to auto or custom subnet networks, and can create performance bottlenecks or single points of failure for high-traffic workloads. Removing legacy networks and transitioning to modern networking models improves scalability, security, and resilience.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 3
}
]
},
@@ -340,7 +340,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "IAM policies on Cloud Storage buckets should not allow anonymous or public access to prevent unauthorized data exposure.",
"AdditionalInformation": "Granting public or anonymous access allows anyone to access the buckets contents, posing a security risk, especially if sensitive data is stored. Restricting access ensures that only authorized users can interact with the bucket, reducing the risk of data breaches.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -374,7 +374,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Disable the remote access database flag for Cloud SQL SQL Server instances to prevent execution of stored procedures from remote servers.",
"AdditionalInformation": "The remote access option allows stored procedures to be executed from or on remote SQL Server instances. By default, this setting is enabled, which could be exploited for unauthorized query execution or Denial-of-Service (DoS) attacks by offloading processing to a target server. Disabling remote access enhances security by restricting stored procedure execution to the local server, reducing potential attack vectors. This recommendation applies to SQL Server database instances.",
- "LevelOfRisk": 2
+ "LevelOfRisk": 4
}
]
},
@@ -391,7 +391,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Restrict database server access to only trusted networks and IP addresses, preventing connections from public IPs.",
"AdditionalInformation": "Allowing unrestricted access to a database server increases the risk of unauthorized access and attacks. To minimize the attack surface, only trusted and necessary IP addresses should be whitelisted. Authorized networks should not be set to 0.0.0.0/0, which permits connections from anywhere. This control applies specifically to instances with public IP addresses.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -408,7 +408,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Configure Second Generation Cloud SQL instances to use private IPs instead of public IPs.",
"AdditionalInformation": "Using private IPs for Cloud SQL databases enhances security by reducing exposure to external threats. It also improves network performance and lowers latency by keeping traffic within the internal network, minimizing the attack surface of the database.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -425,7 +425,7 @@
"SubSection": "2.2 Storage",
"AttributeDescription": "Ensure that IAM policies on BigQuery datasets do not allow anonymous or public access.",
"AdditionalInformation": "Granting access to allUsers or allAuthenticatedUsers permits unrestricted access to the dataset, which can lead to unauthorized data exposure. To protect sensitive information, public or anonymous access should be strictly prohibited.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -442,7 +442,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "To enforce the principle of least privilege and prevent potential privilege escalation, instances should not be assigned the Compute Engine default service account with the scope Allow full access to all Cloud APIs.",
"AdditionalInformation": "Google Compute Engine provides a default service account for instances to access necessary cloud services. This default service account has the Project Editor role, granting broad permissions over most cloud services except billing. When assigned to an instance, it can operate in three modes: 1.Allow default access Grants minimal required permissions (recommended). 2.Allow full access to all Cloud APIs Grants excessive access to all cloud services (not recommended). 3.Set access for each API Allows administrators to specify required APIs (preferred for least privilege). Assigning an instance the Compute Engine default service account with full access to all APIs can expose cloud operations to unauthorized users based on IAM roles. To reduce security risks, instances should use custom service accounts with minimal required permissions.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -459,7 +459,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Instances should use instance-specific SSH keys instead of project-wide SSH keys to enhance security and reduce the risk of unauthorized access.",
"AdditionalInformation": "Project-wide SSH keys are stored in Compute Project metadata and can be used to access all instances within a project. While this simplifies SSH key management, it also increases security risksif a project-wide SSH key is compromised, all instances in the project could be affected. Using instance-specific SSH keys provides better security by limiting access to individual instances, reducing the attack surface in case of key compromise.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -476,7 +476,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "The interactive serial console allows direct access to a virtual machines serial ports, similar to using a terminal window. When enabled, it allows connections from any IP address, creating a potential security risk. It is recommended to disable interactive serial console support.",
"AdditionalInformation": "A virtual machine instance has four virtual serial ports, often used by the operating system, BIOS, or other system-level entities for input and output. The first serial port (serial port 1) is commonly referred to as the serial console. Unlike SSH, the interactive serial console does not support IP-based access restrictions, meaning anyone with the correct SSH key, username, project ID, zone, and instance name could gain access. This exposes the instance to unauthorized access. To mitigate this risk, interactive serial console support should be disabled unless absolutely necessary.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -493,7 +493,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Google Compute Engine instances should not forward data packets unless explicitly required for routing purposes. By default, an instance cannot forward packets unless the source IP matches the instances IP address. Similarly, GCP wont deliver packets if the destination IP does not match the instance. To prevent unauthorized data forwarding, it is recommended to disable IP forwarding.",
"AdditionalInformation": "When IP forwarding is enabled (canIpForward field), an instance can send and receive packets with non-matching source or destination IPs, effectively allowing it to act as a network router. This can lead to data loss, information disclosure, or unauthorized traffic routing. To maintain security and prevent misuse, IP forwarding should be disabled unless explicitly required for network routing configurations.",
- "LevelOfRisk": 2
+ "LevelOfRisk": 3
}
]
},
@@ -510,7 +510,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Shielded VMs are hardened virtual machines on Google Cloud Platform (GCP) designed to protect against rootkits, bootkits, and other low-level attacks. They ensure verifiable integrity using Secure Boot, virtual Trusted Platform Module (vTPM)-enabled Measured Boot, and integrity monitoring.",
"AdditionalInformation": "Shielded VMs use signed and verified firmware from Googles Certificate Authority to establish a root of trust. Secure Boot ensures only authentic software runs by verifying digital signatures, preventing unauthorized modifications. Integrity monitoring helps detect unexpected changes in the VMs boot process, while vTPM-enabled Measured Boot provides a baseline to compare against future boots. Enabling Shielded VMs enhances security by protecting against malware, unauthorized firmware changes, and persistent threats.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 2
}
]
},
@@ -527,7 +527,7 @@
"SubSection": "2.3 Application",
"AttributeDescription": "Compute instances should not be assigned external IP addresses to minimize exposure to the internet and reduce security risks.",
"AdditionalInformation": "Public IP addresses increase the attack surface of Compute instances, making them more vulnerable to threats. Instead, instances should be placed behind load balancers or use private networking to control access and reduce the risk of unauthorized exposure.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 4
}
]
},
@@ -544,7 +544,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "It is recommended to create a log sink to export and store copies of all log entries. This enables log aggregation across multiple projects and allows integration with a Security Information and Event Management (SIEM) system for centralized monitoring.",
"AdditionalInformation": "Cloud Logging retains logs for a limited period. To ensure long-term storage and better security analysis, logs should be exported to a destination such as Cloud Storage, BigQuery, or Cloud Pub/Sub. A log sink allows you to: Aggregate logs from multiple projects, folders, or billing accounts. Extend log retention beyond Cloud Loggings default retention period. Send logs to a SIEM system for real-time monitoring and threat detection. To ensure all logs are captured and exported: 1.Create a sink without filters to capture all log entries. 2.Choose an appropriate destination (e.g., Cloud Storage for long-term storage, BigQuery for analysis, or Pub/Sub for real-time processing). 3.Apply logging at the organization level to cover all associated projects. Implementing log sinks enhances security visibility, forensic capabilities, and compliance adherence across cloud environments.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -561,7 +561,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "It is recommended to configure a metric filter and alarm to monitor Virtual Private Cloud (VPC) Network Firewall rule changes. Tracking modifications to firewall rules helps ensure that unauthorized or unintended changes do not compromise network security.",
"AdditionalInformation": "Firewall rules control ingress and egress traffic within a VPC. Monitoring create or update events provides visibility into network access changes and helps quickly detect potential security threats or misconfigurations, reducing the risk of unauthorized access.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -578,7 +578,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "It is recommended to configure a metric filter and alarm to monitor Virtual Private Cloud (VPC) network route changes. Keeping track of modifications ensures that unauthorized or unintended changes do not disrupt expected network traffic flow.",
"AdditionalInformation": "GCP routes define how network traffic is directed between VM instances and external destinations. Monitoring route table changes helps ensure that traffic follows the intended path, preventing misconfigurations or malicious alterations that could lead to data exposure or connectivity issues.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -595,7 +595,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "It is recommended to configure a metric filter and alarm to monitor Virtual Private Cloud (VPC) network changes. This helps track modifications to VPC configurations and peer connections, ensuring that network traffic remains secure and follows the intended paths.",
"AdditionalInformation": "It is recommended to configure a metric filter and alarm to monitor Virtual Private Cloud (VPC) network changes. This helps track modifications to VPC configurations and peer connections, ensuring that network traffic remains secure and follows the intended paths.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -612,7 +612,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "It is recommended to set up a metric filter and alarm to monitor Cloud Storage Bucket IAM changes. This ensures that any modifications to bucket permissions are tracked and reviewed in a timely manner.",
"AdditionalInformation": "Monitoring changes to Cloud Storage IAM policies helps detect and correct unauthorized access or overly permissive configurations. This reduces the risk of data exposure or breaches by ensuring that sensitive storage buckets and their contents remain properly secured.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 2
}
]
},
@@ -629,7 +629,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "It is recommended to configure a metric filter and alarm to track SQL instance configuration changes. This helps in detecting and addressing misconfigurations that may impact security, availability, and compliance.",
"AdditionalInformation": "Monitoring SQL instance configuration changes ensures that critical security settings remain properly configured. Misconfigurations, such as disabling auto backups, allowing untrusted networks, or modifying high availability settings, can lead to data loss, security vulnerabilities, or operational disruptions. Early detection of such changes helps maintain a secure and resilient SQL environment.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 2
}
]
},
@@ -646,7 +646,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "Enabling logging on an HTTPS Load Balancer captures all network traffic and its destination, providing visibility into requests made to your web applications.",
"AdditionalInformation": "Logging HTTPS network traffic helps monitor access patterns, troubleshoot issues, and enhance security by detecting suspicious activity or unauthorized access attempts.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -663,7 +663,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "Flow Logs capture and record IP traffic to and from network interfaces within VPC subnets. These logs are stored in Stackdriver Logging, allowing users to analyze traffic patterns, detect anomalies, and optimize network performance. It is recommended to enable Flow Logs for all critical VPC subnets to enhance network visibility and security.",
"AdditionalInformation": "VPC Flow Logs provide detailed insights into inbound and outbound traffic for virtual machines (VMs), whether they communicate with other VMs, on-premises data centers, Google services, or external networks. Enabling Flow Logs supports: Network monitoring Traffic analysis and cost optimization Incident investigation and forensics Real-time security threat detection For effective monitoring, Flow Logs should be configured to capture all traffic, use granular logging intervals, avoid log filtering, and include metadata for detailed investigations. Note that subnets reserved for internal HTTP(S) load balancing do not support Flow Logs.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -680,7 +680,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "The log_connections setting should be enabled to log all attempted connections to the PostgreSQL server, including successful client authentication.",
"AdditionalInformation": "By default, PostgreSQL does not log connection attempts, making it harder to detect unauthorized access. Enabling log_connections provides visibility into all connection attempts, aiding in troubleshooting and identifying unusual or suspicious access patterns. This is particularly useful for security monitoring and incident response.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -697,7 +697,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "The log_disconnections setting should be enabled to log the end of each PostgreSQL session, including session duration.",
"AdditionalInformation": "By default, PostgreSQL does not log session termination details, making it difficult to track session activity. Enabling log_disconnections helps monitor session durations and detect unusual activity. Combined with log_connections, it provides a complete audit trail of user access, aiding in troubleshooting and security monitoring.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 3
}
]
},
@@ -714,7 +714,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "The log_statement setting in PostgreSQL determines which SQL statements are logged. Acceptable values include none, ddl, mod, and all. A recommended setting is ddl, which logs all data definition statements unless otherwise specified by the organizations logging policy.",
"AdditionalInformation": "Proper SQL statement logging is crucial for auditing and forensic analysis. If too many statements are logged, it can become difficult to extract relevant information; if too few are logged, critical details may be missing. Setting log_statement to an appropriate value, such as ddl, ensures a balance between comprehensive auditing and log manageability, aiding in database security and compliance.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -731,7 +731,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "The log_min_messages setting in PostgreSQL defines the minimum severity level for messages to be logged as errors. Accepted values range from DEBUG5 (least severe) to PANIC (most severe). Best practice is to set this value to ERROR, ensuring that only critical issues are logged unless an organizations policy requires a different threshold.",
"AdditionalInformation": "Proper logging is essential for troubleshooting and forensic analysis. If log_min_messages is not configured correctly, important error messages may be missed or unnecessary logs may clutter records. Setting this parameter to ERROR helps maintain a balance between capturing relevant issues and avoiding excessive log noise, improving system monitoring and security.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -782,7 +782,7 @@
"SubSection": "3.1 Logging",
"AttributeDescription": "Ensure that the cloudsql.enable_pgaudit database flag is set to on for Cloud SQL PostgreSQL instances to enable centralized logging and auditing.",
"AdditionalInformation": "Enabling the pgaudit extension provides detailed session and object-level logging, which helps organizations comply with security standards such as government, financial, and ISO regulations. This logging capability enhances threat detection by monitoring security events on the database instance. Additionally, enabling this flag allows logs to be sent to Google Logs Explorer for centralized access and monitoring. This recommendation applies specifically to PostgreSQL database instances.",
- "LevelOfRisk": 4
+ "LevelOfRisk": 2
}
]
},
@@ -799,7 +799,7 @@
"SubSection": "3.2 Retention",
"AttributeDescription": "Enabling retention policies on log storage buckets prevents logs from being overwritten or accidentally deleted. It is recommended to configure retention policies and enable Bucket Lock for all storage buckets used as log sinks.",
"AdditionalInformation": "Cloud Logging allows logs to be exported to storage buckets through sinks. Without a retention policy, logs can be altered or deleted, making it difficult to perform security investigations or comply with audit requirements. To ensure logs remain intact for forensics and security analysis: 1.Set a retention policy on log storage buckets to prevent early deletion. 2.Enable Bucket Lock to make the policy immutable, ensuring logs cannot be altered even by privileged users. 3.Apply appropriate access controls to protect logs from unauthorized access. By implementing retention policies and Bucket Lock, organizations preserve critical security logs, prevent attackers from covering their tracks, and enhance compliance with security regulations.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -833,7 +833,7 @@
"SubSection": "3.3 Monitoring",
"AttributeDescription": "GCP Access Approval allows organizations to require explicit approval before Google support personnel can access their projects. Administrators can assign security roles in IAM to specific users who can review and approve these requests. Notifications of access requests, including the requesting Google employees details, are sent via email or Pub/Sub messages, providing transparency and control.",
"AdditionalInformation": "Managing who accesses your organizations data is critical for information security. While Google support may require access for troubleshooting, Access Approval ensures that access is only granted when explicitly authorized. This feature adds an additional layer of security and logging, ensuring that only approved Google personnel can access sensitive information.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -850,7 +850,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "Cloud DNS provides a scalable and reliable domain name system (DNS) service. Domain Name System Security Extensions (DNSSEC) enhance DNS security by protecting domains against DNS hijacking, man-in-the-middle attacks, and other threats.",
"AdditionalInformation": "DNSSEC cryptographically signs DNS records, ensuring the integrity and authenticity of DNS responses. Without DNSSEC, attackers can manipulate DNS lookups, redirecting users to malicious websites through DNS hijacking or spoofing attacks. Enabling DNSSEC helps prevent unauthorized modifications to DNS records, reducing the risk of phishing, malware distribution, and other cyber threats.",
- "LevelOfRisk": 1
+ "LevelOfRisk": 2
}
]
},
@@ -867,7 +867,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "Require all incoming connections to SQL database instances to use SSL encryption.",
"AdditionalInformation": "Unencrypted SQL database connections are vulnerable to man-in-the-middle (MITM) attacks, which can expose sensitive data such as credentials, queries, and results. Enforcing SSL ensures secure communication by encrypting data in transit, protecting against interception and unauthorized access. This recommendation applies to PostgreSQL, MySQL (Generation 1 and 2), and SQL Server 2017 instances.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -884,7 +884,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "DNSSEC (Domain Name System Security Extensions) relies on cryptographic algorithms to ensure the integrity and authenticity of DNS responses. It is important to use strong and recommended algorithms for key signing to maintain robust security. SHA-1 is deprecated and requires explicit approval from Google if used.",
"AdditionalInformation": "DNSSEC signing algorithms play a critical role in securing DNS transactions. Using weak or outdated algorithms can expose DNS infrastructure to spoofing, hijacking, and other attacks. Organizations should select recommended and secure algorithms when enabling DNSSEC to protect DNS records from unauthorized modifications. If adjustments to DNSSEC settings are required, DNSSEC must be disabled and re-enabled with the updated configurations.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 3
}
]
},
@@ -901,7 +901,7 @@
"SubSection": "4.1 In-Transit",
"AttributeDescription": "DNSSEC (Domain Name System Security Extensions) enhances DNS security by using cryptographic algorithms for zone signing and transaction security. It is essential to use strong and recommended algorithms for key signing. SHA-1 has been deprecated and requires Googles explicit approval and a support contract if used.",
"AdditionalInformation": "Using weak or outdated cryptographic algorithms compromises DNS integrity and exposes systems to threats like spoofing and hijacking. Organizations should ensure that DNSSEC settings use strong, recommended algorithms. If DNSSEC is already enabled and changes are needed, it must be disabled and re-enabled with updated configurations to apply the changes effectively.",
- "LevelOfRisk": 2
+ "LevelOfRisk": 3
}
]
},
@@ -918,7 +918,7 @@
"SubSection": "4.2 At-Rest",
"AttributeDescription": "Customer-Supplied Encryption Keys (CSEK) is a feature available in Google Cloud Storage and Google Compute Engine, allowing users to supply their own encryption keys. When you provide your key, Google uses it to protect the Google-generated keys that are responsible for encrypting and decrypting your data. By default, Google Compute Engine encrypts all data at rest automatically, managing this encryption for you with no additional action required. However, if you wish to have full control over the encryption process, you can choose to supply your own encryption keys.",
"AdditionalInformation": "By default, Compute Engine automatically encrypts all data at rest, with the service managing the encryption without any further input required from you or your application. However, if you require complete control over encryption, you have the option to provide your own encryption keys to manage the encryption of instance disks.",
- "LevelOfRisk": 5
+ "LevelOfRisk": 4
}
]
},
@@ -952,7 +952,7 @@
"SubSection": "4.2 At-Rest",
"AttributeDescription": "Ensure that BigQuery datasets are encrypted using Customer-Managed Keys (CMKs) to gain more granular control over the data encryption and decryption process.",
"AdditionalInformation": "For enhanced control over encryption, Customer-Managed Encryption Keys (CMEK) can be implemented as a key management solution for BigQuery datasets.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
},
@@ -969,7 +969,7 @@
"SubSection": "4.2 At-Rest",
"AttributeDescription": "Ensure that BigQuery tables are encrypted using Customer-Managed Keys (CMKs) for more granular control over the data encryption and decryption process.",
"AdditionalInformation": "For greater control over encryption, Customer-Managed Encryption Keys (CMEK) can be utilized as the key management solution for BigQuery tables.",
- "LevelOfRisk": 3
+ "LevelOfRisk": 4
}
]
}
diff --git a/prowler/providers/aws/services/efs/efs_multi_az_enabled/__int__.py b/prowler/compliance/github/__init__.py
similarity index 100%
rename from prowler/providers/aws/services/efs/efs_multi_az_enabled/__int__.py
rename to prowler/compliance/github/__init__.py
diff --git a/prowler/compliance/github/cis_1.0_github.json b/prowler/compliance/github/cis_1.0_github.json
new file mode 100644
index 0000000000..3f0037c9e0
--- /dev/null
+++ b/prowler/compliance/github/cis_1.0_github.json
@@ -0,0 +1,2591 @@
+{
+ "Framework": "CIS",
+ "Version": "1.0",
+ "Provider": "GitHub",
+ "Description": "This document provides prescriptive guidance for establishing a secure configuration posture for securing GitHub.",
+ "Requirements": [
+ {
+ "Id": "Id",
+ "Description": "Title",
+ "Checks": [
+ "Checks"
+ ],
+ "Attributes": [
+ {
+ "Section": "Attributes_Section",
+ "Profile": "Attributes_Level",
+ "AssessmentStatus": "Attributes_AssessmentStatus",
+ "Description": "Attributes_Description",
+ "RationaleStatement": "Attributes_RationaleStatement",
+ "ImpactStatement": "Attributes_ImpactStatement",
+ "RemediationProcedure": "Attributes_RemediationProcedure",
+ "AuditProcedure": "Attributes_AuditProcedure",
+ "AdditionalInformation": "Attributes_AdditionalInformation",
+ "References": "Attributes_References"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.1",
+ "Description": "Ensure any changes to code are tracked in a version control platform",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Manage all code projects in a version control platform.",
+ "RationaleStatement": "Version control platforms keep track of every modification to code. They represent the cornerstone of code security, as well as allowing for better code collaboration within engineering teams. With granular access management, change tracking, and key signing of code edits, version control platforms are the first step in securing the software supply chain.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Upload existing code projects to a dedicated Github organization and repositories and create an identity for each active team member who might contribute or need access to it.",
+ "AuditProcedure": "Ensure that all code activity is managed through Github repository for every micro-service or application developed by an organization.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.2",
+ "Description": "Ensure any change to code can be traced back to its associated task",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Use a task management system to trace any code back to its associated task.",
+ "RationaleStatement": "The ability to trace each piece of code back to its associated task simplifies the Agile and DevOps process by enabling transparency of any code changes. This allows faster remediation of bugs and security issues, while also making it harder to push unauthorized code changes to sensitive projects. Additionally, using a task management system simplifies achieving compliance, as it is easier to track each regulation.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Use a task management system to manage tasks as the starting point for each code change. Whether it is a new feature, bug fix, or security fix - all should originate from a dedicated task (ticket) in your organization's task management system. These tasks should also be linked to the code changes themselves in a way that is easy to follow: from code to task, and from task back to code.",
+ "AuditProcedure": "Ensure every code change can be traced back to its origin task in a task management system.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.3",
+ "Description": "Ensure any change to code receives approval of two strongly authenticated users",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Ensure that every code change is reviewed and approved by two authorized contributors who are both strongly authenticated - using Multi-Factor Authentication (MFA), from the team relevant to the code change.",
+ "RationaleStatement": "To prevent malicious or unauthorized code changes, the first layer of protection is the process of code review. This process involves engineer teammates reviewing each other's code for errors, optimizations, and general knowledge-sharing. With proper peer reviews in place, an organization can detect unwanted code changes very early in the process of release. In order to help facilitate code review, companies should employ automation to verify that every code change has been reviewed and approved by at least two team members before it is pushed into the code base. These team members should be from the team that is related to the code change, so it will be a meaningful review.",
+ "ImpactStatement": "To enforce a code review requirement, verification for a minimum of two reviewers must be put into place. This will ensure new code will not be able to be pushed to the code base before it has received two independent approvals.",
+ "RemediationProcedure": "For every code repository in use, perform the next steps to require two approvals from the specific code repository team in order to push new code to the code base:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you added the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Check **Require a pull request before merging** and **Require approvals**, and set **Required number of approvals before merging** to 2.\n 5. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For every code repository in use, perform the next steps to verify that two approvals from the specific code repository team are required to push new code to the code base:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Require a pull request before merging** and **Require approvals** are checked, and verify that **Required number of approvals before merging** is set to 2.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.4",
+ "Description": "Ensure previous approvals are dismissed when updates are introduced to a code change proposal",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure that when a proposed code change is updated, previous approvals are declined, and new approvals are required.",
+ "RationaleStatement": "An approval process is necessary when code changes are suggested. Through this approval process, however, changes can still be made to the original proposal even after some approvals have already been given. This means malicious code can find its way into the code base even if the organization has enforced a review policy. To ensure this is not possible, outdated approvals must be declined when changes to the suggestion are introduced.",
+ "ImpactStatement": "If new code changes are pushed to a specific proposal, all previously accepted code change proposals must be declined.",
+ "RemediationProcedure": "For each code repository in use, perform the next steps to enforce dismissal of given approvals to code change suggestions if those suggestions were updated:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you added the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Require pull request reviews before merging** and then **Dismiss stale pull request approvals when new commits are pushed**.\n 5. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For each code repository in use, perform the next steps to verify that each updated code suggestion declines the previously received approvals:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Require a pull request before merging** is checked, and verify that **Dismiss stale pull request approvals when new commits are pushed** is checked.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.5",
+ "Description": "Ensure there are restrictions on who can dismiss code change reviews",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Only trusted users should be allowed to dismiss code change reviews.",
+ "RationaleStatement": "Dismissing a code change review permits users to merge new suggested code changes without going through the standard process of approvals. Controlling who can perform this action will prevent malicious actors from simply dismissing the required reviews to code changes and merging malicious or dysfunctional code into the code base.",
+ "ImpactStatement": "In cases where a code change proposal has been updated since it was last reviewed and the person who reviewed it isn't available for approval, a general collaborator would not be able to merge their code changes until a user with \"dismiss review\" abilities could dismiss the open review.\n \n\n Users who are not allowed to dismiss code change reviews will not be permitted to do so, and thus are unable to waive the standard flow of approvals.",
+ "RemediationProcedure": "For each code repository in use, perform the next steps to restrict dismissal of code changes reviews unless it is necessary:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you added the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 4. Select **Require pull request reviews before merging** and **Restrict who can dismiss pull request reviews**.\n 5. Do not add any user or team unless it is obligatory. If it is obligatory, carefully select the users or teams whom you trust with the ability to dismiss code change reviews.\n 6. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For each code repository in use, perform the next steps to verify that only trusted users are allowed to dismiss code change reviews: \n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 4. Verify that **Require a pull request before merging** and **Restrict who can dismiss pull request reviews** is checked.\n 5. Verify that no users and teams are specified except for organization and repository admins. If it is obligatory, verify that the users or teams specified were carefully selected to be trusted with the ability to dismiss code change reviews.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.6",
+ "Description": "Ensure code owners are set for extra sensitive code or configuration",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Code owners are trusted users that are responsible for reviewing and managing an important piece of code or configuration. An organization is advised to set code owners for every extremely sensitive code or configuration.",
+ "RationaleStatement": "Configuring code owners protects data by verifying that trusted users will notice and review every edit, thus preventing unwanted or malicious changes from potentially compromising sensitive code or configurations.",
+ "ImpactStatement": "Code owner users will receive notifications for every change that occurs to the code and subsequently added as reviewers of pull requests automatically.",
+ "RemediationProcedure": "In every code repository create a CODEOWNERS file in the root, docs/, or .github/ directory of the repository.\n In the file, specify codeowners for the .github/workflows/ directory atleast. Specify organization members you trust. For example:\n ```\n .github/workflows/ @user1 @user2\n ```",
+ "AuditProcedure": "In every code repository, verify that a file named CODEOWNERS exists in the root, docs/, or .github/ directory of the repository.\n In the CODEOWNERS file, verify that the users specified are users you trust.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.7",
+ "Description": "Ensure code owner's review is required when a change affects owned code",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure trusted code owners are required to review and approve any code change proposal made to their respective owned areas in the code base.",
+ "RationaleStatement": "Configuring code owners ensures that no code, especially code which could prove malicious, will slip into the source code or configuration files of a repository. This allows an organization to mark areas in the code base that are especially sensitive or more prone to an attack. It can also enforce review by specific individuals who are designated as owners to those areas so that they may filter out unauthorized or unwanted changes beforehand.",
+ "ImpactStatement": "If an organization enforces code owner-based reviews, some code change proposals would not be able to be merged to the codebase before specific, trusted individuals approve them.",
+ "RemediationProcedure": "For every code repository in use, perform the following steps to require code owners' approvals for each change proposal related to code they own:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Require pull request reviews before merging** and **Require review from Code Owners**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For every code repository in use, perform the following steps to verify that code owners are required to review all code change proposals relevant to areas they own before code merge:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 4. Ensure that **Require a pull request before merging** and **Require review from Code Owners** are checked.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.8",
+ "Description": "Ensure inactive branches are periodically reviewed and removed",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Keep track of code branches that are inactive for a lengthy period of time and periodically remove them.",
+ "RationaleStatement": "Git branches that have been inactive (i.e., no new changes introduced) for a long period of time are enlarging the surface of attack for malicious code injection, sensitive data leaks, and CI pipeline exploitation. They potentially contain outdated dependencies which may leave them highly vulnerable. They are more likely to be improperly managed, and could possibly be accessed by a large number of members of the organization.",
+ "ImpactStatement": "Removing inactive Git branches means that any code changes they contain would be removed along with them, thus work done in the past might not be accessible after auditing for inactivity.",
+ "RemediationProcedure": "For each code repository in use, review existing Git branches and remove those which have not been active for a period of time by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Above the list of files, click **Branches**.\n 3. Use the navigation at the top of the page to view the Stale branches. The Stale view shows all branches that no one has committed to in the last three months, ordered by the branches with the oldest commits first.\n 4. For each branch listed, either delete it by clicking the trash bin icon, or find the valid reason it still exists.\n \n\n You can perform the next steps to prevent pull request branches from becoming stale branches:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click Settings.\n 3. Under \"Pull Requests\", select **Automatically delete head branches**.",
+ "AuditProcedure": "For each code repository in use, verify that all existing Git branches are active or have yet to be checked for inactivity by performing the next steps:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Above the list of files, click **Branches**.\n 3. Use the navigation at the top of the page to view the Stale branches. The Stale view shows all branches that no one has committed to in the last three months, ordered by the branches with the oldest commits first.\n 4. If the list is empty, you are compliant. If the list is not empty, but there is a valid reason the branches listed are not deleted, you are compliant.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.9",
+ "Description": "Ensure all checks have passed before merging new code",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Before a code change request can be merged to the code base, all predefined checks must successfully pass.",
+ "RationaleStatement": "On top of manual reviews of code changes, a code protect should contain a set of prescriptive checks which validate each change. Organizations should enforce those status checks so that changes can only be introduced if all checks have successfully passed. This set of checks should serve as the absolute quality, stability, and security conditions which must be met in order to merge new code to a project.",
+ "ImpactStatement": "Code changes in which all checks do not pass successfully would not be able to be pushed into the code base of the specific code repository.",
+ "RemediationProcedure": "For each code repository in use, require all status checks to pass before permitting a merge of new code by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", check if there is a rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Require status checks to pass before merging**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For each code repository in use, verify that status checks are required to pass before allowing any code change proposal merge by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Require status checks to pass before merging** is checked.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.10",
+ "Description": "Ensure open Git branches are up to date before they can be merged into code base",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Organizations should make sure each suggested code change is in full sync with the existing state of its origin code repository before allowing merging.",
+ "RationaleStatement": "Git branches can easily become outdated since the origin code repository is constantly being edited. This means engineers working on separate code branches can accidentally include outdated code with potential security issues which might have already been fixed, overriding the potential solutions for those security issues when merging their own changes.",
+ "ImpactStatement": "If enforced, outdated branches would not be able to be merged into their origin repository without first being updated to contain any recent changes.",
+ "RemediationProcedure": "For each code repository in use, enforce a policy to only allow merging open branches if they are current with the latest change from their original repository by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Require status checks to pass before merging** and **Require branches to be up to date before merging**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For each code repository in use, verify that open branches must be updated before merging is permitted by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Require status checks to pass before merging** and **Require branches to be up to date before merging** are checked.",
+ "AdditionalInformation": "",
+ "References": "https://github.blog/changelog/2022-02-03-more-ways-to-keep-your-pull-request-branch-up-to-date/"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.11",
+ "Description": "Ensure all open comments are resolved before allowing code change merging",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Organizations should enforce a \"no open comments\" policy before allowing code change merging.",
+ "RationaleStatement": "In an open code change proposal, reviewers can leave comments containing their questions and suggestions. These comments can also include potential bugs and security issues. Requiring all comments on a code change proposal to be resolved before it can be merged ensures that every concern is properly addressed or acknowledged before the new code changes are introduced to the code base.",
+ "ImpactStatement": "Code change proposals containing open comments would not be able to be merged into the code base.",
+ "RemediationProcedure": "For each code repository in use, require open comments to be resolved before the relevant code change can be merged by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Require conversation resolution before merging**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For every code repository in use, verify that each merged code change does not contain open, unattended comments by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Require conversation resolution before merging** is checked.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.12",
+ "Description": "Ensure verification of signed commits for new changes before merging",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure every commit in a pull request is signed and verified before merging.",
+ "RationaleStatement": "Signing commits, or requiring to sign commits, gives other users confidence about the origin of a specific code change. It ensures that the author of the change is not hidden and is verified by the version control system, thus the change comes from a trusted source.",
+ "ImpactStatement": "Pull requests with unsigned commits cannot be merged.",
+ "RemediationProcedure": "For each repository in use, enforce the branch protection rule of requiring signed commits, and make sure only signed commits are capable of merging by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Require signed commits**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "Ensure only signed commits can be merged for every branch, especially the main branch, via branch protection rules by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Require signed commits** is checked.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.13",
+ "Description": "Ensure linear history is required",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Linear history is the name for Git history where all commits are listed in chronological order, one after another. Such history exists if a pull request is merged either by rebase merge (re-order the commits history) or squash merge (squashes all commits to one). Ensure that linear history is required by requiring the use of rebase or squash merge when merging a pull request.",
+ "RationaleStatement": "Enforcing linear history produces a clear record of activity, and as such it offers specific advantages: it is easier to follow, easier to revert a change, and bugs can be found more easily.",
+ "ImpactStatement": "Pull request cannot be merged except squash or rebase merge.",
+ "RemediationProcedure": "For every code repository in use, perform the following steps to require linear history and/or allow only rebase merge and squash merge:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Require linear history**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For every code repository in use, perform the following steps to verify that linear history is required and/or that only squash merge and rebase merge are allowed:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Require linear history** is checked.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.14",
+ "Description": "Ensure branch protection rules are enforced for administrators",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure administrators are subject to branch protection rules.",
+ "RationaleStatement": "Administrators by default are excluded from any branch protection rules. This means these privileged users (both on the repository and organization levels) are not subject to protections meant to prevent untrusted code insertion, including malicious code. This is extremely important since administrator accounts are often targeted for account hijacking due to their privileged role.",
+ "ImpactStatement": "Administrator users won't be able to push code directly to the protected branch without being compliant with listed branch protection rules.",
+ "RemediationProcedure": "For every code repository in use, enforce branch protection rules on administrators as well, by performing the following:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Do not allow bypassing the above settings**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For every code repository in use, validate branch protection rules also apply to administrator accounts by performing the next steps:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Do not allow bypassing the above settings** is checked.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.15",
+ "Description": "Ensure pushing or merging of new code is restricted to specific individuals or teams",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure that only trusted users can push or merge new code to protected branches.",
+ "RationaleStatement": "Requiring that only trusted users may push or merge new changes reduces the risk of unverified code, especially malicious code, to a protected branch by reducing the number of trusted users who are capable of doing such.",
+ "ImpactStatement": "Only administrators and trusted users can push or merge to the protected branch.",
+ "RemediationProcedure": "For every code repository in use, allow only trusted and responsible users to push or merge new code by performing the following:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4.Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Select **Restrict who can push to matching branches** and choose trusted and responsible users and teams who will have the permission to do so. \n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For every code repository in use, ensure only trusted and responsible users can push or merge new code by performing the following:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Restrict who can push to matching branches** is checked and that only trusted and responsible users and teams are selected.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.16",
+ "Description": "Ensure force push code to branches is denied",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "The \"Force Push\" option allows users with \"Push\" permissions to force their changes directly to the branch without a pull request, and thus should be disabled.",
+ "RationaleStatement": "The \"Force Push\" option allows users to override the existing code with their own code. This can lead to both intentional and unintentional data loss, as well as data infection with malicious code. Disabling the \"Force Push\" option prohibits users from forcing their changes to the master branch, which ultimately prevents malicious code from entering source code.",
+ "ImpactStatement": "Users cannot force push to protected branches.",
+ "RemediationProcedure": "For each repository in use, block the option to \"Force Push\" code by performing the following: \n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Uncheck **Allow force pushes**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For every code repository in use, validate that no one can force push code by performing the following:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Allow force pushes** is not checked.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.17",
+ "Description": "Ensure branch deletions are denied",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure that users with only push access are incapable of deleting a protected branch.",
+ "RationaleStatement": "When enabling deletion of a protected branch, any user with at least push access to the repository can delete a branch. This can be potentially dangerous, as a simple human mistake or a hacked account can lead to data loss if a branch is deleted. It is therefore crucial to prevent such incidents by denying protected branch deletion.",
+ "ImpactStatement": "Protected branches cannot be deleted.",
+ "RemediationProcedure": "For each repository that is being used, block the option to delete protected branches by performing the following:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, click **Add rule**.\n 5. If you add the rule, under \"Branch name pattern\", type the branch name or pattern you want to protect.\n 6. Uncheck **Allow deletions**.\n 7. Click **Create** or **Save changes**.",
+ "AuditProcedure": "For each repository that is being used, verify that protected branches cannot be deleted by performing the following:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", verify that there is at least one rule for your main branch. If there is, click **Edit** to its right. If there isn't, you are not compliant.\n 5. Ensure that **Allow deletions** is not checked.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.18",
+ "Description": "Ensure any merging of code is automatically scanned for risks",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure that every pull request is required to be scanned for risks.",
+ "RationaleStatement": "Scanning pull requests to detect risks allows for early detection of vulnerable code and/or dependencies and helps mitigate potentially malicious code.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every repository in use, enforce risk scanning on every pull request by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Actions**.\n 3. If the repository already has at least one workflow set up and running, click **New workflow** and go to step 5. If there are currently no workflows configured for the repository, go to the next step.\n 4. Scroll down to the \"Security\" category and click **Configure** under the workflow you want to configure or click **View all** to see all available security workflows.\n 5. On the right pane of the workflow page, click **Documentation** and follow the on-screen instructions to tailor the workflow to your needs.",
+ "AuditProcedure": "For each repository in use, ensure that every pull request must be scanned for risks by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Actions**.\n 3. Ensure that at least one workflow is configured to run like that: \n ```\n on:\n push:\n branches: [ \"main\" ]\n pull_request:\n branches: [ \"main\" ]\n ```\n and that it has a step that runs code scanning on the code.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.1.19",
+ "Description": "Ensure any changes to branch protection rules are audited",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure that changes in the branch protection rules are audited.",
+ "RationaleStatement": "Branch protection rules should be configured on every repository. The only users who may change such rules are administrators. In a case of an attack on an administrator account or of human error on the part of an administrator, protection rules could be disabled, and thus decrease source code confidentiality as a result. It is important to track and audit such changes to prevent potential incidents as soon as possible.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Use the audit log to audit changes in branch protection rules by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Archives\" section of the sidebar, click **Logs**, then click **Audit log**.\n 4. Use the action qualifier in your query and look for **protected_branch** category. Ensure every action is reasonable and secure and investigate if not.",
+ "AuditProcedure": "Ensure changes in branch protection rules are audited by performing the following regularly:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Archives\" section of the sidebar, click **Logs**, then click **Audit log**.\n 4. Use the action qualifier in your query and look for **protected_branch** category. Ensure every action is reasonable and secure and is investigated if not.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches"
+ }
+ ]
+ },
+ {
+ "Id": "1.1.20",
+ "Description": "Ensure branch protection is enforced on the default branch",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Enforce branch protection on the default and main branch.",
+ "RationaleStatement": "The default or main branch of repositories is considered very important, as it is eventually gets deployed to the production. Therefore it needs protection. By enforcing branch protection rules on this branch, it is secured from unwanted or unauthorized changes. It can also be protected from untested and unreviewed changes and more.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Perform the following to enforce branch protection on the main branch:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Next to \"Branch protection rules\", click **Add rule**.\n 5. Under \"Branch name pattern\", type the branch name or pattern you want to protect. Ensure it applies to the main branch name.\n 6. Configure policies you want.\n 7. Click Create.",
+ "AuditProcedure": "Perform the following to ensure branch protection is enforced on the main branch:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Code and automation\" section of the sidebar, click **Branches**.\n 4. Under **Branch protection rules**, verify that there is a rule applied to the \"main\" or default branch.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.2.1",
+ "Description": "Ensure all public repositories contain a SECURITY.md file",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "A SECURITY.md file is a security policy file that offers instruction on reporting security vulnerabilities in a project. When someone creates an issue within a specific project, a link to the SECURITY.md file will subsequently be shown.",
+ "RationaleStatement": "A SECURITY.md file provides users with crucial security information. It can also serve an important role in project maintenance, encouraging users to think ahead about how to properly handle potential security issues, updates, and general security practices.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Enforce that each public repository has a SECURITY.md file by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under the repository name, click **Security**.\n 3. In the left sidebar, click **Security policy**.\n 4. Click **Start setup**.\n 5. In the new SECURITY.md file, add information about supported versions of your project and how to report a vulnerability.\n 6. At the bottom of the page, type a commit message.\n 7. Below the commit message fields, choose to create a new branch for your commit and then create a pull request.\n 8. Click **Propose file change**.",
+ "AuditProcedure": "Verify that each public repository has a SECURITY.md file by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under the repository name, click **Security**.\n 3. Verify that **Security policy** is enabled.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.2.2",
+ "Description": "Ensure repository creation is limited to specific members",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Limit the ability to create repositories to trusted users and teams.",
+ "RationaleStatement": "Restricting repository creation to trusted users and teams is recommended in order to keep the organization properly structured, track fewer items, prevent impersonation, and to not overload the version-control system. It will allow administrators easier source code tracking and management capabilities, as they will have fewer repositories to track. The process of detecting potential attacks also becomes far more straightforward, as well, since the easier it is to track the source code, the easier it is to detect malicious acts within it. Additionally, the possibility of a member creating a public repository and sharing the organization's data externally is significantly decreased.",
+ "ImpactStatement": "Specific users will not be permitted to create repositories.",
+ "RemediationProcedure": "Restrict repository creation to trusted users and teams only by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Access\" section of the sidebar, click **Member privileges**.\n 4. Under \"Repository creation\", unselect both options - **Public** and **Private**.\n 5. Click **Save**.",
+ "AuditProcedure": "Verify that only trusted users and teams can create repositories by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Access\" section of the sidebar, click **Member privileges**.\n 4. Under \"Repository creation\", ensure that **Public** and **Private** are not checked. This means only owners are able to create repositories.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.2.3",
+ "Description": "Ensure repository deletion is limited to specific users",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure only a limited number of trusted users can delete repositories.",
+ "RationaleStatement": "Restricting the ability to delete repositories protects the organization from intentional and unintentional data loss. This ensures that users cannot delete repositories or cause other potential damage — whether by accident or due to their account being hacked — unless they have the correct privileges.",
+ "ImpactStatement": "Certain users will not be permitted to delete repositories.",
+ "RemediationProcedure": "Enforce repository deletion by a few trusted and responsible users only by performing either of the following steps:\n \n\n If Your organizations > Settings > Access > Member privileges > Allow members to delete or transfer repositories for this organization is selected, allow only trusted members to have admin privileges:\n 1. In every repository, on GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings** and then in the \"Access\" section of the sidebar, click **Collaborators & teams**.\n 3. Under \"Manage access\" use the dropdown **Role** menu to filter and search for admin members. Change their role by clicking the **Role** dropdown next to the username until there are only two trusted and qualified users with admin privileges. \n \n\n If it is not selected, allow only trusted users to become an organization owner:\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Click the name of your organization and under your organization name, click **People**.\n 3. You will see a list of the people in your organization. Click Role and select Owners. Check every member you want to change permissions to. Above the list of members, use the drop-down menu and click Change role and choose Member > change role. Do that until there are only a few trusted and qualified users with organization owner privileges. \n \n\n In any case, only members with administrator or organization owner privileges can delete repositories, regardless of your setting.",
+ "AuditProcedure": "Verify that only a limited number of trusted users can delete repositories by performing either of the following steps:\n \n\n If Your organizations > Settings > Access > Member privileges > Allow members to delete or transfer repositories for this organization is selected, verify that every admin member is trusted by you:\n 1. In every repository, on GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings** and then in the \"Access\" section of the sidebar, click **Collaborators & teams**.\n 3. Under \"Manage access\" use the dropdown **Role** menu to filter and search for admin members. Verify that there are only two of them and that they are trusted and qualified. \n \n\n If it is not selected, verify that every organization owner is trusted by you:\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Click the name of your organization and under your organization name, click **People**.\n 3. You will see a list of the people in your organization. Click Role and select Owners. Verify that there are only a few of them and that they are trusted and qualified. \n \n\n In any case, only members with administrator or organization owner privileges can delete repositories, regardless of your setting.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.2.4",
+ "Description": "Ensure issue deletion is limited to specific users",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure only trusted and responsible users can delete issues.",
+ "RationaleStatement": "Issues are a way to keep track of things happening in repositories, such as setting new milestones or requesting urgent fixes. Deleting an issue is not a benign activity, as it might harm the development workflow or attempt to hide malicious behavior. Because of this, it should be restricted and allowed only by trusted and responsible users.",
+ "ImpactStatement": "Certain users will not be permitted to delete issues.",
+ "RemediationProcedure": "Restrict issue deletion to a few trusted and responsible users only by performing either of the following steps:\n \n\n If Your organizations > Settings > Access > Member privileges > Allow members to delete issues for this organization is selected, allow only trusted members to have admin privileges:\n 1. In every repository, on GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings** and then in the \"Access\" section of the sidebar, click **Collaborators & teams**.\n 3. Under \"Manage access\" use the dropdown **Role** menu to filter and search for admin members. Change their role by clicking the **Role** dropdown next to the username until there are only two trusted and qualified users with admin privileges.\n \n\n If it is not selected, allow only trusted users to become an organization owner:\n 1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations.\n 2. Click the name of your organization and under your organization name, click **People**.\n 3. You will see a list of the people in your organization. Click **Role** and select **Owners**. Check every member you want to change permissions to. Above the list of members, use the drop-down menu and click **Change role** and choose Member > change role. Do that until there are only a few trusted and qualified users with organization owner privileges.\n \n\n In any case, only members with administrator or organization owner privileges can delete issues, regardless of your setting.",
+ "AuditProcedure": "Verify that only a limited number of trusted users can delete issues by performing either of the following steps:\n \n\n If Your organizations > Settings > Access > Member privileges > Allow members to delete issues for this organization is selected, verify that every admin member is trusted by you:\n 1. In every repository, on GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings** and then in the \"Access\" section of the sidebar, click **Collaborators & teams**.\n 3. Under \"Manage access\" use the dropdown **Role** menu to filter and search for admin members. Verify that there are only two of them and that they are trusted and qualified.\n \n\n If it is not selected, verify that every organization owner is trusted by you:\n 1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations.\n 2. Click the name of your organization and under your organization name, click **People**.\n 3. You will see a list of the people in your organization. Click **Role** and select **Owners**. Verify that there are only a few of them and that they are trusted and qualified.\n \n\n In any case, only members with administrator or organization owner privileges can delete issues, regardless of your setting.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.2.5",
+ "Description": "Ensure all copies (forks) of code are tracked and accounted for",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Track every fork of code and ensure it is accounted for.",
+ "RationaleStatement": "A fork is a copy of a repository. On top of being a plain copy, any updates to the original repository itself can be pulled and reflected by the fork under certain conditions. A large number of repository copies (forks) become difficult to manage and properly secure. New and sensitive changes can often be pushed into a critical repository without developer knowledge of an updated copy of the very same repository. If there is no limit on doing this, then it is recommended to track and delete copies of organization repositories as needed.",
+ "ImpactStatement": "Disabling forks completely may slow down the development process as more actions will be necessary to take in order to fork a repository.",
+ "RemediationProcedure": "Track forks and examine them by performing the following on a regular basis:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Insights**.\n 3. In the left sidebar, click **Forks**.\n 4. Examine the forks listed there.",
+ "AuditProcedure": "Verify that the following steps are done regularly to track and examine forks:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Insights**.\n 3. In the left sidebar, click **Forks**.\n 4. Examine the forks listed there.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.2.6",
+ "Description": "Ensure all code projects are tracked for changes in visibility status",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure every change in visibility of projects is tracked.",
+ "RationaleStatement": "Visibility of projects determines who can access a project and/or fork it: anyone, designated users, or only members of the organization. If a private project becomes public, this may point to a potential attack, which can ultimately lead to data loss, the leaking of sensitive information, and finally to a supply chain attack. It is crucial to track these changes in order to prevent such incidents.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Track every change in project visibility and investigate if suspicious behavior occurs, by performing the following regularly:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Archives\" section of the sidebar, click **Logs**, then click **Audit log**.\n 4. Use the **repo** qualifier in your query and look for **access** category. Ensure every change is reasonable and secure and investigate if it is not.",
+ "AuditProcedure": "Ensure that every change in project visibility is tracked and investigated, by performing the following regularly:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Archives\" section of the sidebar, click **Logs**, then click **Audit log**.\n 4. Use the **repo** qualifier in your query and look for **access** category. Ensure every change is reasonable and secure and is investigated if it is not.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.2.7",
+ "Description": "Ensure inactive repositories are reviewed and archived periodically",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Track inactive repositories and remove them periodically.",
+ "RationaleStatement": "Inactive repositories (i.e., no new changes introduced for a long period of time) can enlarge the surface of a potential attack or data leak. These repositories are more likely to be improperly managed, and thus could possibly be accessed by a large number of users in an organization.",
+ "ImpactStatement": "Bug fixes and deployment of necessary changes could prove complicated for archived repositories.",
+ "RemediationProcedure": "Perform the following to review all inactive repositories and archive them periodically:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Click on your organization name and then on **repositories**.\n 3. Ensure every repository listed has been active in the last 3 to 6 months. Every repository that isn't active you should either review or archive by performing the next steps:\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. Under \"Danger Zone\", click **Archive this repository**.\n 4. Read the warnings.\n 5. Type the name of the repository you want to archive.\n 6. Click **I understand the consequences, archive this repository**.",
+ "AuditProcedure": "Perform the following to ensure that all the repositories in the organization are active, and those that are not reviewed or archived:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Click on your organization name and then on **repositories**.\n 3. Ensure every repository listed has been active in the last 3 to 6 months. If it's not, then ensure it is archived or reviewed regularly.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.1",
+ "Description": "Ensure inactive users are reviewed and removed periodically",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Track inactive user accounts and periodically remove them.",
+ "RationaleStatement": "User accounts that have been inactive for a long period of time are enlarging the surface of attack. Inactive users with high-level privileges are of particular concern, as these accounts are more likely to be targets for attackers. This could potentially allow access to large portions of an organization should such an attack prove successful. It is recommended to remove them as soon as possible in order to prevent this.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "If you have GitHub AE, perform the following to review inactive user accounts and remove them:\n \n\n 1. From an administrative account on GitHub AE, in the upper-right corner of any page, click the rocket icon.\n 2. If you're not already on the \"Site admin\" page, in the upper-left corner, click **Site admin**.\n 3. In the left sidebar, click **Dormant users**.\n 4. Find the users listed there under **Your organizations** > your organization > **People** and select them.\n 5. Click **Remove from organization** and **Remove members**.\n \n\n If you have GitHub Enterprise Cloud, perform the following:\n \n\n 1. In the top-right corner of GitHub.com, click your profile photo, then click **Your enterprises**.\n 2. In the list of enterprises, click the enterprise you want to view.\n 3. In the enterprise account sidebar, click **Compliance**.\n 4. To download your Dormant Users (beta) report as a CSV file, under \"Other\", click **Download**.\n 5. Find the users listed in the file under **Your organizations** > your organization > **People** and select them.\n 6. Click **Remove from organization** and **Remove members**.",
+ "AuditProcedure": "If you have GitHub AE, verify that all user accounts are active by performing the following:\n \n\n 1. From an administrative account on GitHub AE, in the upper-right corner of any page, click the rocket icon.\n 2. If you're not already on the \"Site admin\" page, in the upper-left corner, click **Site admin**.\n 3. In the left sidebar, click **Dormant users**.\n 4. Verify that the list is empty.\n \n\n If you have GitHub Enterprise Cloud, perform the following:\n \n\n 1. In the top-right corner of GitHub.com, click your profile photo, then click **Your enterprises**.\n 2. In the list of enterprises, click the enterprise you want to view.\n 3. In the enterprise account sidebar, click **Compliance**.\n 4. To download your Dormant Users (beta) report as a CSV file, under \"Other\", click **Download**.\n 5. Verify that there are no users listed.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.2",
+ "Description": "Ensure team creation is limited to specific members",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Limit ability to create teams to trusted and specific users.",
+ "RationaleStatement": "The ability to create new teams should be restricted to specific members in order to keep the organization orderly and ensure users have access to only the lowest privilege level necessary. Teams typically inherit permissions from their parent team, thus if base permissions are less restricted and any user has the ability to create a team, a permission leverage could occur in which certain data is made available to users who should not have access to it. Such a situation could potentially lead to the creation of shadow teams by an attacker. Restricting team creation will also reduce additional clutter in the organizational structure, and as a result will make it easier to track changes and anomalies.",
+ "ImpactStatement": "Only specific users will be able to create new teams.",
+ "RemediationProcedure": "For every organization, limit team creation to specific, trusted users by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Access\" section of the sidebar, click **Member privileges**.\n 4. Under \"Team creation rules\", deselect **Allow members to create teams**.\n 5. Click **Save**.",
+ "AuditProcedure": "For every organization, ensure that team creation is limited to specific, trusted users by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Access\" section of the sidebar, click **Member privileges**.\n 4. Under \"Team creation rules\", verify that **Allow members to create teams** is not selected.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.3",
+ "Description": "Ensure minimum number of administrators are set for the organization",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure the organization has a minimum number of administrators.",
+ "RationaleStatement": "Organization administrators have the highest level of permissions, including the ability to add/remove collaborators, create or delete repositories, change branch protection policy, and convert to a publicly-accessible repository. Due to the permissive access granted to an organization administrator, it is highly recommended to keep the number of administrator accounts as minimal as possible.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set the minimum number of administrators in your organization by performing the following:\n \n\n 1. In the top right corner of GitHub, click your profile photo, then click **Your profile**.\n 2. On the left side of your profile page, under \"Organizations\", click the icon for your organization.\n 3. Under your organization name, click **People**. \n 4. In the Role drop-down, choose **Owners**.\n 5. Select the person or people you'd like to remove from owner role.\n 6. Above the list of members, use the drop-down menu and click Change role.\n 7. Select **Member**, then click **Change role**.",
+ "AuditProcedure": "Verify the minimum number of administrators in your organization by performing the following:\n \n\n 1. In the top right corner of GitHub, click your profile photo, then click **Your profile**.\n 2. On the left side of your profile page, under \"Organizations\", click the icon for your organization.\n 3. Under your organization name, click **People**. \n 4. In the Role drop-down, choose **Owners**.\n 5. If there are minimum number of members in the list, you are compliant.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.4",
+ "Description": "Ensure Multi-Factor Authentication (MFA) is required for contributors of new code",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Require collaborators from outside the organization to use Multi-Factor Authentication (MFA) in addition to a standard user name and password when authenticating to the source code management platform.",
+ "RationaleStatement": "By default every user authenticates within the system by password only. If the password of a user is compromised, however, the user account and every repository to which they have access are in danger of data loss, malicious code commits, and data theft. It is therefore recommended that each user has Multi-Factor Authentication enabled. This adds an additional layer of protection to ensure the account remains secure even if the user's password is compromised.",
+ "ImpactStatement": "A member without enabled Multi-Factor Authentication cannot contribute to the project. They must enable Multi-Factor Authentication a before they can contribute any code.",
+ "RemediationProcedure": "For each repository in use, enforce Multi-Factor Authentication is the only way to authenticate for contributors, by doing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Authentication security**.\n 4. Under \"Authentication\", select **Require two-factor authentication for everyone in your organization**, then click **Save**.",
+ "AuditProcedure": "For each repository in use, verify that Multi-Factor Authentication is enforced for contributors and is the only way to authenticate, by doing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Authentication security**.\n 4. Under \"Authentication\", check if **Require two-factor authentication for everyone in your organization** is checked. If so, you are compliant.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.5",
+ "Description": "Ensure the organization is requiring members to use Multi-Factor Authentication (MFA)",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Require members of the organization to use Multi-Factor Authentication (MFA) in addition to a standard user name and password when authenticating to the source code management platform.",
+ "RationaleStatement": "By default every user authenticates within the system by password only. If the password of a user is compromised, however, the user account and every repository to which they have access are in danger of data loss, malicious code commits, and data theft. It is therefore recommended that each user has Multi-Factor Authentication enabled. This adds an additional layer of protection to ensure the account remains secure even if the user's password is compromised.",
+ "ImpactStatement": "Members will be removed from the organization if they don't have Multi-Factor Authentication already enabled. If this is the case, it is recommended that an invitation be sent to reinstate the user's access and former privileges. They must enable Multi-Factor Authentication to accept the invitation.",
+ "RemediationProcedure": "For every organization that exists in your GitHub platform, enforce Multi-Factor Authentication and define it as the only way to authenticate, by doing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Authentication security**.\n 4. Under \"Authentication\", select **Require two-factor authentication for everyone in your organization**, then click **Save**.\n 5. If prompted, read the information about members and outside collaborators who will be removed from the organization. Type your organization's name to confirm the change, then click **Remove members & require two-factor authentication**.",
+ "AuditProcedure": "For every organization that exists in your GitHub platform, verify that Multi-Factor Authentication is enforced and is the only way to authenticate, by doing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Authentication security**.\n 4. Under \"Authentication\", check if **Require two-factor authentication for everyone in your organization** is checked. If so, you are compliant.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.6",
+ "Description": "Ensure new members are required to be invited using company-approved email",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Existing members of an organization can invite new members to join, however new members must only be invited with their company-approved email.",
+ "RationaleStatement": "Ensuring new members of an organization have company-approved email prevents existing members of the organization from inviting arbitrary new users to join. Without this verification, they can invite anyone who is using the organization's version control system or has an active email account, thus allowing outside users (and potential threat actors) to easily gain access to company private code and resources. This practice will subsequently reduce the chance of human error or typos when inviting a new member.",
+ "ImpactStatement": "Existing members would not be able to invite new users who do not have a company-approved email address.",
+ "RemediationProcedure": "For each organization, allow only users with company-approved email to be invited. If a user was invited without company-approved email, perform the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Click the name of your organization and under your organization name, click **People**.\n 3. On the People tab, click **Invitations**. Next to the username or email address of the person whose invitation you'd like to cancel, click **Edit invitation**.\n 4. To cancel the user's invitation to join your organization, click **Cancel invitation**.",
+ "AuditProcedure": "For each organization in use, verify for every invitation that the invited email address is company-approved by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Click the name of your organization and under your organization name, click **People**.\n 3. On the People tab, click **Invitations**. Verify that each invitation email is company approved by your company.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.7",
+ "Description": "Ensure two administrators are set for each repository",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure every repository has two users with administrative permissions.",
+ "RationaleStatement": "Repository administrators have the highest permissions to said repository. These include the ability to add/remove collaborators, change branch protection policy, and convert to a publicly-accessible repository. Due to the liberal access granted to a repository administrator, it is highly recommended that only two contributors occupy this role.",
+ "ImpactStatement": "Removing administrative users from a repository would result in them losing high-level access to that repository.",
+ "RemediationProcedure": "For every repository in use, set two administrators by performing the following:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Access\" section of the sidebar, click **Collaborators & teams**.\n 4. Under **Manage access**, find the team or person whose you'd like to revoke admin permissions, then select the Role drop-down and click a new role.",
+ "AuditProcedure": "For every repository in use, verify there are two administrators by performing the following:\n \n\n 1. On GitHub, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Access\" section of the sidebar, click **Collaborators & teams**.\n 4. Under **Manage access**, verify that there are only 2 members with Admin permission.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.8",
+ "Description": "Ensure strict base permissions are set for repositories",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Base permissions define the permission level automatically granted to all organization members. Define strict base access permissions for all of the repositories in the organization, including new ones.",
+ "RationaleStatement": "Defining strict base permissions is the best practice in every role-based access control (RBAC) system. If the base permission is high — for example, \"write\" permission — every member of the organization will have \"write\" permission to every repository in the organization. This will apply regardless of the specific permissions a user might need, which generally differ between organization repositories. The higher the permission, the higher the risk for incidents such as bad code commit or data breach. It is therefore recommended to set the base permissions to the strictest level possible.",
+ "ImpactStatement": "Users might not be able to access organization repositories or perform some acts as commits. These specific permissions should be granted individually for each user or team, as needed.",
+ "RemediationProcedure": "Set strict base permissions for the organization repositories with the next steps:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Access\" section of the sidebar, click **Member privileges**.\n 4. Under \"Base permissions\", use the drop-down to select new base permissions - \"Read\" or \"None\".\n 5. Review the changes. To confirm, click **Change default permission to PERMISSION**.",
+ "AuditProcedure": "Verify that strict base permissions are set for the organization repositories by doing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Access\" section of the sidebar, click **Member privileges**.\n 4. Under \"Base permissions\", verify that it is set to \"Read\" or \"None\". If it does, you are compliant.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.9",
+ "Description": "Ensure an organization’s identity is confirmed with a “Verified” badge",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Confirm the domains an organization owns with a \"Verified\" badge.",
+ "RationaleStatement": "Verifying the organization's domain gives developers assurance that a given domain is truly the official home for a public organization. Attackers can pretend to be an organization and steal information via a faked/spoof domain, therefore the use of a \"Verified\" badge instills more confidence and trust between developers and the open-source community.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Only if you have an enterprise account, verify the organization's domains and secure a \"Verified\" badge next to its name by performing the following:\n \n\n 1. In the top-right corner of GitHub.com, click your profile photo, then click **Your enterprises**.\n 2. In the list of enterprises, click the enterprise you want to view. Then in the enterprise account sidebar, click **Settings**.\n 3. Under \"Settings\", click **Verified & approved domains**.\n 4. Click **Add a domain**.\n 5. In the domain field, type the domain you'd like to verify, then click **Add domain**.\n 6. Follow the instructions under **Add a DNS TXT record** to create a DNS TXT record with your domain hosting service. Wait for your DNS configuration to change, which may take up to 72 hours. You can confirm your DNS configuration has changed by running the `dig` command on the command line, replacing ENTERPRISE-ACCOUNT with the name of your enterprise account, and example.com with the domain you'd like to verify. You should see your new TXT record listed in the command output.\n ```\n dig _github-challenge-ENTERPRISE-ACCOUNT.DOMAIN-NAME +nostats +nocomments +nocmd TXT\n ```\n 7. After confirming your TXT record is added to your DNS, follow steps one through three above to navigate to your enterprise account's approved and verified domains.\n 8. To the right of the domain that's pending verification, click the 3-dots, then click **Continue verifying**. Click **Verify**.\n 9. Optionally, after the \"Verified\" badge is visible on your organizations' profiles, delete the TXT entry from the DNS record at your domain hosting service.",
+ "AuditProcedure": "Only if you have an enterprise account, view the enterprise organization profile page and ensure it has a \"Verified\" badge in it.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.10",
+ "Description": "Ensure Source Code Management (SCM) email notifications are restricted to verified domains",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Restrict the Source Code Management (SCM) organization's email notifications to approved domains only.",
+ "RationaleStatement": "Restricting Source Code Management email notifications to verified domains only prevents data leaks, as personal emails and custom domains are more prone to account takeover via DNS hijacking or password breach.",
+ "ImpactStatement": "Only members with approved email would be able to receive Source Code Management notifications.",
+ "RemediationProcedure": "Only if you have an enterprise account, restrict Source Code Management email notifications to approved domains only by performing the following:\n \n\n 1. In the top-right corner of GitHub.com, click your profile photo, then click **Your enterprises**.\n 2. In the list of enterprises, click the enterprise you want to view. Then in the enterprise account sidebar, click **Settings**.\n 3. Under \"Settings\", click **Verified & approved domains**.\n 4. Under \"Notification preferences\", select **Restrict email notifications to only approved or verified domains**.\n 5. Click **Save**.",
+ "AuditProcedure": "Only if you have an enterprise account, ensure Source Code Management email notifications are restricted to approved domains only by performing the following:\n \n\n 1. In the top-right corner of GitHub.com, click your profile photo, then click **Your enterprises**.\n 2. In the list of enterprises, click the enterprise you want to view. Then in the enterprise account sidebar, click **Settings**.\n 3. Under \"Settings\", click **Verified & approved domains**.\n 4. Under \"Notification preferences\", verify that **Restrict email notifications to only approved or verified domains** is selected.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.11",
+ "Description": "Ensure an organization provides SSH certificates",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "As an organization, become an SSH Certificate Authority and provide SSH keys for accessing repositories.",
+ "RationaleStatement": "There are two ways for remotely working with Source Code Management: via HTTPS, which requires authentication by user/password, or via SSH, which requires the use of SSH keys. SSH authentication is better in terms of security; key creation and distribution, however, must be done in a secure manner. This can be accomplished by implementing SSH certificates, which are used to validate the server's identity. A developer will not be able to connect to a Git server if its key cannot be verified by the SSH Certificate Authority (CA) server.\n As an organization, one can verify the SSH certificate signature used to authenticate if a CA is defined and used. This ensures that only verified developers can access organization repositories, as their SSH key will be the only one signed by the CA certificate. This reduces the risk of misuse and malicious code commits.",
+ "ImpactStatement": "Members with unverified keys will not be able to clone organization repositories. Signing, certification, and verification might also slow down the development process.",
+ "RemediationProcedure": "Only if you have an enterprise account, deploy an SSH Certificate Authority server and configure it to provide an SSH certificate with which to sign keys by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Authentication security**.\n 4. To the right of \"SSH Certificate Authorities\", click **New CA**.\n 5. Under \"Key,\" paste your public SSH key.\n 6. Click **Add CA**.\n 7. Click **Save**.",
+ "AuditProcedure": "Only if you have an enterprise account, verify that the enterprise organization has an SSH Certificate Authority server and provides an SSH certificate with which to sign keys by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Authentication security**.\n 4. Verify that there's an SSH certificate authority listed there.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.3.12",
+ "Description": "Ensure Git access is limited based on IP addresses",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Limit Git access based on IP addresses by having a allowlist of IP addresses from which connection is possible.",
+ "RationaleStatement": "Allowing access to Git repositories (source code) only from specific IP addresses adds yet another layer of restriction and reduces the risk of unauthorized connection to the organization's assets. This will prevent attackers from accessing Source Code Management (SCM), as they would first need to know the allowed IP addresses to gain access to them.",
+ "ImpactStatement": "Only members with allowlisted IP addresses will be able to access the organization's Git repositories.",
+ "RemediationProcedure": "Only if you have an enterprise account, create an IP allowlist and forbid all other IPs from accessing the source code by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Authentication security**.\n 4. At the bottom of the \"IP allow list\" section, enter an IP address, or a range of addresses in CIDR notation. Optionally, enter a description of the allowed IP address or range.\n 5. Click **Add**.\n 6. After that, under \"IP allow list\", select **Enable IP allow list**.\n 7. Click **Save**.",
+ "AuditProcedure": "Only if you have an enterprise account, in every organization of yours, ensure access is allowed only by IP allowlist, and that access is forbidden for all other IPs by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Authentication security**.\n 4. Verify that there's an IP address, or a range of addresses in CIDR notation listed. Also verify that **Enable IP allow list** is selected.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.13",
+ "Description": "Ensure anomalous code behavior is tracked",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Track code anomalies.",
+ "RationaleStatement": "Carefully analyze any code anomalies within the organization. For example, a code anomaly could be a push made outside of working hours. Such a code push has a higher likelihood of being the result of an attack, as most if not all members of the organization would likely be outside the office. Another example is an activity that exceeds the average activity of a particular user.\n Tracking and auditing such behaviors creates additional layers of security and can aid in early detection of potential attacks.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every repository in use, track and investigate anomalous code behavior and activity.",
+ "AuditProcedure": "For every repository in use, ensure code anomalies relevant to the organization are promptly investigated.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.4.1",
+ "Description": "Ensure administrator approval is required for every installed application",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure an administrator approval is required when installing applications.",
+ "RationaleStatement": "Applications are typically automated integrations that improve the workflow of an organization. They are written by third-party developers, and therefore should be validated before using in case they're malicious or not trustable. Because administrators are expected to be the most qualified and trusted members of the organization, they should review the applications being installed and decide whether they are both trusted and necessary.",
+ "ImpactStatement": "Applications will not be installed without administrator approval.",
+ "RemediationProcedure": "Require an administrator approval for every installed application:\n \n\n a. For GitHub Apps, you are compliant by default. That is because by default only organization owners and administrators can install them.\n \n\n b. For OAuth Apps, perform the following:\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Third-party Access\" section of the sidebar, click **OAuth application policy**.\n 4. Under \"Third-party application access policy\", click **Setup application access restrictions**.\n 5. After you review the information about third-party access restrictions, click **Restrict third-party application access**.",
+ "AuditProcedure": "Verify that applications are installed only after receiving administrator approval:\n \n\n a. For GitHub Apps, you are compliant by default. That is because by default only organization owners and administrators can install them.\n \n\n b. For OAuth Apps, perform the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Third-party Access\" section of the sidebar, click **OAuth application policy**.\n 4. Under \"Third-party application access policy\" verify that the policy status is **Access restricted**.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.4.2",
+ "Description": "Ensure stale applications are reviewed and inactive ones are removed",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure stale (inactive) applications are reviewed and removed if no longer in use.",
+ "RationaleStatement": "Applications that have been inactive for a long period of time are enlarging the surface of attack for data leaks. They are more likely to be improperly managed, and could possibly be accessed by third-party developers as a tool for collecting internal data of the organization or repository in which they are installed. It is important to remove these inactive applications as soon as possible.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Review all stale applications and periodically remove them.",
+ "AuditProcedure": "Verify that all the applications in the organization are actively used, and remove those that are no longer in use.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.4.3",
+ "Description": "Ensure the access granted to each installed application is limited to the least privilege needed",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure installed application permissions are limited to the lowest privilege level required.",
+ "RationaleStatement": "Applications are typically automated integrations that can improve the workflow of an organization. They are written by third-party developers, and therefore should be reviewed carefully before use. It is recommended to use the \"least privilege\" principle, granting applications the lowest level of permissions required. This may prevent harm from a potentially malicious application with unnecessarily high-level permissions leaking data or modifying source code.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Grant permissions to applications by the \"least privilege\" principle, meaning the lowest possible permission necessary:\n \n\n a. For GitHub Apps, perform the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Integrations\" section of the sidebar, click **GitHub Apps**.\n 4. Next to every GitHub App, click **Configure**.\n 5. Review the GitHub App's permissions and repository access. Edit the permissions granted to the least possible. For example, restrict the number of repositories the App can access.\n 6. Click **Save**.",
+ "AuditProcedure": "Verify that each installed application has the least privilege needed:\n \n\n a. For GitHub Apps, perform the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the \"Integrations\" section of the sidebar, click **GitHub Apps**.\n 4. Next to every GitHub App, click **Configure**.\n 5. Review the GitHub App's permissions and repository access. Verify that the App permissions are the least possible and that it can access only necessary repositories.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.4.4",
+ "Description": "Ensure only secured webhooks are used",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Use only secured webhooks in the source code management platform.",
+ "RationaleStatement": "A webhook is an event listener, attached to critical and sensitive parts of the software delivery process. It is triggered by a list of events (such as a new code being committed), and when triggered, the webhook sends out a notification with some payload to specific internet endpoints. Since the payload of the webhook contains sensitive organization data, it's important all webhooks are directed to an endpoint (URL) protected by SSL verification (HTTPS). This helps ensure that the data sent is delivered to securely without any man-in-the-middle, who could easily access and even alter the payload of the request.",
+ "ImpactStatement": "Perform the following to ensure all webhooks used are secured (HTTPS):\n \n\n 1. Navigate to your organization or repository and select **Settings**.\n 2. Select **Webhooks** on the side menu.\n 3. Verify that each webhook URL starts with 'https'.",
+ "RemediationProcedure": "Perform the following to secure all webhooks used(over HTTPS):\n \n\n 1. Navigate to your organization or repository and select **Settings**.\n 2. Select **Webhooks** on the side menu.\n 3. Find the webhooks that starts with 'http' and not 'https'.\n 4. Ensure the endpoint (URL) of the webhook listens to secured port (443) and uses certificate.\n 5. Click **Edit**.\n 6. Change the payload URL to https and ensure **Enable SSL verification** is checked.\n 7. Click **Update webhook**.",
+ "AuditProcedure": "Perform the following to secure all webhooks used(over HTTPS):\n \n\n 1. Navigate to your organization or repository and select **Settings**.\n 2. Select **Webhooks** on the side menu.\n 3. Ensure all webhooks starts with 'https'.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.5.1",
+ "Description": "Ensure scanners are in place to identify and prevent sensitive data in code",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.5",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Detect and prevent sensitive data in code, such as confidential ID numbers, passwords, etc.",
+ "RationaleStatement": "Having sensitive data in the source code makes it easier for attackers to maliciously use such information. In order to avoid this, designate scanners to identify and prevent the existence of sensitive data in the code.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every repository in use, designate scanners to identify and prevent sensitive data in code by performing the following (enterprise only):\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Code security and analysis**.\n 4. Scroll down to the bottom of the page and click **Enable** for secret scanning.",
+ "AuditProcedure": "For every repository in use, verify that scanners are set to identify and prevent the existence of sensitive data in code by performing the following (enterprise only):\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the \"Security\" section of the sidebar, click **Code security and analysis**.\n 4. Scroll down to the bottom of the page. If you see a **Disable** button, it means that secret scanning is already enabled for the repository.",
+ "AdditionalInformation": "By January 2023, this feature is supposed to be open to all plans. Until then it is only for enterprise users.",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.5.2",
+ "Description": "Ensure scanners are in place to secure Continuous Integration (CI) pipeline instructions",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.5",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Detect and prevent misconfigurations and insecure instructions in CI pipelines",
+ "RationaleStatement": "Detecting and fixing misconfigurations or insecure instructions in CI pipelines decreases the risk for a successful attack through or on the CI pipeline. The more secure the pipeline, the less risk there is for potential exposure of sensitive data, a deployment being compromised, or external access mistakenly being granted to the CI infrastructure or the source code.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set a CI instructions scanning tool to identify and prevent misconfigurations and insecure instructions and scans all CI pipelines.",
+ "AuditProcedure": "Verify that a CI instructions scanning tool is set to identify and prevent misconfigurations and insecure instructions and that it scans all CI pipelines.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.5.3",
+ "Description": "Ensure scanners are in place to secure Infrastructure as Code (IaC) instructions",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.5",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Detect and prevent misconfigurations or insecure instructions in Infrastructure as Code (IaC) files, such as Terraform files.",
+ "RationaleStatement": "Detecting and fixing misconfigurations and/or insecure instructions in IaC (Infrastructure as Code) files decreases the risk for data leak or data theft. It is important to secure IaC instructions in order to prevent further problems of deployment, exposed assets, or improper configurations, which can ultimately lead to easier ways to attack and steal organization data.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every repository that holds IaC instructions files, set a scanning tool to identify and prevent misconfigurations and insecure instructions.",
+ "AuditProcedure": "For every repository that holds IaC instructions files, verify that a scanning tool is set to identify and prevent misconfigurations and insecure instructions.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.5.4",
+ "Description": "Ensure scanners are in place for code vulnerabilities",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.5",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Detect and prevent known open source vulnerabilities in the code.",
+ "RationaleStatement": "Open source code blocks are used a lot in developed software. This has its own advantages, but it also has risks. Because the code is open for everyone, it means that attackers can publish or add malicious code to these open-source code blocks, or use their knowledge to find vulnerabilities in an existing code. Detecting and fixing such code vulnerabilities, by SCA (Software Composition Analysis) prevents insecure flaws from reaching production. It gives another opportunity for developers to secure the source code before it is deployed in production, where it is far more exposed and vulnerable to attacks.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every repository that is in use, set a scanning tool to identify and prevent code vulnerabilities by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under the repository name, click **Security**.\n 3. To the right of \"Code scanning alerts\", click **Set up code scanning**.\n 4. Under \"Get started with code scanning\", click Set up this workflow on a workflow of your choice.\n 5. To customize how code scanning scans your code, edit the workflow.\n 6. Use the **Start commit** drop-down and type a commit message.\n 7. Choose whether you'd like to commit directly to the default branch or create a new branch and start a pull request.\n 8. Click **Commit new file** or **Propose new file**.",
+ "AuditProcedure": "For every repository that is in use, verify that a scanning tool is set to identify and prevent code vulnerabilities by performing the following:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under the repository name, click **Security**.\n 3. Verify that \"Code scanning alerts\" is **Enabled** or that there is a workflow that scans your code.",
+ "AdditionalInformation": "All public repositories in all plans can use code scanning in GitHub. In private repositories, only GitHub Enterprise can use code scanning.",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.5.5",
+ "Description": "Ensure scanners are in place for open-source vulnerabilities in used packages",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.5",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Detect, prevent and monitor known open-source vulnerabilities in packages that are being used.",
+ "RationaleStatement": "Open-source vulnerabilities might exist before one starts to use a package, but they are also discovered over time. New attacks and vulnerabilities are announced every now and then. It is important to keep track of these and to monitor whether the dependencies used are affected by the recent vulnerability. Detecting and fixing those packages' vulnerabilities decreases the attack surface within deployed and running applications that use such packages. It prevents security flaws from reaching the production environment which could eventually lead to a security breach.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set scanners that will monitor, identify, and prevent open-source vulnerabilities in packages by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**. In the \"Security\" section of the sidebar, click **Code security and analysis**.\n 3. Under \"Code security and analysis\", to the right of Dependabot alerts, click **Disable all** or **Enable all**.\n 4. Check the **Enable by default for new repositories** option and then click **Enable Dependabot alerts**.\n \n\n It is also recommended to use another additional solution for package scanning because GitHub doesn't always recognize the vulnerabilities.",
+ "AuditProcedure": "Verify that scanners are set to monitor, identify, and prevent open-source vulnerabilities in packages by performing the following:\n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**. In the \"Security\" section of the sidebar, click **Code security and analysis**.\n 3. Verify that the Dependabot alerts is enabled and that **Enable by default for new repositories** is checked.\n \n\n It is also recommended to verify that you're using another additional solution for package scanning because GitHub doesn't always recognize the vulnerabilities.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "1.5.6",
+ "Description": "Ensure scanners are in place for open-source license issues in used packages",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "1.5",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Detect open-source license problems in used dependencies and fix them.",
+ "RationaleStatement": "A software license is a legal document that establishes several key conditions between a software company or developer and a user in order to allow the use of software. Software licenses have the potential to create code dependencies. Not following the conditions in the software license can also lead to lawsuits. When using packages with a software license, especially commercial ones (which are the most permissive), it is important to verify what is allowed by that license in order to be protected against lawsuits.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Designate a license scanning tool to identify open-source license problems and fix them and scan every package you use.",
+ "AuditProcedure": "Ensure a license scanning tool is set up to identify open-source license problems and that every package you use is scanned by it.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.1",
+ "Description": "Ensure each pipeline has a single responsibility",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure each pipeline has a single responsibility in the build process.",
+ "RationaleStatement": "Build pipelines generally have access to multiple secrets depending on their purposes. There are, for example, secrets of the test environment for the test phase, repository and artifact credentials for the build phase, etc. Limiting access to these credentials/secrets is therefore recommended by dividing pipeline responsibilities, as well as having a dedicated pipeline for each phase with the lowest privilege instead of a single pipeline for all. This will ensure that any potential damage caused by attacks on a workflow will be limited.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Divide each multi-responsibility pipeline into multiple pipelines, each having a single responsibility with the least privilege. Additionally, create all new pipelines with a sole purpose going forward.",
+ "AuditProcedure": "For each pipeline, ensure it has only one responsibility in the build process.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.2",
+ "Description": "Ensure all aspects of the pipeline infrastructure and configuration are immutable",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure the pipeline orchestrator and its configuration are immutable.",
+ "RationaleStatement": "An immutable infrastructure is one that cannot be changed during execution of the pipeline. This can be done, for example, by using Infrastructure as Code for configuring the pipeline and the pipeline environment. Utilizing such infrastructure creates a more predictable environment because updates will require re-deployment to prevent any previous configuration from interfering. Because it is dependent on automation, it is easier to revert changes. Testing code is also simpler because it is based on virtualization. Most importantly, an immutable pipeline infrastructure ensures that a potential attacker seeking to compromise the build environment itself would not be able to do so if the orchestrator, its configuration, and any other component cannot be changed. Verifying that all aspects of the pipeline infrastructure and configuration are immutable therefore keeps them safe from malicious tampering attempts.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Use an immutable pipeline orchestrator and ensure that its configuration and all other aspects of the built environment are immutable, as well.",
+ "AuditProcedure": "Verify that the pipeline orchestrator, its configuration, and all other aspects of the build environment are immutable.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.3",
+ "Description": "Ensure the build environment is logged",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Keep build logs of the build environment detailing configuration and all activity within it. Also, consider to store them in a centralized organizational log store.",
+ "RationaleStatement": "Logging the environment is important for two primary reasons: one, for debugging and investigating the environment in case of a bug or security incident; and two, for reproducing the environment easily when needed. Storing these logs in a centralized organizational log store allows the organization to generate useful insights and identify anomalies in the build process faster.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Keep logs of the build environment. For example, use the .buildinfo file for Debian build workers. Also, store the logs in a centralized organizational log store.",
+ "AuditProcedure": "Verify that the build environment is logged and stored in a centralized organizational log store.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.4",
+ "Description": "Ensure the creation of the build environment is automated",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Automate the creation of the build environment.",
+ "RationaleStatement": "Automating the deployment of the build environment reduces the risk for human mistakes — such as a wrong configuration or exposure of sensitive data — because it requires less human interaction and intervention. It also eases re-deployment of the environment. It is best to automate with Infrastructure as Code because it offers more control over changes made to the environment creation configuration and stores to a version control platform.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Automate the deployment of the build environment.",
+ "AuditProcedure": "Verify that the deployment of the build environment is automated and can be easily redeployed.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.5",
+ "Description": "Ensure access to build environments is limited",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Restrict access to the build environment (orchestrator, pipeline executor, their environment, etc.) to trusted and qualified users only.",
+ "RationaleStatement": "A build environment contains sensitive data such as environment variables, secrets, and the source code itself. Any user that has access to this environment can make changes to the build process, including changes to the code within it. Restricting access to the build environment to trusted and qualified users only will reduce the risk for mistakes such as exposure of secrets or misconfiguration. Limiting access also reduces the number of accounts that are vulnerable to hijacking in order to potentially harm the build environment.",
+ "ImpactStatement": "Reducing the number of users who have access to the build process means those users would lose their ability to make direct changes to that process.",
+ "RemediationProcedure": "Restrict access to the build environment to trusted and qualified users.",
+ "AuditProcedure": "Verify each build environment is accessible only to known and authorized users.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.6",
+ "Description": "Ensure users must authenticate to access the build environment",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Require users to login in to access the build environment - where the orchestrator, the pipeline executer, where the build workers are running, etc.",
+ "RationaleStatement": "Requiring users to authenticate and disabling anonymous access to the build environment allows organization to track every action on that environment, good or bad, to its actor. This will help recognizing attack and its attacker becuase the authentication is required.",
+ "ImpactStatement": "Anonymous users won't be able to access the build environment.",
+ "RemediationProcedure": "Require authentication to access the build environment and disable anonymous access.",
+ "AuditProcedure": "Ensure authentication is required to access the build environment.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.7",
+ "Description": "Ensure build secrets are limited to the minimal necessary scope",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Build tools providers offer a secure way to store secrets that should be used during the build process.\n These secrets will often be credentials used to access other tools, for example for pulling code or for uploading artifacts.\n Access to these secrets can be defined on various scopes, for example in github it could be on an organization level or a repository level and there is also control on whether these secrets are passed to forked pull request.\n To protect these critical assets it is important to choose the most restrictive scope necessary.",
+ "RationaleStatement": "Allowing over permissive access to these secrets may affect on their exposure.\n For example if a secret is defined in an organization level, and users can create new repositories, there is a scenario where a user can create a new repo and run a controlled build just to exfiltrate these secrets.",
+ "ImpactStatement": "Increased risk of exposure of build related secrets.",
+ "RemediationProcedure": "For each build tool, review the secrets defined and their permissions scope and change over permissive scopes to more restrictive ones based on the required access.",
+ "AuditProcedure": "For each build tool in use, review the secrets defined and the permission scopes they are assigned.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.8",
+ "Description": "Ensure the build infrastructure is automatically scanned for vulnerabilities",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Scan the build infrastructure and its dependencies for vulnerabilities. It is recommended that this be done automatically.",
+ "RationaleStatement": "Automatic scanning for vulnerabilities detects known vulnerabilities in the tooling used by the build infrastructure and its dependencies. These vulnerabilities can lead\n to a potentially massive breach if not handled as fast as possible, as attackers might also be\n aware of such vulnerabilities.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set an automated vulnerability scanning for your build infrastructure.",
+ "AuditProcedure": "Verify that your build infrastructure is automatically scanned for vulnerabilities.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.9",
+ "Description": "Ensure default passwords are not used",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Do not use default passwords of build tools and components.",
+ "RationaleStatement": "Sometimes build tools and components are provided with default passwords for the first login. This password is intended to be used only on the first login and should be changed immediately after. Using the default password substantially increases the attack risk. It is especially important to ensure that default passwords are not used in build tools and components.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each build tool, change the default password.",
+ "AuditProcedure": "For each build tool, ensure the password used is not the default one.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.10",
+ "Description": "Ensure webhooks of the build environment are secured",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Use secured webhooks of the build environment.",
+ "RationaleStatement": "Webhooks are used for triggering an HTTP request based on an action made in the platform. Typically, build environment feature webhooks for a pipeline trigger based on source code event. Since webhooks are an HTTP POST request, they can be malformed if not secured over SSL. To prevent a potential hack and compromise of the webhook or to the environment or web server excepting the request, use only secured webhooks.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each webhook in use, change it to secured (over HTTPS).",
+ "AuditProcedure": "For each webhook in use, ensure it is secured (HTTPS).",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.11",
+ "Description": "Ensure minimum number of administrators are set for the build environment",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure the build environment has a minimum number of administrators.",
+ "RationaleStatement": "Build environment administrators have the highest level of permissions, including the ability to add/remove users, create or delete pipelines, control build workers, change build trigger permissions and more. Due to the permissive access granted to a build environment administrator, it is highly recommended to keep the number of administrator accounts as minimal as possible.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set the minimum number of administrators in the build environment.",
+ "AuditProcedure": "Verify that the build environment has only the minimum number of administrators.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.2.1",
+ "Description": "Ensure build workers are single-used",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Use a clean instance of build worker for every pipeline run.",
+ "RationaleStatement": "Using a clean instance of build worker for every pipeline run eliminates the risks of data theft, data integrity breaches, and unavailability. It limits the pipeline's access to data stored on the file system from previous runs, and the cache is volatile. This prevents malicious changes from affecting other pipelines or the Continuous Integration/Continuous Delivery system itself.",
+ "ImpactStatement": "Data and cache will not be saved in different pipeline runs.",
+ "RemediationProcedure": "Create a clean build worker for every pipeline that is being run, or use build platform-hosted runners, as they typically offer a clean instance for every run.",
+ "AuditProcedure": "Ensure that every pipeline that is being run has its own clean, new runner.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.2.2",
+ "Description": "Ensure build worker environments and commands are passed and not pulled",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "A worker’s environment can be passed (for example, a pod in a Kubernetes cluster in which an environment variable is passed to it). It also can be pulled, like a virtual machine that is installing a package. Ensure that the environment and commands are passed to the workers and not pulled from it.",
+ "RationaleStatement": "Passing an environment means additional configuration happens in the build time phase and not in run time. It will also pass locally and not remotely. Passing a worker environment, instead of pulling it from an outer source, reduces the possibility for an attacker to gain access and potentially pull malicious code into it. By passing locally and not pulling from remote, there is also less chance of an attack based on the remote connection, such as a man-in-the-middle or malicious scripts that can run from remote. This therefore prevents possible infection of the build worker.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each build worker, pass its environment and commands to it instead of pulling it.",
+ "AuditProcedure": "For each build worker, ensure its environment and commands are passed and not pulled.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.2.3",
+ "Description": "Ensure the duties of each build worker are segregated",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Separate responsibilities in the build workflow, such as testing, compiling, pushing artifacts, etc., to different build workers so that each worker will have a single duty.",
+ "RationaleStatement": "Separating duties and allocating them to many workers makes it easier to verify each step in the build process and ensure there is no corruption. It also limits the effect of an attack on a build worker, as such an attack would be less critical if the worker has less access and duties that are subject to harm.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each build worker, limit its responsibility to one duty.",
+ "AuditProcedure": "For each build worker, ensure it has the least responsibility possible, preferably only one duty.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.2.4",
+ "Description": "Ensure build workers have minimal network connectivity",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure that build workers have minimal network connectivity.",
+ "RationaleStatement": "Restricting the network connectivity of build workers decreases the possibility that an attacker would be capable of entering the organization from the outside. If the build workers are connected to the public internet without any restriction, it is far simpler for attackers to compromise them. Limiting network connectivity between build workers also protects the organization in case an attacker was successful and subsequently attempts to spread the attack to other components of the environment.",
+ "ImpactStatement": "Developers will not have connectivity to every resource they might need from the outside. Workers will also only be able to exchange data through shareable storage.",
+ "RemediationProcedure": "Limit the network connectivity of build workers, environment, and any other components to the necessary minimum.",
+ "AuditProcedure": "Verify that build workers, environment, and any other components have only the required minimum of network connectivity.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.2.5",
+ "Description": "Ensure run-time security is enforced for build workers",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Add traces to build workers' operating systems and installed applications so that in run time, collected events can be analyzed to detect suspicious behavior patterns and malware.",
+ "RationaleStatement": "Build workers are exposed to data exfiltration attacks, code injection attacks, and more while running. It is important to secure them from such attacks by enforcing run-time security on the build worker itself. This will identify attempted attacks in real time and prevent them.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Deploy and enforce a run-time security solution on build workers.",
+ "AuditProcedure": "Verify that a run-time security solution is enforced on every active build worker.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.2.6",
+ "Description": "Ensure build workers are automatically scanned for vulnerabilities",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Scan build workers for vulnerabilities. It is recommended that this be done automatically.",
+ "RationaleStatement": "Automatic scanning for vulnerabilities detects known weaknesses in environmental sources in use, such as docker images or kernel versions. Such vulnerabilities can lead to a massive breach if these environments are not replaced as fast as possible, since attackers also know about these vulnerabilities and often try to take advantage of them. Setting automatic scanning which scans environmental sources ensures that if any new vulnerability is revealed, it can be replaced quickly and easily. This protects the worker from being exposed to attacks.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each build worker, automatically scan its environmental sources, such as docker image, for vulnerabilities.",
+ "AuditProcedure": "For each build worker, ensure the environmental sources it uses are scanned for vulnerabilities.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.2.7",
+ "Description": "Ensure build workers' deployment configuration is stored in a version control platform",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Store the deployment configuration of build workers in a version control platform, such as Github.",
+ "RationaleStatement": "Build workers are a sensitive part of the build phase. They generally have access to the code repository, the Continuous Integration platform, the deployment platform, etc. This means that an attacker gaining access to a build worker may compromise other platforms in the organization and cause a major incident. One thing that can protect workers is to ensure that their deployment configuration is safe and well-configured. Storing the deployment configuration in version control enables more observability of these configurations because everything is catalogued in a single place. It adds another layer of security, as every change will be reviewed and noticed, and thus malicious changes will theoretically occur less. In the case of a mistake, bug, or security incident, it also offers an easier way to \"revert\" back to a safe version or add a \"hot fix\" quickly.",
+ "ImpactStatement": "Changes in deployment configuration may only be applied by declaration in the version control platform. This could potentially slow down the development process.",
+ "RemediationProcedure": "Document and store every deployment configuration of build workers in a version control platform.",
+ "AuditProcedure": "Verify that the deployment configuration of build workers is stored in a version control platform.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.2.8",
+ "Description": "Ensure resource consumption of build workers is monitored",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Monitor the resource consumption of build workers and set alerts for high consumption that can lead to resource exhaustion.",
+ "RationaleStatement": "Resource exhaustion is when machine resources or services are highly consumed until exhausted. Resource exhaustion may lead to DOS (Denial of Service). When such a situation happens to build workers, it slows down and even stops the build process, which harms the production of artifacts and the organization's ability to deliver software on schedule. To prevent that, it is recommended to monitor resources consumption in the build workers and set alerts to notify when they are highly consumed. That way resource exhaustion can be acknowledged and prevented at an early stage.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set reources consumption monitoring for each build worker.",
+ "AuditProcedure": "Verify that there is monitoring of resources consumption for each build worker.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.3.1",
+ "Description": "Ensure all build steps are defined as code",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Use pipeline as code for build pipelines and their defined steps.",
+ "RationaleStatement": "Storing pipeline instructions as code in a version control system means automation of the build steps and less room for human error, which could potentially lead to a security breach. Additionally, It creates the ability to revert back to a previous pipeline configuration in order to pinpoint the affected change should a malicious incident occur.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Convert pipeline instructions into code-based syntax and upload them to the organization's version control platform.",
+ "AuditProcedure": "Verify that all build steps are defined as code and stored in a version control system.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.3.2",
+ "Description": "Ensure steps have clearly defined build stage input and output",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Define clear expected input and output for each build stage.",
+ "RationaleStatement": "In order to have more control over data flow in the build pipeline, clearly define the input and output of the pipeline steps. If anything malicious happens during the build stage, it will be recognized more easily and stand out as an anomaly.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each build stage, clearly define what is expected for input and output.",
+ "AuditProcedure": "For each build stage, verify that the expected input and output are clearly defined.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.3.3",
+ "Description": "Ensure output is written to a separate, secured storage repository",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Write pipeline output artifacts to a secured storage repository.",
+ "RationaleStatement": "To maintain output artifacts securely and reduce the potential surface for attack, store such artifacts separately in secure storage. This separation enforces the Single Responsibility Principle by ensuring the orchestration platform will not be the same as the artifact storage, which reduces the potential harm of an attack. Using the same security considerations as the input (for example, the source code) will protect artifacts stored and will make it harder for a malicious actor to successfully execute an attack.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each pipeline that produces output artifacts, write them to a secured storage repository.",
+ "AuditProcedure": "For each pipeline that produces output artifacts, ensure that they're written to a secured storage repository.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.3.4",
+ "Description": "Ensure changes to pipeline files are tracked and reviewed",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Track and review changes to pipeline files.",
+ "RationaleStatement": "Pipeline files are sensitive files. They have the ability to access sensitive data and control the build process, thus it is just as important to review changes to pipeline files as it is to verify source code. Malicious actors can potentially add harmful code to these files, which may lead to sensitive data exposure and hijacking of the build environment or artifacts.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each pipeline file, track changes to it and review them.",
+ "AuditProcedure": "For each pipeline file, ensure changes to it are being tracked and reviewed.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.3.5",
+ "Description": "Ensure access to build process triggering is minimized",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Restrict access to pipeline triggers.",
+ "RationaleStatement": "Build pipelines are used for multiple reasons. Some are very sensitive, such as pipelines which deploy to production. In order to protect the environment from malicious acts or human mistakes, such as a developer deploying a bug to production, it is important to apply the Least Privilege principle to pipeline triggering. This principle requires restrictions placed on which users can run which pipeline. It allows for sensitive pipelines to only be run by administrators, who are generally the most trusted and skilled members of the organization.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every pipeline in use, grant only the necessary users permission to trigger it.",
+ "AuditProcedure": "For every pipeline in use, verify only the necessary users have permission to trigger it.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.3.6",
+ "Description": "Ensure pipelines are automatically scanned for misconfigurations",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Scan the pipeline for misconfigurations. It is recommended that this be performed automatically.",
+ "RationaleStatement": "Automatic scans for misconfigurations detect human mistakes and misconfigured tasks. This protects the environment from backdoors caused by such mistakes, which create easier access for attackers. For example, a task that mistakenly configures credentials to persist on the disk makes it easier for an attacker to steal them. This type of incident can be prevented by auto-scanning.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each pipeline, set automated misconfiguration scanning.",
+ "AuditProcedure": "For each pipeline, verify that it is automatically scanned for misconfigurations.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.3.7",
+ "Description": "Ensure pipelines are automatically scanned for vulnerabilities",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Scan pipelines for vulnerabilities. It is recommended that this be implemented automatically.",
+ "RationaleStatement": "Automatic scanning for vulnerabilities detects known vulnerabilities in pipeline instructions and components, allowing faster patching in case one is found. These vulnerabilities can lead to a potentially massive breach if not handled as fast as possible, as attackers might also be aware of such vulnerabilities.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each pipeline, set automated vulnerability scanning.",
+ "AuditProcedure": "For each pipeline, verify that it is automatically scanned for vulnerabilities.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.3.8",
+ "Description": "Ensure scanners are in place to identify and prevent sensitive data in pipeline files",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.3",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Detect and prevent sensitive data, such as confidential ID numbers, passwords, etc., in pipelines.",
+ "RationaleStatement": "Sensitive data in pipeline configuration, such as cloud provider credentials or repository credentials, create vulnerabilities with which malicious actors could steal such information if they gain access to a pipeline. In order to mitigate this, set scanners that will identify and prevent the existence of sensitive data in the pipeline.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every pipeline that is in use, set scanners that will identify and prevent sensitive data within it.",
+ "AuditProcedure": "For every pipeline that is in use, verify that scanners are set to identify and prevent the existence of sensitive data within it.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.4.1",
+ "Description": "Ensure all artifacts on all releases are signed",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Sign all artifacts in all releases with user or organization keys.",
+ "RationaleStatement": "Signing artifacts is used to validate both their integrity and security. Organizations signal that artifacts may be trusted and they themselves produced them by ensuring that every artifact is properly signed. The presence of this signature also makes potentially malicious activity far more difficult.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every artifact in every release, verify that all are properly signed.",
+ "AuditProcedure": "Ensure every artifact in every release is signed.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.4.2",
+ "Description": "Ensure all external dependencies used in the build process are locked",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "External dependencies may be public packages needed in the pipeline, or perhaps the public image being used for the build worker. Lock these external dependencies in every build pipeline.",
+ "RationaleStatement": "External dependencies are sources of code that aren't under organizational control. They might be intentionally or unintentionally infected with malicious code or have known vulnerabilities, which could result in sensitive data exposure, data harvesting, or the erosion of trust in an organization. Locking each external dependency to a specific, safe version gives more control and less chance for risk.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For all external dependencies being used in pipelines, verify they are locked.",
+ "AuditProcedure": "Ensure every external dependency being used in pipelines is locked.",
+ "AdditionalInformation": "",
+ "References": "https://argon.io/blog/pipeline-composition-analysis-how-your-ci-pipeline-presents-new-opportunities-for-attackers/"
+ }
+ ]
+ },
+ {
+ "Id": "2.4.3",
+ "Description": "Ensure dependencies are validated before being used",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Validate every dependency of the pipeline before use.",
+ "RationaleStatement": "To ensure that a dependency used in a pipeline is trusted and has not been infected by malicious actor (for example, the codecov incident), validate dependencies before using them. This can be accomplished by comparing the checksum of the dependency to its checksum in a trusted source. If a difference arises, this is a sign that an unknown actor has interfered and may have added malevolent code. If this dependency is used, it will infect the environment, which could end in a massive breach and leave the organization exposed to data leaks, etc.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every dependency used in every pipeline, validate each one.",
+ "AuditProcedure": "For every dependency used in every pipeline, ensure it has been validated.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.4.4",
+ "Description": "Ensure the build pipeline creates reproducible artifacts",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Verify that the build pipeline creates reproducible artifacts, meaning that an artifact of the build pipeline is the same in every run when given the same input.",
+ "RationaleStatement": "A reproducible build is a build that produces the same artifact when given the same input data. Ensuring that the build pipeline produces the same artifact when given the same input helps verify that no change has been made to the artifact. This action allows an organization to trust that its artifacts are built only from safe code that has been reviewed and tested and has not been tainted or changed abruptly.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Create build pipelines that produce the same artifact given the same input (for example, artifacts that do not rely on timestamps).",
+ "AuditProcedure": "Ensure that build pipelines create reproducible artifacts.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.4.5",
+ "Description": "Ensure pipeline steps produce a Software Bill of Materials (SBOM)",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "SBOM (Software Bill of Materials) is a file that specifies each component of software or a build process. Generate an SBOM after each run of a pipeline.",
+ "RationaleStatement": "Generating a Software Bill of Materials after each run of a pipeline will validate the integrity and security of that pipeline. Recording every step or component role in the pipeline ensures that no malicious acts have been committed during the pipeline's run.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each pipeline, configure it to produce a Software Bill of Materials on every run.",
+ "AuditProcedure": "For each pipeline, ensure it produces a Software Bill of Materials on every run.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.4.6",
+ "Description": "Ensure pipeline steps sign the Software Bill of Materials (SBOM) produced",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "SBOM (Software Bill of Materials) is a file that specifies each component of software or a build process. It should be generated after every pipeline run. After it is generated, it must then be signed.",
+ "RationaleStatement": "Software Bill of Materials (SBOM) is a file used to validate the integrity and security of a build pipeline. Signing it ensures that no one tampered with the file when it was delivered. Such interference can happen if someone tries to hide unusual activity. Validating the SBOM signature can detect this activity and prevent much greater incident.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each pipeline, configure it to sign its produced Software Bill of Materials on every run.",
+ "AuditProcedure": "For each pipeline, ensure it signs the Software Bill of Materials it produces on every run.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.1.1",
+ "Description": "Ensure third-party artifacts and open-source libraries are verified",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure third-party artifacts and open-source libraries in use are trusted and verified.",
+ "RationaleStatement": "Verify third-party artifacts used in code are trusted and have not been infected by a malicious actor before use. This can be accomplished, for example, by comparing the checksum of the dependency to its checksum in a trusted source. If a difference arises, this may be a sign that someone interfered and added malicious code. If this dependency is used, it will infect the environment and could end in a massive breach, leaving the organization exposed to data leaks and more.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Verify every GitHub action (building block of a GitHub workflow) in use by performing the following: \n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the left sidebar, click **Actions**, then click **General**.\n 4. Under \"Policies\", check **Allow OWNER, and select non-OWNER, actions and reusable workflows**, and then **Allow actions created by GitHub**.\n 5. Click **Save**.\n \n\n Alternatively, perform the following for each repository where GitHub actions are used:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the left sidebar, click **Actions**, then click **General**.\n 4. Under \"Actions permissions\", check **Allow OWNER, and select non-OWNER, actions and reusable workflows**, and then **Allow actions created by GitHub**.\n 5. Click **Save**.",
+ "AuditProcedure": "For every GitHub action (building block of a GitHub workflow), ensure verification before use by performing the following: \n \n\n 1. In the top right corner of GitHub.com, click your profile photo, then click **Your organizations**.\n 2. Next to the organization, click **Settings**.\n 3. In the left sidebar, click **Actions**, then click **General**.\n 4. Under \"Policies\", ensure **Allow OWNER, and select non-OWNER, actions and reusable workflows**, and **Allow actions created by GitHub** are checked.\n \n\n Alternatively, perform the following for each repository where GitHub actions are used:\n \n\n 1. On GitHub.com, navigate to the main page of the repository.\n 2. Under your repository name, click **Settings**.\n 3. In the left sidebar, click **Actions**, then click **General**.\n 4. Under \"Actions permissions\", ensure **Allow OWNER, and select non-OWNER, actions and reusable workflows** and **Allow actions created by GitHub** are checked.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.1.2",
+ "Description": "Ensure Software Bill of Materials (SBOM) is required from all third-party suppliers",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "A Software Bill Of Materials (SBOM) is a file that specifies each component of software or a build process. Require an SBOM from every third-party provider.",
+ "RationaleStatement": "A Software Bill of Materials (SBOM) for every third-party artifact helps to ensure an artifact is safe to use and fully compliant. This file lists all important metadata, especially all the dependencies of an artifact, and allows for verification of each dependency. If one of the dependencies/artifacts are attacked or has a new vulnerability (for example, the \"SolarWinds\" or even \"log4j\" attacks), it is easier to detect what has been affected by this incident because dependencies in use are listed in the SBOM file.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every third-party dependency in use, require a Software Bill of Materials from its supplier.",
+ "AuditProcedure": "For every third-party dependency in use, ensure it has a Software Bill of Materials.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.1.3",
+ "Description": "Ensure signed metadata of the build process is required and verified",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Require and verify signed metadata of the build process for all dependencies in use.",
+ "RationaleStatement": "The metadata of a build process lists every action that took place during an artifact build. It is used to ensure that an artifact has not been compromised during the build, that no malicious code was injected into it, and that no nefarious dependencies were added during the build phase. This creates trust between user and vendor that the software supplied is exactly the software that was promised. Signing this metadata adds a checksum to ensure there have been no revisions since its creation, as this checksum changes when the metadata is altered. Verification of proper metadata signature with Certificate Authority confirms that the signature was produced by a trusted entity.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each artifact in use, require and verify signed metadata of the build process.",
+ "AuditProcedure": "For each artifact used, ensure it was supplied with verified and signed metadata of its build process. The signature should be the organizational signature and should be verifiable by common Certificate Authority servers.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.1.4",
+ "Description": "Ensure dependencies are monitored between open-source components",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Monitor, or ask software suppliers to monitor, dependencies between open-source components in use.",
+ "RationaleStatement": "Monitoring dependencies between open-source components helps to detect if software has fallen victim to attack on a common open-source component. Swift detection can aid in quick application of a fix. It also helps find potential compliance problems with components usage. Some dependencies might not be compatible with the organization's policies, and other dependencies might have a license that is not compatible with how the organization uses this specific dependency. If dependencies are monitored, such situations can be detected and mitigated sooner, potentially deterring malicious attacks.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each open-source component, monitor its dependencies.",
+ "AuditProcedure": "For each open-source component, ensure its dependencies are monitored.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.1.5",
+ "Description": "Ensure trusted package managers and repositories are defined and prioritized",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Prioritize trusted package registries over others when pulling a package.",
+ "RationaleStatement": "When pulling a package by name, the package manager might look for it in several package registries, some of which may be untrusted or badly configured. If the package is pulled from such a registry, there is a higher likelihood that it could prove malicious. In order to avoid this, configure packages to be pulled from trusted package registries.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each package to be downloaded, configure it to be downloaded from a trusted source.",
+ "AuditProcedure": "For each package registry in use, ensure it is trusted.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.1.6",
+ "Description": "Ensure a signed Software Bill of Materials (SBOM) of the code is supplied",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "A Software Bill of Materials (SBOM) is a file that specifies each component of software or a build process. When using a dependency, demand its SBOM and ensure it is signed for validation purposes.",
+ "RationaleStatement": "A Software Bill of Materials (SBOM) creates trust between its provider and its users by ensuring that the software supplied is the software described, without any potential interference in between. Signing an SBOM creates a checksum for it, which will change if the SBOM's content was changed. With that checksum, a software user can be certain nothing had happened to it during the supply chain, engendering trust in the software. When there is no such trust in the software, the risk surface is increased because one cannot know if the software is potentially vulnerable. Demanding a signed SBOM and validating it decreases that risk.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every artifact supplied, require and verify a signed Software Bill of Materials from its supplier.",
+ "AuditProcedure": "For every artifact supplied, ensure it has a validated, signed Software Bill of Materials.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.1.7",
+ "Description": "Ensure dependencies are pinned to a specific, verified version",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Pin dependencies to a specific version. Avoid using the \"latest\" tag or broad version.",
+ "RationaleStatement": "When using a wildcard version of a package, or the \"latest\" tag, the risk of encountering a new, potentially malicious package increases. The \"latest\" tag pulls the last package pushed to the registry. This means that if an attacker pushes a new, malicious package successfully to the registry, the next user who pulls the \"latest\" will pull it and risk attack. This same rule applies to a wildcard version - assuming one is using version v1.*, it will install the latest version of the major version 1, meaning that if an attacker can push a malicious package with that same version, those using it will be subject to possible attack. By using a secure, verified version, use is restricted to this version only and no other may be pulled, decreasing the risk for any malicious package.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every dependency in use, pin to a specific version.",
+ "AuditProcedure": "For every dependency in use, ensure it is pinned to a specific version.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.1.8",
+ "Description": "Ensure all packages used are more than 60 days old",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Use packages that are more than 60 days old.",
+ "RationaleStatement": "Third-party packages are a major risk since an organization cannot control their source code, and there is always the possibility these packages could be malicious. It is therefore good practice to remain cautious with any third-party or open-source package, especially new ones, until they can be verified that they are safe to use. Avoiding a new package allows the organization to fully examine it, its maintainer, and its behavior, and gives enough time to determine whether or not to use it.",
+ "ImpactStatement": "Developers may not use packages that are less than 60 days old.",
+ "RemediationProcedure": "If a package used is less than 60 days old, stop using it and find another solution.",
+ "AuditProcedure": "For every package used, ensure it is more than 60 days old.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "",
+ "Description": "Validate Packages",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.2",
+ "Profile": "",
+ "AssessmentStatus": "",
+ "Description": "This section consists of security recommendations for managing package validations and checks. Third-party packages and dependencies might put the organization in danger, not only by being vulnerable to attacks, but also by being improperly used and harming license conditions. To protect the software supply chain from these dangers, it is important to validate packages and understand how and if to use them. This section's recommendations cover this topic.",
+ "RationaleStatement": "",
+ "ImpactStatement": "",
+ "RemediationProcedure": "",
+ "AuditProcedure": "",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.2.1",
+ "Description": "Ensure an organization-wide dependency usage policy is enforced",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Enforce a policy for dependency usage across the organization. For example, disallow the use of packages less than 60 days old.",
+ "RationaleStatement": "Enforcing a policy for dependency usage in an organization helps to manage dependencies across the organization and ensure that all usage is compliant with security policy. If, for example, the policy limits the package managers that can be used, enforcing it will make sure that every dependency is installed only from these package managers, and limit the risk of installing from any untrusted source.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Enforce policies for dependency usage across the organization.",
+ "AuditProcedure": "Verify that a policy for dependency usage is enforced across the organization.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.2.2",
+ "Description": "Ensure packages are automatically scanned for known vulnerabilities",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Automatically scan every package for vulnerabilities.",
+ "RationaleStatement": "Automatic scanning for vulnerabilities detects known vulnerabilities in packages and dependencies in use, allowing faster patching when one is found. Such vulnerabilities can lead to a massive breach if not handled as fast as possible, as attackers will also know about those vulnerabilities and swiftly try to take advantage of them. Scanning packages regularly for vulnerabilities can also verify usage compliance with the organization's security policy.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set automatic scanning of packages for vulnerabilities.",
+ "AuditProcedure": "Ensure automatic scanning of packages for vulnerabilities is enabled.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.2.3",
+ "Description": "Ensure packages are automatically scanned for license implications",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "A software license is a document that provides legal conditions and guidelines for the use and distribution of software, usually defined by the author. It is recommended to scan for any legal implications automatically.",
+ "RationaleStatement": "When using packages with software licenses, especially commercial ones which tend to be the strictest, it is important to verify that the use of the package meets the conditions of the license. If the use of the package violates the licensing agreement, it exposes the organization to possible lawsuits. Scanning used packages for such license implications leads to faster detection and quicker fixes of such violations, and also reduces the risk for a lawsuit.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set automatic package scanning for license implications.",
+ "AuditProcedure": "Ensure license implication rules are configured and are scanned automatically.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.2.4",
+ "Description": "Ensure packages are automatically scanned for ownership change",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "3.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Scan every package automatically for ownership change.",
+ "RationaleStatement": "A change in package ownership is not a regular action. In some cases it can lead to a massive problem (for example, the \"event-stream\" incident). Open-source contributors are not always trusted, since by its very nature everyone can contribute. This means malicious actors can become contributors as well. Package maintainers might transfer their ownership to someone they do not know if maintaining the package is too much for them, in some cases without the other user's knowledge. This has led to known security breaches in the past. It is best to be aware of such activity as soon as it happens and to carefully examine the situation before continuing using the package in order to determine its safety.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Set automatic scanning of packages for ownership change.",
+ "AuditProcedure": "Ensure automatic scanning of packages for ownership change is set.",
+ "AdditionalInformation": "",
+ "References": "https://blog.npmjs.org/post/182828408610/the-security-risks-of-changing-package-owners.html:https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident"
+ }
+ ]
+ },
+ {
+ "Id": "4.1.1",
+ "Description": "Ensure all artifacts are signed by the build pipeline itself",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Configure the build pipeline to sign every artifact it produces and verify that each artifact has the appropriate signature.",
+ "RationaleStatement": "A cryptographic signature can be used to verify artifact authenticity. The signature created with a certain key is unique and not reversible, thus making it unique to the author. This means that an attacker tampering with a signed artifact will be noticed immediately using a simple verification step because the signature will change. Signing artifacts by the build pipeline that produces them ensures the integrity of those artifacts.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Sign every artifact produced with the build pipeline that created it. Configure the build pipeline to sign each artifact.\n \n\n Steps from GitHub Documentation:\n \n\n You can follow the steps below to sign artifacts in GitHub actions. The trick involves loading in your private key into GitHub Actions using the gpg command-line commands.\n \n\n Export your gpg private key from the system that you have created it.\n Find your key-id (using gpg --list-secret-keys --keyid-format=long)\n Export the gpg secret key to an ASCII file using gpg --export-secret-keys -a > secret.txt\n Edit secret.txt using a plain text editor, and replace all newlines with a literal \"\\n\" until everything is on a single line\n Set up GitHub Actions secrets\n Create a secret called OSSRH_GPG_SECRET_KEY using the text from your edited secret.txt file (the whole text should be in a single line)\n Create a secret called OSSRH_GPG_SECRET_KEY_PASSWORD containing the password for your gpg secret key\n Create a GitHub Actions step to install the gpg secret key\n Add an action similar to:\n ```\n - id: install-secret-key\n name: Install gpg secret key\n run: |\n cat <(echo -e \"${{ secrets.OSSRH_GPG_SECRET_KEY }}\") | gpg --batch --import\n gpg --list-secret-keys --keyid-format LONG\n ```\n Verify that the secret key is shown in the GitHub Actions logs\n You can remove the output from list secret keys if you are confident that this action will work, but it is better to leave it in there\n Bring it all together, and create a GitHub Actions step to publish\n Add an action similar to:\n ```\n - id: publish-to-central\n name: Publish to Central Repository\n env:\n MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}\n MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}\n run: |\n mvn \\\n --no-transfer-progress \\\n --batch-mode \\\n -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \\\n clean deploy\n ```\n After a couple of hours, verify that the artifact got published to The Central Repository",
+ "AuditProcedure": "Verify that the build pipeline signs every new artifact it produces and all artifacts are signed.\n \n\n There are many different signing tools or options each have there own method or commands to verify that the code or package created is signed.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/code-security/supply-chain-security/end-to-end-supply-chain/securing-builds:https://gist.github.com/sualeh/ae78dc16123899d7942bc38baba5203c"
+ }
+ ]
+ },
+ {
+ "Id": "4.1.2",
+ "Description": "Ensure artifacts are encrypted before distribution",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Encrypt artifacts before they are distributed and ensure only trusted platforms have decryption capabilities.",
+ "RationaleStatement": "Build artifacts might contain sensitive data such as production configurations. In order to protect them and decrease the risk for breach, it is recommended to encrypt them before delivery. Encryption makes data unreadable, so even if attackers gain access to these artifacts, they won't be able to harvest sensitive data from them without the decryption key.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Encrypt every artifact before distribution.",
+ "AuditProcedure": "Ensure every artifact is encrypted before it is delivered.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "4.1.3",
+ "Description": "Ensure only authorized platforms have decryption capabilities of artifacts",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Grant decryption capabilities of artifacts only to trusted and authorized platforms.",
+ "RationaleStatement": "Build artifacts might contain sensitive data such as production configuration. To protect them and decrease the risk of a breach, it is recommended to encrypt them before delivery. This will make them unreadable for every unauthorized user who doesn't have the decryption key. By implementing this, the decryption capabilities become overly sensitive in order to prevent a data leak or theft. Ensuring that only trusted and authorized platforms can decrypt the organization's packages decreases the possibility for an attacker to gain access to the critical data in artifacts.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Grant decryption capabilities of the organization's artifacts only for trusted and authorized platforms.",
+ "AuditProcedure": "Ensure only trusted and authorized platforms have decryption capabilities of the organization's artifacts.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "",
+ "Description": "Access to Artifacts",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.2",
+ "Profile": "",
+ "AssessmentStatus": "",
+ "Description": "This section consists of security recommendations for access management of artifacts. \n \n\n Artifacts are often stored in registries, some external and some internal. Those registries have user entities that control access and permissions. Artifacts are considered sensitive, because they are being delivered to the costumer, and are prune to many attacks: data theft, dependency confusion, malicious packages and more. That's why their access management should be restrictive and careful.",
+ "RationaleStatement": "",
+ "ImpactStatement": "",
+ "RemediationProcedure": "",
+ "AuditProcedure": "",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "4.2.1",
+ "Description": "Ensure the authority to certify artifacts is limited",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Software certification is used to verify the safety of certain software usage and to establish trust between the supplier and the consumer. Any artifact can be certified. Limit the authority to certify different artifacts.",
+ "RationaleStatement": "Artifact certification is a powerful tool in establishing trust. Clients use a software certificate to verify that the artifact is safe to use according to their security policies. Because of this, certifying artifacts is considered sensitive. If an artifact is for debugging or internal use, or if it were compromised, the organization would not want certification. An attacker gaining access to both certificate authority and the artifact registry might also be able to certify its own artifact and cause a major breach. To prevent these issues, limit which artifacts can be certified by which platform so there will be minimal access to certification.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Limit which artifact can be certified by which authority.",
+ "AuditProcedure": "Ensure only certain artifacts can be certified by certain parties.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "4.2.2",
+ "Description": "Ensure number of permitted users who may upload new artifacts is minimized",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Minimize ability to upload artifacts to the lowest number of trusted users possible.",
+ "RationaleStatement": "Artifacts might contain sensitive data. Even the simplest mistake can also lead to trust issues with customers and harm the integrity of the product. To decrease these risks, allow only trusted and qualified users to upload new artifacts. Those users are less likely to make mistakes. Having the lowest number of such users possible will also decrease the risk of hacked user accounts, which could lead to a massive breach or artifact compromising.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Allow only trusted and qualified users to upload new artifacts and limit them in number.",
+ "AuditProcedure": "Ensure only trusted and qualified users can upload new artifacts, and that their number is the lowest possible.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "4.2.3",
+ "Description": "Ensure user access to the package registry utilizes Multi-Factor Authentication (MFA)",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.2",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Enforce Multi-Factor Authentication (MFA) for user access to the package registry.",
+ "RationaleStatement": "By default, every user authenticates to the system by password only. If a user's password is compromised, the user account and all its related packages are in danger of data theft and malicious builds. It is therefore recommended that each user enables Multi-Factor Authentication. This additional step guarantees that the account stays secure even if the user's password is compromised, as it adds another layer of authentication.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each package registry in use, enforce Multi-Factor Authentication as the only way to authenticate.",
+ "AuditProcedure": "For each package registry in use, verify that Multi-Factor Authentication is enforced and is the only way to authenticate.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "4.2.4",
+ "Description": "Ensure user management of the package registry is not local",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Manage users and their access to the package registry with an external authentication server and not with the package registry itself.",
+ "RationaleStatement": "Some package registries offer a tool for user management, aside from the main Lightweight Directory Access Protocol (LDAP) or Active Directory (AD) server of the organization. That tool usually offers simple authentication and role-based permissions, which might not be granular enough. Having multiple user management tools in the organization could result in confusion and privilege escalation, as there will be more to manage. To avoid a situation where users escalate their privileges because someone missed them, manage user access to the package registry via the main authentication server and not locally on the package registry.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each package registry, use the main authentication server of the organization for user management and do not manage locally.",
+ "AuditProcedure": "For each package registry, verify that its user access is not managed locally, but instead with the main authentication server of the organization.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "4.2.5",
+ "Description": "Ensure anonymous access to artifacts is revoked",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "For GitHub Private or Internal repositories anonymous access is not available. Verify that all repos that require access controls are Private or Internal.",
+ "RationaleStatement": "Disable the option to view artifacts as an anonymous user in order to protect private artifacts from being exposed.",
+ "ImpactStatement": "Only logged and authorized users will be able to access artifacts.",
+ "RemediationProcedure": "Changing a repository's visibility\n \n\n 1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.\n 1. Under your repository name, click Settings\n 1. Under \"Danger Zone\", to the right of to \"Change repository visibility\", click Change visibility.\n 1. Select a visibility.\n \n\n 1. Choose \n - Mark private\n - Make Internal\n \n\n 6. To verify that you're changing the correct repository's visibility, type the name of the repository you want to change the visibility of.",
+ "AuditProcedure": "To Audit the existing settings:\n \n\n 1. On your GitHub Enterprise Server instance, navigate to the main page of the repository.\n 1. Under your repository name, click Settings\n 3. Under \"Danger Zone\", to the right of to \"Change repository visibility\", click Change visibility.\n \n\n Review the current selection.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/enterprise-server@3.3/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility"
+ }
+ ]
+ },
+ {
+ "Id": "4.2.6",
+ "Description": "Ensure minimum number of administrators are set for the package registry",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Ensure the package registry has a minimum number of administrators.",
+ "RationaleStatement": "Package registry admins have the ability to add/remove users, repositories, packages. Due to the permissive access granted to an admin, it is highly recommended to keep the number of administrator accounts as minimal as possible.",
+ "ImpactStatement": "Administrator privileges are required to provide and maintain a secure and stable platform but allowing extraneous administrator accounts can create a vulnerability.",
+ "RemediationProcedure": "Set the minimum number of administrators in your package registry.\n \n\n To accomplish this:\n \n\n For each repository that you administer on GitHub, you can see an overview of every team or person with access to the repository. From the overview, choose Manage access and provide access to the appropriate people or teams.",
+ "AuditProcedure": "Verify that your package registry has only the minimum number of administrators.\n \n\n For each repository that you administer on GitHub, you can see an overview of every team or person with access to the repository. From the overview, you can also invite new teams or people, change each team or person's role for the repository, or remove access to the repository.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository"
+ }
+ ]
+ },
+ {
+ "Id": "4.3.1",
+ "Description": "Ensure all signed artifacts are validated upon uploading the package registry",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Validate artifact signatures before uploading to the package registry.",
+ "RationaleStatement": "Cryptographic signature is a tool to verify artifact authenticity. Every artifact is supposed to be signed by its creator in order to confirm that it was not compromised before reaching the client. Validating an artifact signature before delivering it is another level of protection which ensures the signature has not been changed, meaning no one tried or succeeded in tampering with the artifact. This creates trust between the supplier and the client.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Validate every artifact with its signature before uploading it to the package registry. It is recommended to do so automatically.",
+ "AuditProcedure": "Ensure every artifact in the package registry has been validated with its signature.\n \n\n 1. On GitHub, navigate to a pull request\n 2. On the pull request, click <> Commits and view the detailed information regarding the signature.",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification:https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
+ }
+ ]
+ },
+ {
+ "Id": "4.3.2",
+ "Description": "Ensure all versions of an existing artifact have their signatures validated",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Validate the signature of all versions of an existing artifact.",
+ "RationaleStatement": "In order to be certain a version of an existing and trusted artifact is not malicious or delivered by someone looking to interfere with the supply chain, it is a good practice to validate the signatures of each version. Doing so decreases the risk of using a compromised artifact, which might lead to a breach.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each artifact, sign and validate each version before uploading or using the artifact.",
+ "AuditProcedure": "For each artifact, ensure that all of its versions are signed and validated before it is uploaded or used.\n \n\n Ensure every artifact in the package registry has been validated with its signature.\n \n\n On GitHub, navigate to a pull request\n On the pull request, click <> Commits and view the detailed information regarding the signature.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "4.3.3",
+ "Description": "Ensure changes in package registry configuration are audited",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Audit changes of the package registry configuration.",
+ "RationaleStatement": "The package registry is a crucial component in the software supply chain. It stores artifacts with potentially sensitive data that will eventually be deployed and used in production. Every change made to the package registry configuration must be examined carefully to ensure no exposure of the registry's sensitive data. This examination also ensures no malicious actors have performed modifications to a stored artifact. Auditing the configuration and its changes helps in decreasing such risks.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Audit the changes to the package registry configuration.",
+ "AuditProcedure": "Verify that all changes to the packages registry configuration are audited.\n \n\n Search the audit log with\n \n\n repo category actions",
+ "AdditionalInformation": "",
+ "References": "https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization"
+ }
+ ]
+ },
+ {
+ "Id": "4.3.4",
+ "Description": "Ensure webhooks of the repository are secured",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.3",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Use secured webhooks to reduce the possibility of malicious payloads.",
+ "RationaleStatement": "Webhooks are used for triggering an HTTP request based on an action made in the platform. Typically, package registries feature webhooks when a package receives an update. Since webhooks are an HTTP POST request, they can be malformed if not secured over SSL. To prevent a potential hack and compromise of the webhook or to the registry or web server excepting the request, use only secured webhooks.",
+ "ImpactStatement": "Reduces the payloads that the web hook can listen for and recieve.",
+ "RemediationProcedure": "For each webhook in use, change it to secured (over HTTPS).",
+ "AuditProcedure": "",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "4.4.1",
+ "Description": "Ensure artifacts contain information about their origin",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "4.4",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "When delivering artifacts, ensure they have information about their origin. This may be done by providing a Software Bill of Manufacture (SBOM) or some metadata files.",
+ "RationaleStatement": "Information about artifact origin can be used for verification purposes. Having this kind of information allows the user to decide if the organization supplying the artifact is trusted. In a case of potential vulnerability or version update, this can be used to verify that the organization issuing it is the actual origin and not someone else. If users need to report problems with the artifact, they will have an address to contact as well.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each artifact supplied, supply information about its origin. For each artifact in use, ask for information about its origin.",
+ "AuditProcedure": "For each artifact, ensure it has information about its origin.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.1.1",
+ "Description": "Ensure deployment configuration files are separated from source code",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Deployment configurations are often stored in a version control system. Separate deployment configuration files from source code repositories.",
+ "RationaleStatement": "Deployment configuration manifests are often stored in version control systems. Storing them in dedicated repositories, separately from source code repositories, has several benefits. First, it adds order to both maintenance and version control history. This makes it easier to track code or manifest changes, as well as spot any malicious code or misconfigurations. Second, it helps achieve the Least Privilege principle. Because access can be configured differently for each repository, fewer users will have access to this configuration, which is typically sensitive.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Store each deployment configuration file in a dedicated repository separately from source code.",
+ "AuditProcedure": "Ensure each deployment configuration file is stored separately from source code.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.1.2",
+ "Description": "Ensure changes in deployment configuration are audited",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Audit and track changes made in deployment configuration.",
+ "RationaleStatement": "Deployment configuration is sensitive in nature. The tiniest mistake can lead to downtime or bugs in production, which consequently may have a direct effect on both product integrity and customer trust. Misconfigurations might also be used by malicious actors to attack the production platform. Because of this, every change in the configuration needs a review and possible \"revert\" in case of a mistake or malicious change. Auditing every change and tracking them helps detect and fix such incidents more quickly.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each deployment configuration, track and audit changes made to it.",
+ "AuditProcedure": "For each deployment configuration, ensure changes made to it are audited and tracked.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.1.3",
+ "Description": "Ensure scanners are in place to identify and prevent sensitive data in deployment configuration",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Detect and prevent sensitive data – such as confidential ID numbers, passwords, etc. – in deployment configurations.",
+ "RationaleStatement": "Sensitive data in deployment configurations might create a major incident if an attacker gains access to it, as this can cause data loss and theft. It is important to keep sensitive data safe and to not expose it in the configuration. In order to prevent a possible exposure, set scanners that will identify and prevent such data in deployment configurations.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each deployment configuration file, set scanners to identify and prevent sensitive data within it.",
+ "AuditProcedure": "For each deployment configuration file, verify that scanners are set to identify and prevent the existence of sensitive data within it.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.1.4",
+ "Description": "Limit access to deployment configurations",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Restrict access to the deployment configuration to trusted and qualified users only.",
+ "RationaleStatement": "Deployment configurations are sensitive in nature. The tiniest mistake can lead to downtime or bugs in production, which can have a direct effect on the product's integrity and customer trust. Misconfigurations might also be used by malicious actors to attack the production platform. To avoid such harm as much as possible, ensure only trusted and qualified users have access to such configurations. This will also reduce the number of accounts that might affect the environment in case of an attack.",
+ "ImpactStatement": "Reducing the number of users who have access to the deployment configuration means those users would lose their ability to make direct changes to that configuration.",
+ "RemediationProcedure": "Restrict access to the deployment configuration to trusted and qualified users.",
+ "AuditProcedure": "Verify each deployment configuration is accessible only to known and authorized users.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.1.5",
+ "Description": "Scan Infrastructure as Code (IaC)",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1",
+ "Profile": "Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Detect and prevent misconfigurations or insecure instructions in Infrastructure as Code (IaC) files, such as Terraform files.",
+ "RationaleStatement": "Infrastructure as Code (IaC) files are used for production environment and application deployment. These are sensitive parts of the software supply chain because they are always in touch with customers, and thus might affect their opinion of or trust in the product. Attackers often target these environments. Detecting and fixing misconfigurations and/or insecure instructions in IaC files decreases the risk for data leak or data theft. It is important to secure IaC instructions in order to prevent further problems of deployment, exposed assets, or improper configurations, which might ultimately lead to easier ways to attack and steal organization data.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For every Infrastructure as Code (IaC) instructions file, set scanners to identify and prevent misconfigurations and insecure instructions.",
+ "AuditProcedure": "For every Infrastructure as Code (IaC) instructions file, verify that scanners are set to identify and prevent misconfigurations and insecure instructions.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.1.6",
+ "Description": "Ensure deployment configuration manifests are verified",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Verify the deployment configuration manifests.",
+ "RationaleStatement": "To ensure that the configuration manifests used are trusted and have not been infected by malicious actors before arriving at the platform, it is important to verify the manifests. This may be done by comparing the checksum of the manifest file to its checksum in a trusted source. If a difference arises, this is a sign that an unknown actor has interfered and may have added malicious instructions. If this manifest is used, it might harm the environment and application deployment, which could end in a massive breach and leave the organization exposed to data leaks, etc.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Verify each deployment configuration manifest in use.",
+ "AuditProcedure": "For each deployment configuration manifest in use, ensure it has been verified.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.1.7",
+ "Description": "Ensure deployment configuration manifests are pinned to a specific, verified version",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Deployment configuration is often stored in a version control system and is pulled from there. Pin the configuration used to a specific, verified version or commit Secure Hash Algorithm (SHA). Avoid referring configuration without its version tag specified.",
+ "RationaleStatement": "Deployment configuration manifests are often stored in version control systems and pulled from there either by automation platforms, for example Ansible, or GitOps platforms, such as ArgoCD. When a manifest is pulled from a version control system without tag or commit Secure Hash Algorithm (SHA) specified, it is pulled from the HEAD revision, which is equal to the 'latest' tag, and pulls the last change made. This increases the risk of encountering a new, potentially malicious configuration. If an attacker pushes malicious configuration to the version control system, the next user who pulls the HEAD revision will pull it and risk attack. To avoid that risk, use a version tag of verified version or a commit SHA of a trusted commit, which will ensure this is the only version pulled.",
+ "ImpactStatement": "Changes in deployment configuration will not be pulled unless their version tag or commit Secure Hash Algorithm (SHA) is specified. This might slow down the deployment process.",
+ "RemediationProcedure": "For every deployment configuration manifest in use, pin to a specific version or commit Secure Hash Algorithm (SHA).",
+ "AuditProcedure": "For every deployment configuration manifest in use, ensure it is pinned to a specific version or commit Secure Hash Algorithm (SHA).",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.1",
+ "Description": "Ensure deployments are automated",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Automate deployments of production environment and application.",
+ "RationaleStatement": "Automating the deployments of both production environment and applications reduces the risk for human mistakes — such as a wrong configuration or exposure of sensitive data — because it requires less human interaction or intervention. It also eases redeployment of the environment. It is best to automate with Infrastructure as Code (IaC) because it offers more control over changes made to the environment creation configuration and stores to a version control platform.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Automate each deployment process of the production environment and application.",
+ "AuditProcedure": "For each deployment process, ensure it is automated.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2",
+ "Description": "Ensure the deployment environment is reproducible",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Verify that the deployment environment – the orchestrator and the production environment where the application is deployed – is reproducible. This means that the environment stays the same in each deployment if the configuration has not changed.",
+ "RationaleStatement": "A reproducible build is a build that produces the same artifact when given the same input data, and in this case the same environment. Ensuring that the same environment is produced when given the same input helps verify that no change has been made to it. This action allows an organization to trust that its deployment environment is built only from safe code and configuration that has been reviewed and tested and has not been tainted or changed abruptly.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "Adjust the process that deploys the deployment/production environment to build the same environment each time when the configuration has not changed.",
+ "AuditProcedure": "Verify that the deployment/production environment is reproducible.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.3",
+ "Description": "Ensure access to production environment is limited",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Restrict access to the production environment to a few trusted and qualified users only.",
+ "RationaleStatement": "The production environment is an extremely sensitive one. It directly affects the customer experience and trust in a product, which has serious effects on the organization itself. Because of this sensitive nature, it is important to restrict access to the production environment to only a few trusted and qualified users. This will reduce the risk of mistakes such as exposure of secrets or misconfiguration. This restriction also reduces the number of accounts that are vulnerable to hijacking in order to potentially harm the production environment.",
+ "ImpactStatement": "Reducing the number of users who have access to the production environment means those users would lose their ability to make direct changes to that environment.",
+ "RemediationProcedure": "Restrict access to the production environment to trusted and qualified users.",
+ "AuditProcedure": "Verify that the production environment is accessible only to trusted and qualified users.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.4",
+ "Description": "Ensure default passwords are not used",
+ "Checks": [
+ ""
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2",
+ "Profile": "Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Do not use default passwords of deployment tools and components.",
+ "RationaleStatement": "Many deployment tools and components are provided with default passwords for the first login. This password is intended to be used only on the first login and should be changed immediately after. Using the default password substantially increases the attack risk. It is very important to ensure that default passwords are not used in deployment tools and components.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "For each deployment tool, change the password.",
+ "AuditProcedure": "For each deployment tool, ensure the password is not the default one.",
+ "AdditionalInformation": "",
+ "References": ""
+ }
+ ]
+ }
+ ]
+}
diff --git a/prowler/compliance/m365/cis_4.0_m365.json b/prowler/compliance/m365/cis_4.0_m365.json
index a85f8a953d..608258a387 100644
--- a/prowler/compliance/m365/cis_4.0_m365.json
+++ b/prowler/compliance/m365/cis_4.0_m365.json
@@ -6,127 +6,2653 @@
"Requirements": [
{
"Id": "1.1.1",
- "Description": "Ensure Administrative accounts are cloud-only",
- "Checks": [],
+ "Description": "Administrative accounts are special privileged accounts that could have varying levels of access to data, users, and settings. Regular user accounts should never be utilized for administrative tasks and care should be taken, in the case of a hybrid environment, to keep Administrative accounts separated from on-prem accounts. Administrative accounts should not have applications assigned so that they have no access to potentially vulnerable services (EX. email, Teams, SharePoint, etc.) and only access to perform tasks as needed for administrative purposes.Ensure administrative accounts are not `On-premises sync enabled`.",
+ "Checks": [
+ "entra_admin_account_cloud_only"
+ ],
"Attributes": [
{
- "Section": "1.Microsoft 365 admin center",
- "Profile": "Level 1",
- "AssessmentStatus": "Manual",
- "Description": "Administrative accounts are special privileged accounts that could have varying levels of access to data, users, and settings. Regular user accounts should never be utilized for administrative tasks and care should be taken, in the case of a hybrid environment, to keep Administrative accounts separated from on-prem accounts. Administrative accounts should not have applications assigned so that they have no access to potentially vulnerable services (e.g., email, Teams, SharePoint, etc.) and only access to perform tasks as needed for administrative purposes. Ensure administrative accounts are not On-premises sync enabled.",
+ "Section": "1.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Administrative accounts are special privileged accounts that could have varying levels of access to data, users, and settings. Regular user accounts should never be utilized for administrative tasks and care should be taken, in the case of a hybrid environment, to keep Administrative accounts separated from on-prem accounts. Administrative accounts should not have applications assigned so that they have no access to potentially vulnerable services (EX. email, Teams, SharePoint, etc.) and only access to perform tasks as needed for administrative purposes.Ensure administrative accounts are not `On-premises sync enabled`.",
"RationaleStatement": "In a hybrid environment, having separate accounts will help ensure that in the event of a breach in the cloud, that the breach does not affect the on-prem environment and vice versa.",
- "ImpactStatement": "Administrative users will have to switch accounts and utilize login/logout functionality when performing administrative tasks, as well as not benefiting from SSO. This will require a migration process from the 'daily driver' account to a dedicated admin account. When migrating permissions to the admin account, both M365 and Azure RBAC roles should be migrated as well. Once the new admin accounts are created, both of these permission sets should be moved from the daily driver account to the new admin account. Failure to migrate Azure RBAC roles can cause an admin to not be able to see their subscriptions/resources while using their admin accounts.",
- "RemediationProcedure": "Review all administrative accounts and ensure they are configured as cloud-only. Remove any on-premises synchronization for these accounts. Assign necessary roles and permissions exclusively to the dedicated cloud administrative accounts.",
- "AuditProcedure": "Log in to the Microsoft 365 Admin Center and review the list of administrative accounts. Verify that none of them are on-premises sync enabled.",
- "AdditionalInformation": "This recommendation is particularly relevant for hybrid environments and is aimed at enhancing the security of administrative accounts by isolating them from on-prem infrastructure.",
- "DefaultValue": "By default, administrative accounts may be either cloud-only or hybrid. This setting needs to be verified and adjusted according to the recommendation.",
- "References": "CIS Microsoft 365 Foundations Benchmark v4.0, Section 1.1.1"
+ "ImpactStatement": "Administrative users will have to switch accounts and utilizing login/logout functionality when performing administrative tasks, as well as not benefiting from SSO. This will require a migration process from the 'daily driver' account to a dedicated admin account.When migrating permissions to the admin account, both M365 and Azure RBAC roles should be migrated as well. Once the new admin accounts are created both of these permission sets should be moved from the daily driver account to the new admin account. Failure to migrate Azure RBAC roles can cause an admin to not be able to see their subscriptions/resources while using their admin accounts.",
+ "RemediationProcedure": "Remediation will require first identifying the privileged accounts that are synced from on-premises and then creating a new cloud-only account for that user. Once a replacement account is established, the hybrid account should have its role reduced to that of a non-privileged user or removed depending on the need.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Users` select `All users`.3. To the right of the search box click the `Add filter` button.4. Add the `On-premises sync enabled` filter and click `Apply.`5. For each user account known to be in an administrative role verify it is not present in the filtered list.**To audit using PowerShell:** 1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"RoleManagement.Read.Directory\",\"User.Read.All\"`2. Run the following PowerShell script:```# Get privileged role IDs$PrivilegedRoles = $DirectoryRoles | Where-Object { $_.DisplayName -like \"*Administrator*\" -or $_.DisplayName -eq \"Global Reader\"}# Get the members of these various roles$RoleMembers = $PrivilegedRoles | ForEach-Object { Get-MgDirectoryRoleMember -DirectoryRoleId $_.Id } | Select-Object Id -Unique# Retrieve details about the members in these roles$PrivilegedUsers = $RoleMembers | ForEach-Object { Get-MgUser -UserId $_.Id -Property UserPrincipalName, DisplayName, Id, OnPremisesSyncEnabled}$PrivilegedUsers | Where-Object { $_.OnPremisesSyncEnabled -eq $true } | ft DisplayName,UserPrincipalName,OnPremisesSyncEnabled```3. The script will output any hybrid users that are also members of privileged roles. If nothing returns then no users with that criteria exist.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/add-users?view=o365-worldwide:https://learn.microsoft.com/en-us/microsoft-365/enterprise/protect-your-global-administrator-accounts?view=o365-worldwide:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/best-practices#9-use-cloud-native-accounts-for-microsoft-entra-roles:https://learn.microsoft.com/en-us/entra/fundamentals/whatis:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference",
+ "DefaultValue": "N/A"
}
]
},
{
"Id": "1.1.2",
- "Description": "Ensure two emergency access accounts have been defined",
+ "Description": "Emergency access or \"break glass\" accounts are limited for emergency scenarios where normal administrative accounts are unavailable. They are not assigned to a specific user and will have a combination of physical and technical controls to prevent them from being accessed outside a true emergency. These emergencies could be due to several things, including:- Technical failures of a cellular provider or Microsoft related service such as MFA.- The last remaining Global Administrator account is inaccessible.Ensure two `Emergency Access` accounts have been defined.**Note:** Microsoft provides several recommendations for these accounts and how to configure them. For more information on this, please refer to the references section. The CIS Benchmark outlines the more critical things to consider.",
"Checks": [],
"Attributes": [
{
- "Section": "1.Microsoft 365 admin center",
- "Profile": "Level 1",
+ "Section": "1.1",
+ "Profile": "E3 Level 1",
"AssessmentStatus": "Manual",
- "Description": "Emergency access or 'break glass' accounts are limited for emergency scenarios where normal administrative accounts are unavailable. They are not assigned to a specific user and will have a combination of physical and technical controls to prevent them from being accessed outside a true emergency. These emergencies could include technical failures of a cellular provider or Microsoft-related service such as MFA, or the last remaining Global Administrator account becoming inaccessible. Ensure two Emergency Access accounts have been defined.",
- "RationaleStatement": "In various situations, an organization may require the use of a break glass account to gain emergency access. Losing access to administrative functions could result in a significant loss of support capability, reduced visibility into the security posture, and potential financial losses.",
- "ImpactStatement": "Improper implementation of emergency access accounts could weaken the organization's security posture. To mitigate this, at least one account should be excluded from all conditional access rules, and strong authentication mechanisms (e.g., long, high-entropy passwords or FIDO2 security keys) must be used to secure the accounts.",
- "RemediationProcedure": "Create two emergency access accounts and configure them according to Microsoft's recommendations. Ensure that these accounts are not assigned to specific users and are excluded from all conditional access rules. Secure the accounts with strong passwords or passwordless authentication methods, such as FIDO2 security keys. Regularly review and test these accounts to confirm their functionality.",
- "AuditProcedure": "Log in to the Microsoft 365 Admin Center and verify the existence of at least two emergency access accounts. Check their configurations to ensure they comply with Microsoft's recommendations, including exclusion from conditional access rules and proper security settings.",
- "AdditionalInformation": "Emergency access accounts are critical for maintaining administrative control during unexpected events. Regular audits and strict access controls are recommended to prevent misuse.",
- "DefaultValue": "By default, emergency access accounts are not configured. Organizations must create and secure these accounts proactively.",
- "References": "CIS Microsoft 365 Foundations Benchmark v4.0, Section 1.1.2; Microsoft documentation on emergency access accounts."
+ "Description": "Emergency access or \"break glass\" accounts are limited for emergency scenarios where normal administrative accounts are unavailable. They are not assigned to a specific user and will have a combination of physical and technical controls to prevent them from being accessed outside a true emergency. These emergencies could be due to several things, including:- Technical failures of a cellular provider or Microsoft related service such as MFA.- The last remaining Global Administrator account is inaccessible.Ensure two `Emergency Access` accounts have been defined.**Note:** Microsoft provides several recommendations for these accounts and how to configure them. For more information on this, please refer to the references section. The CIS Benchmark outlines the more critical things to consider.",
+ "RationaleStatement": "In various situations, an organization may require the use of a break glass account to gain emergency access. In the event of losing access to administrative functions, an organization may experience a significant loss in its ability to provide support, lose insight into its security posture, and potentially suffer financial losses.",
+ "ImpactStatement": "If care is not taken in properly implementing an emergency access account this could weaken security posture. Microsoft recommends to excluding at least one of these accounts from all conditional access rules therefore passwords must have sufficient entropy and length to protect against random guesses. FIDO2 security keys may be used instead of a password for secure passwordless solution.",
+ "RemediationProcedure": "**Step 1 - Create two emergency access accounts:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com2. Expand `Users` > `Active Users`3. Click `Add user` and create a new user with this criteria: - Name the account in a way that does NOT identify it with a particular person. - Assign the account to the default `.onmicrosoft.com` domain and not the organization's. - The password must be at least 16 characters and generated randomly. - Do not assign a license. - Assign the user the `Global Administrator` role.4. Repeat the above steps for the second account.**Step 2 - Exclude at least one account from conditional access policies:**1. Navigate `Microsoft Entra admin center` https://entra.microsoft.com/2. Expand `Protection` > `Conditional Access`.3. Inspect the conditional access policies.4. For each rule add an exclusion for at least one of the emergency access accounts.5. `Users` > `Exclude` > `Users and groups` and select one emergency access account.**Step 3 - Ensure the necessary procedures and policies are in place:**- In order for accounts to be effectively used in a break glass situation the proper policies and procedures must be authorized and distributed by senior management.- FIDO2 Security Keys should be locked in a secure separate fireproof location. - Passwords should be at least 16 characters, randomly generated and MAY be separated in multiple pieces to be joined on emergency.**Warning:** As of 10/15/2024 MFA is required for all users including Break Glass Accounts. It is recommended to update these accounts to use passkey (FIDO2) or configure certificate-based authentication for MFA. Both methods satisfy the MFA requirement.**Additional suggestions for emergency account management:**- Create access reviews for these users.- Exclude users from conditional access rules.- Add the account to a [restricted management administrative unit](https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/admin-units-restricted-management).**Warning**: If CA (conditional access) exclusion is managed by a group, this group should be added to PIM for groups (licensing required) or be created as a role-assignable group. If it is a regular security group, then users with the Group Administrators role are able to bypass CA entirely.",
+ "AuditProcedure": "**Step 1 - Ensure a policy and procedure is in place at the organization:**- In order for accounts to be effectively used in a break-glass situation the proper policies and procedures must be authorized and distributed by senior management.- FIDO2 Security Keys should be locked in a secure separate fireproof location. - Passwords should be at least 16 characters, randomly generated and MAY be separated in multiple pieces to be joined on emergency.**Step 2 - Ensure two emergency access accounts are defined:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com2. Expand `Users` > `Active Users`3. Inspect the designated emergency access accounts and ensure the following: - The accounts are named correctly, and do NOT identify with a particular person. - The accounts use the default `.onmicrosoft.com` domain and not the organization's. - The accounts are cloud-only. - The accounts are unlicensed. - The accounts are assigned the `Global Administrator` directory role.**Step 3 - Ensure at least one account is excluded from all conditional access rules:**1. Navigate `Microsoft Entra admin center` https://entra.microsoft.com/2. Expand `Protection` > `Conditional Access`.3. Inspect the conditional access rules.4. Ensure one of the emergency access accounts is excluded from all rules.**Warning:** As of 10/15/2024 MFA is required for all users including Break Glass Accounts. It is recommended to update these accounts to use passkey (FIDO2) or configure certificate-based authentication for MFA. Both methods satisfy the MFA requirement.",
+ "AdditionalInformation": "Microsoft has additional instructions regarding using Azure Monitor to capture events in the Log Analytics workspace, and then generate alerts for Emergency Access accounts. This requires an Azure subscription but should be strongly considered as a method of monitoring activity on these accounts:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-emergency-access#monitor-sign-in-and-audit-logs",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-planning#stage-1-critical-items-to-do-right-now:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/security-emergency-access:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/admin-units-restricted-management:https://learn.microsoft.com/en-us/entra/identity/authentication/concept-mandatory-multifactor-authentication#accounts",
+ "DefaultValue": "Not defined."
}
]
},
{
"Id": "1.1.3",
- "Description": "Ensure that between two and four global admins are designated",
+ "Description": "More than one global administrator should be designated so a single admin can be monitored and to provide redundancy should a single admin leave an organization. Additionally, there should be no more than four global admins set for any tenant. Ideally global administrators will have no licenses assigned to them.",
"Checks": [
"admincenter_users_between_two_and_four_global_admins"
],
"Attributes": [
{
- "Section": "1.Microsoft 365 admin center",
- "Profile": "Level 1",
+ "Section": "1.1",
+ "Profile": "E3 Level 1",
"AssessmentStatus": "Automated",
- "Description": "More than one global administrator should be designated so a single admin can be monitored and to provide redundancy should a single admin leave an organization. Additionally, there should be no more than four global admins set for any tenant. Ideally, global administrators will have no licenses assigned to them.",
+ "Description": "More than one global administrator should be designated so a single admin can be monitored and to provide redundancy should a single admin leave an organization. Additionally, there should be no more than four global admins set for any tenant. Ideally global administrators will have no licenses assigned to them.",
"RationaleStatement": "If there is only one global tenant administrator, he or she can perform malicious activity without the possibility of being discovered by another admin. If there are numerous global tenant administrators, the more likely it is that one of their accounts will be successfully breached by an external attacker.",
- "ImpactStatement": "If there is only one global administrator in a tenant, an additional global administrator will need to be identified and configured. If there are more than four global administrators, a review of role requirements for current global administrators will be required to identify which of the users require global administrator access.",
- "RemediationProcedure": "Review the list of global administrators in the tenant and ensure there are at least two but no more than four accounts assigned this role. Remove excess global administrator accounts and create additional ones if necessary. Avoid assigning licenses to these accounts.",
- "AuditProcedure": "Log in to the Microsoft 365 Admin Center and review the list of global administrators. Verify that there are at least two but no more than four global administrators configured.",
- "AdditionalInformation": "Global administrators play a critical role in tenant management. Ensuring a proper number of global administrators improves redundancy and security.",
- "DefaultValue": "By default, there may be a single global administrator configured for the tenant. Organizations need to manually adjust the count as per best practices.",
- "References": "CIS Microsoft 365 Foundations Benchmark v4.0, Section 1.1.3"
+ "ImpactStatement": "The potential impact associated with ensuring compliance with this requirement is dependent upon the current number of global administrators configured in the tenant. If there is only one global administrator in a tenant, an additional global administrator will need to be identified and configured. If there are more than four global administrators, a review of role requirements for current global administrators will be required to identify which of the users require global administrator access.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft 365 admin center` https://admin.microsoft.com2. Select `Users` > `Active Users`.3. In the `Search` field enter the name of the user to be made a Global Administrator.4. To create a new Global Admin: 1. Select the user's name. 2. A window will appear to the right. 3. Select `Manage roles`. 4. Select `Admin center access`. 4. Check `Global Administrator`. 5. Click `Save changes`.5. To remove Global Admins: 1. Select User. 2. Under `Roles` select `Manage roles` 3. De-Select the appropriate role. 4. Click `Save changes`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to the `Microsoft 365 admin center` https://admin.microsoft.com2. Select `Users` > `Active Users`.3. Select `Filter` then select `Global Admins`.4. Review the list of `Global Admins` to confirm there are from two to four such accounts.**To audit using PowerShell:** 1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes Directory.Read.All`2. Run the following PowerShell script:```# Determine Id of role using the immutable RoleTemplateId value.$globalAdminRole = Get-MgDirectoryRole -Filter \"RoleTemplateId eq '62e90394-69f5-4237-9190-012177145e10'\"$globalAdmins = Get-MgDirectoryRoleMember -DirectoryRoleId $globalAdminRole.IdWrite-Host \"*** There are\" $globalAdmins.AdditionalProperties.Count \"Global Administrators assigned.\"```This information is also available via the Microsoft Graph Security API: ```GET https://graph.microsoft.com/beta/security/secureScores```**Note:** When tallying the number of Global Administrators the above does not account for Partner relationships. Those are located under `Settings` > `Partner Relationships` and should be reviewed on a reoccurring basis.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.identity.directorymanagement/get-mgdirectoryrole?view=graph-powershell-1.0:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#all-roles",
+ "DefaultValue": ""
}
]
},
{
"Id": "1.1.4",
- "Description": "Ensure administrative accounts use licenses with a reduced application footprint",
+ "Description": "Administrative accounts are special privileged accounts that could have varying levels of access to data, users, and settings. A license can enable an account to gain access to a variety of different applications, depending on the license assigned.The recommended state is to not license a privileged account or use `Microsoft Entra ID P1` or `Microsoft Entra ID P2` licenses.",
"Checks": [
"admincenter_users_admins_reduced_license_footprint"
],
"Attributes": [
{
- "Section": "1.Microsoft 365 admin center",
- "Profile": "Level 1",
+ "Section": "1.1",
+ "Profile": "E3 Level 1",
"AssessmentStatus": "Automated",
- "Description": "Administrative accounts are special privileged accounts with varying levels of access to data, users, and settings. It is recommended that privileged accounts either not be licensed or use Microsoft Entra ID P1 or Microsoft Entra ID P2 licenses to minimize application exposure.",
- "RationaleStatement": "Ensuring administrative accounts do not use licenses with applications assigned to them reduces the attack surface of high-privileged identities. This minimizes the likelihood of these accounts being targeted by social engineering attacks or exposed to malicious content via licensed applications. Administrative activities should be restricted to dedicated accounts without access to collaborative tools like mailboxes.",
- "ImpactStatement": "Administrative users will need to switch accounts to perform privileged actions, requiring login/logout functionality and potentially losing the convenience of SSO. Alerts sent to Global Administrators or TenantAdmins by default might not be received if these accounts lack application-based licenses. Proper alert routing must be configured to avoid missed notifications.",
- "RemediationProcedure": "Review the licenses assigned to administrative accounts. Remove licenses granting access to collaborative applications and assign Microsoft Entra ID P1 or P2 licenses if participation in Microsoft 365 security services is required. Configure alerts to be sent to valid email addresses for monitoring.",
- "AuditProcedure": "Log in to the Microsoft 365 Admin Center and review the licenses assigned to administrative accounts. Confirm that administrative accounts either have no licenses or are limited to Microsoft Entra ID P1 or P2 licenses without collaborative applications enabled.",
- "AdditionalInformation": "Reducing the application footprint of administrative accounts improves security by minimizing potential attack vectors. Special care should be taken to configure alert routing properly to ensure critical notifications are not missed.",
- "DefaultValue": "By default, administrative accounts may have licenses assigned based on organizational setup. Manual review and adjustment are necessary to comply with this recommendation.",
- "References": "CIS Microsoft 365 Foundations Benchmark v4.0, Section 1.1.4; Microsoft documentation on Entra ID licenses and privileged account security."
+ "Description": "Administrative accounts are special privileged accounts that could have varying levels of access to data, users, and settings. A license can enable an account to gain access to a variety of different applications, depending on the license assigned.The recommended state is to not license a privileged account or use `Microsoft Entra ID P1` or `Microsoft Entra ID P2` licenses.",
+ "RationaleStatement": "Ensuring administrative accounts do not use licenses with applications assigned to them will reduce the attack surface of high privileged identities in the organization's environment. Granting access to a mailbox or other collaborative tools increases the likelihood that privileged users might interact with these applications, raising the risk of exposure to social engineering attacks or malicious content. These activities should be restricted to an unprivileged 'daily driver' account.**Note:** In order to participate in Microsoft 365 security services such as Identity Protection, PIM and Conditional Access an administrative account will need a license attached to it. Ensure that the license used does not include any applications with potentially vulnerable services by using either **Microsoft Entra ID P1** or **Microsoft Entra ID P2** for the cloud-only account with administrator roles.",
+ "ImpactStatement": "Administrative users will have to switch accounts and utilize login/logout functionality when performing administrative tasks, as well as not benefiting from SSO.**Note:** Alerts will be sent to the **TenantAdmins**, including Global Administrators, by default. To ensure proper receipt, configure alerts to be sent to security or operations staff with valid email addresses or a security operations center. Otherwise, after adoption of this recommendation, alerts sent to **TenantAdmins** may go unreceived due to the lack of an application-based license assigned to the Global Administrator accounts.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Users` select `Active users`3. Click `Add a user`.4. Fill out the appropriate fields for Name, user, etc.5. When prompted to assign licenses select as needed `Microsoft Entra ID P1` or `Microsoft Entra ID P2`, then click `Next`.6. Under the `Option settings` screen you may choose from several types of privileged roles. Choose `Admin center access` followed by the appropriate role then click `Next`.7. Select `Finish adding`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Users` select `Active users`.3. Sort by the `Licenses` column.4. For each user account in an administrative role verify the account is assigned a license that is not associated with applications i.e. (Microsoft Entra ID P1, Microsoft Entra ID P2).**To audit using PowerShell:** 1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"RoleManagement.Read.Directory\",\"User.Read.All\"`2. Run the following PowerShell script:```$DirectoryRoles = Get-MgDirectoryRole# Get privileged role IDs$PrivilegedRoles = $DirectoryRoles | Where-Object { $_.DisplayName -like \"*Administrator*\" -or $_.DisplayName -eq \"Global Reader\"}# Get the members of these various roles$RoleMembers = $PrivilegedRoles | ForEach-Object { Get-MgDirectoryRoleMember -DirectoryRoleId $_.Id } | Select-Object Id -Unique# Retrieve details about the members in these roles$PrivilegedUsers = $RoleMembers | ForEach-Object { Get-MgUser -UserId $_.Id -Property UserPrincipalName, DisplayName, Id}$Report = [System.Collections.Generic.List[Object]]::new()foreach ($Admin in $PrivilegedUsers) { $License = $null $License = (Get-MgUserLicenseDetail -UserId $Admin.id).SkuPartNumber -join \", \" $Object = [pscustomobject][ordered]@{ DisplayName = $Admin.DisplayName UserPrincipalName = $Admin.UserPrincipalName License = $License } $Report.Add($Object)}$Report```3. The output will display users assigned privileged roles alongside their assigned licenses. Additional manual assessment is required to determine if the licensing is appropriate for the user.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/add-users?view=o365-worldwide:https://learn.microsoft.com/en-us/microsoft-365/enterprise/protect-your-global-administrator-accounts?view=o365-worldwide:https://learn.microsoft.com/en-us/entra/fundamentals/whatis:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference",
+ "DefaultValue": "N/A"
}
]
},
{
"Id": "1.2.1",
- "Description": "Ensure that only organizationally managed/approved public groups exist",
+ "Description": "Microsoft 365 Groups is the foundational membership service that drives all teamwork across Microsoft 365. With Microsoft 365 Groups, you can give a group of people access to a collection of shared resources. While there are several different group types this recommendation concerns **Microsoft 365 Groups**.In the Administration panel, when a group is created, the default privacy value is \"Public\".",
"Checks": [
"admincenter_groups_not_public_visibility"
],
"Attributes": [
{
- "Section": "1.Microsoft 365 admin center",
- "Profile": "Level 2",
+ "Section": "1.2",
+ "Profile": "E3 Level 2",
"AssessmentStatus": "Automated",
- "Description": "Microsoft 365 Groups enable shared resource access across Microsoft 365 services. The default privacy setting for groups is 'Public,' which allows users within the organization to access the group's resources. Ensure that only organizationally managed and approved public groups exist to prevent unauthorized access to sensitive information.",
- "RationaleStatement": "Public groups can be accessed by any user within the organization via several methods, such as self-adding through the Azure portal, sending an access request, or directly using the SharePoint URL. Without control over group privacy, sensitive organizational data might be exposed to unintended users.",
- "ImpactStatement": "Implementing this recommendation may result in an increased volume of access requests for group owners, particularly for groups previously intended to be public.",
- "RemediationProcedure": "Audit all Microsoft 365 public groups and ensure they are organizationally managed and approved. Convert unnecessary public groups to private groups and enforce strict policies for creating and approving public groups. Group owners should be instructed to monitor and review access requests.",
- "AuditProcedure": "Log in to the Microsoft 365 Admin Center and review the list of public groups. Verify that all public groups have been approved and are necessary for organizational purposes.",
- "AdditionalInformation": "Public groups expose data to all users within the organization, increasing the risk of accidental or unauthorized access. Periodic reviews of group privacy settings are recommended.",
- "DefaultValue": "By default, groups created in Microsoft 365 are set to 'Public' privacy.",
- "References": "CIS Microsoft 365 Foundations Benchmark v4.0, Section 1.2.1; Microsoft documentation on managing group privacy."
+ "Description": "Microsoft 365 Groups is the foundational membership service that drives all teamwork across Microsoft 365. With Microsoft 365 Groups, you can give a group of people access to a collection of shared resources. While there are several different group types this recommendation concerns **Microsoft 365 Groups**.In the Administration panel, when a group is created, the default privacy value is \"Public\".",
+ "RationaleStatement": "Ensure that only organizationally managed and approved public groups exist. When a group has a \"public\" privacy, users may access data related to this group (e.g. SharePoint), through three methods:- By using the Azure portal, and adding themselves into the public group- By requesting access to the group from the Group application of the Access Panel- By accessing the SharePoint URLAdministrators are notified when a user uses the Azure Portal. Requesting access to the group forces users to send a message to the group owner, but they still have immediate access to the group. The SharePoint URL is usually guessable and can be found from the Group application of the Access Panel. If group privacy is not controlled, any user may access sensitive information, according to the group they try to access.**Note:** Public in this case means public to the identities within the organization.",
+ "ImpactStatement": "If the recommendation is applied, group owners could receive more access requests than usual, especially regarding groups originally meant to be public.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Teams & groups` select `Active teams & groups`..3. On the **Active teams and groups page**, select the group's name that is public.4. On the popup **groups name page**, Select `Settings`.5. Under Privacy, select `Private`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Teams & groups` select `Active teams & groups`.3. On the **Active teams and groups page**, check that no groups have the status 'Public' in the privacy column.**To audit using PowerShell:** 1. Connect to the Microsoft Graph service using `Connect-MgGraph -Scopes \"Group.Read.All\"`.2. Run the following Microsoft Graph PowerShell command:```Get-MgGroup | where {$_.Visibility -eq \"Public\"} | select DisplayName,Visibility```3. Ensure `Visibility` is `Private` for each group.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/users/groups-self-service-management:https://learn.microsoft.com/en-us/microsoft-365/admin/create-groups/compare-groups?view=o365-worldwide",
+ "DefaultValue": "Public when created from the Administration portal; private otherwise."
}
]
},
{
"Id": "1.2.2",
- "Description": "Ensure sign-in to shared mailboxes is blocked",
+ "Description": "Shared mailboxes are used when multiple people need access to the same mailbox, such as a company information or support email address, reception desk, or other function that might be shared by multiple people.Users with permissions to the group mailbox can send as or send on behalf of the mailbox email address if the administrator has given that user permissions to do that. This is particularly useful for help and support mailboxes because users can send emails from \"Contoso Support\" or \"Building A Reception Desk.\"Shared mailboxes are created with a corresponding user account using a system generated password that is unknown at the time of creation.The recommended state is `Sign in blocked` for `Shared mailboxes`.",
"Checks": [],
"Attributes": [
{
- "Section": "1.Microsoft 365 admin center",
- "Profile": "Level 1",
- "AssessmentStatus": "Manuel",
- "Description": "Shared mailboxes are used when multiple people need access to the same mailbox for functions such as support or reception. These mailboxes are created with a corresponding user account that includes a system-generated password. To enhance security, sign-in should be blocked for these shared mailbox accounts, ensuring access is granted only through delegation.",
- "RationaleStatement": "Blocking sign-in for shared mailbox accounts prevents unauthorized access or direct sign-in, ensuring that all interactions with the shared mailbox are through authorized delegation. This reduces the risk of attackers exploiting shared mailboxes for malicious purposes such as sending emails with spoofed identities.",
- "ImpactStatement": "Blocking sign-in to shared mailboxes requires users to access these mailboxes only through delegation. Administrators will need to monitor and ensure proper access permissions are assigned.",
- "RemediationProcedure": "Log in to the Microsoft 365 Admin Center and locate the shared mailboxes. For each shared mailbox, verify that sign-in is blocked by reviewing the associated user account settings. If sign-in is not blocked, adjust the account settings to enforce this configuration.",
- "AuditProcedure": "Review all shared mailboxes in the Microsoft 365 Admin Center. Confirm that the user accounts associated with these mailboxes have sign-in blocked.",
- "AdditionalInformation": "Shared mailboxes are often a target for exploitation due to their broad access and functional role. Blocking sign-in significantly reduces the attack surface.",
- "DefaultValue": "By default, shared mailboxes may have sign-in enabled unless explicitly configured otherwise.",
- "References": "CIS Microsoft 365 Foundations Benchmark v4.0, Section 1.2.2; Microsoft documentation on managing shared mailboxes."
+ "Section": "1.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Shared mailboxes are used when multiple people need access to the same mailbox, such as a company information or support email address, reception desk, or other function that might be shared by multiple people.Users with permissions to the group mailbox can send as or send on behalf of the mailbox email address if the administrator has given that user permissions to do that. This is particularly useful for help and support mailboxes because users can send emails from \"Contoso Support\" or \"Building A Reception Desk.\"Shared mailboxes are created with a corresponding user account using a system generated password that is unknown at the time of creation.The recommended state is `Sign in blocked` for `Shared mailboxes`.",
+ "RationaleStatement": "The intent of the shared mailbox is the only allow delegated access from other mailboxes. An admin could reset the password, or an attacker could potentially gain access to the shared mailbox allowing the direct sign-in to the shared mailbox and subsequently the sending of email from a sender that does not have a unique identity. To prevent this, block sign-in for the account that is associated with the shared mailbox.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com/2. Click to expand `Teams & groups` and select `Shared mailboxes`.3. Take note of all shared mailboxes.4. Click to expand `Users` and select `Active users`.5. Select a shared mailbox account to open it's properties pane and then select `Block sign-in`.6. Check the box for `Block this user from signing in`.7. Repeat for any additional shared mailboxes.**To remediate using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"User.ReadWrite.All\"`2. Connect to Exchange Online using `Connect-ExchangeOnline`.3. To disable sign-in for a single account:```$MBX = Get-EXOMailbox -Identity TestUser@example.comUpdate-MgUser -UserId $MBX.ExternalDirectoryObjectId -AccountEnabled:$false```3. The following will block sign-in to all Shared Mailboxes.```$MBX = Get-EXOMailbox -RecipientTypeDetails SharedMailbox$MBX | ForEach-Object { Update-MgUser -UserId $_.ExternalDirectoryObjectId -AccountEnabled:$false }```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com/2. Click to expand `Teams & groups` and select `Shared mailboxes`.3. Take note of all shared mailboxes.4. Click to expand `Users` and select `Active users`.5. Select a shared mailbox account to open its properties pane, and review.6. Ensure the text under the name reads `Sign-in blocked`.7. Repeat for any additional shared mailboxes.**Note:** If sign-in is not blocked where will be an option to `Block sign-in`. This means the shared mailbox is out of compliance with this recommendation.**To audit using PowerShell:** 1. Connect to Exchange Online using `Connect-ExchangeOnline`2. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.Read.All\"`3. Run the following PowerShell commands:```$MBX = Get-EXOMailbox -RecipientTypeDetails SharedMailbox$MBX | ForEach-Object { Get-MgUser -UserId $_.ExternalDirectoryObjectId ` -Property DisplayName, UserPrincipalName, AccountEnabled } | Format-Table DisplayName, UserPrincipalName, AccountEnabled```4. Ensure `AccountEnabled` is set to `False` for all Shared Mailboxes.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/email/about-shared-mailboxes?view=o365-worldwide:https://learn.microsoft.com/en-us/microsoft-365/admin/email/create-a-shared-mailbox?view=o365-worldwide#block-sign-in-for-the-shared-mailbox-account:https://learn.microsoft.com/en-us/microsoft-365/enterprise/block-user-accounts-with-microsoft-365-powershell?view=o365-worldwide#block-individual-user-accounts",
+ "DefaultValue": "AccountEnabled: `True`"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.1",
+ "Description": "Microsoft cloud-only accounts have a pre-defined password policy that cannot be changed. The only items that can change are the number of days until a password expires and whether or whether passwords expire at all.",
+ "Checks": [
+ "admincenter_settings_password_never_expire"
+ ],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Microsoft cloud-only accounts have a pre-defined password policy that cannot be changed. The only items that can change are the number of days until a password expires and whether or whether passwords expire at all.",
+ "RationaleStatement": "Organizations such as NIST and Microsoft have updated their password policy recommendations to not arbitrarily require users to change their passwords after a specific amount of time, unless there is evidence that the password is compromised, or the user forgot it. They suggest this even for single factor (Password Only) use cases, with a reasoning that forcing arbitrary password changes on users actually make the passwords less secure. Other recommendations within this Benchmark suggest the use of MFA authentication for at least critical accounts (at minimum), which makes password expiration even less useful as well as password protection for Entra ID.",
+ "ImpactStatement": "When setting passwords not to expire it is important to have other controls in place to supplement this setting. See below for related recommendations and user guidance.- Ban common passwords.- Educate users to not reuse organization passwords anywhere else.- Enforce Multi-Factor Authentication registration for all users.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` select `Org Settings`.3. Click on `Security & privacy`.4. Check the `Set passwords to never expire (recommended)` box.5. Click `Save`.**To remediate using PowerShell:**1. Connect to the Microsoft Graph service using `Connect-MgGraph -Scopes \"Domain.ReadWrite.All\"`.2. Run the following Microsoft Graph PowerShell command:```Update-MgDomain -DomainId -PasswordValidityPeriodInDays 2147483647```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` select `Org Settings`.3. Click on `Security & privacy`.4. Select `Password expiration policy` ensure that `Set passwords to never expire (recommended)` has been checked.**To audit using PowerShell:**1. Connect to the Microsoft Graph service using `Connect-MgGraph -Scopes \"Domain.Read.All\"`.2. Run the following Microsoft Online PowerShell command:```Get-MgDomain | ft id,PasswordValidityPeriodInDays```3. Verify the value returned for valid domains is `2147483647`",
+ "AdditionalInformation": "",
+ "References": "https://pages.nist.gov/800-63-3/sp800-63b.html:https://www.cisecurity.org/white-papers/cis-password-policy-guide/:https://learn.microsoft.com/en-us/microsoft-365/admin/misc/password-policy-recommendations?view=o365-worldwide",
+ "DefaultValue": "If the property is not set, a default value of 90 days will be used"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.2",
+ "Description": "Idle session timeout allows the configuration of a setting which will timeout inactive users after a pre-determined amount of time. When a user reaches the set idle timeout session, they'll get a notification that they're about to be signed out. They have to select to stay signed in or they'll be automatically signed out of all Microsoft 365 web apps. Combined with a Conditional Access rule this will only impact unmanaged devices. A managed device is considered a device managed that is compliant or joined to a domain and using a supported browser like Microsoft Edge or Google Chrome (with the Microsoft Single Sign On) extension.The following Microsoft 365 web apps are supported.- Outlook Web App- OneDrive- SharePoint- Microsoft Fabric- Microsoft365.com and other start pages- Microsoft 365 web apps (Word, Excel, PowerPoint)- Microsoft 365 Admin Center- M365 Defender Portal- Microsoft Purview Compliance PortalThe recommended setting is `3 hours` (or less) for unmanaged devices. **Note:** Idle session timeout doesn't affect Microsoft 365 desktop and mobile apps.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Idle session timeout allows the configuration of a setting which will timeout inactive users after a pre-determined amount of time. When a user reaches the set idle timeout session, they'll get a notification that they're about to be signed out. They have to select to stay signed in or they'll be automatically signed out of all Microsoft 365 web apps. Combined with a Conditional Access rule this will only impact unmanaged devices. A managed device is considered a device managed that is compliant or joined to a domain and using a supported browser like Microsoft Edge or Google Chrome (with the Microsoft Single Sign On) extension.The following Microsoft 365 web apps are supported.- Outlook Web App- OneDrive- SharePoint- Microsoft Fabric- Microsoft365.com and other start pages- Microsoft 365 web apps (Word, Excel, PowerPoint)- Microsoft 365 Admin Center- M365 Defender Portal- Microsoft Purview Compliance PortalThe recommended setting is `3 hours` (or less) for unmanaged devices. **Note:** Idle session timeout doesn't affect Microsoft 365 desktop and mobile apps.",
+ "RationaleStatement": "Ending idle sessions through an automatic process can help protect sensitive company data and will add another layer of security for end users who work on unmanaged devices that can potentially be accessed by the public. Unauthorized individuals onsite or remotely can take advantage of systems left unattended over time. Automatic timing out of sessions makes this more difficult.",
+ "ImpactStatement": "If step 2 in the Audit/Remediation procedure is left out, then there is no issue with this from a security standpoint. However, it will require users on trusted devices to sign in more frequently which could result in credential prompt fatigue.**Note:** Idle session timeout also affects the Azure Portal idle timeout if this is not explicitly set to a different timeout. The Azure Portal idle timeout applies to all kind of devices, not just unmanaged. See : [change the directory timeout setting admin](https://learn.microsoft.com/en-us/azure/azure-portal/set-preferences#change-the-directory-timeout-setting-admin)",
+ "RemediationProcedure": "**Step 1 - Configure Idle session timeout:**1. Navigate to the `Microsoft 365 admin center` https://admin.microsoft.com/.2. Click to expand `Settings` Select `Org settings`.3. Click `Security & Privacy` tab.4. Select `Idle session timeout`.5. Check the box `Turn on to set the period of inactivity for users to be signed off of Microsoft 365 web apps` 6. Set a maximum value of `3 hours`.7. Click save.**Step 2 - Ensure the Conditional Access policy is in place:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Expand `Protect` > `Conditional Access`.3. Click `New policy` and give the policy a name. - Select `Users` > `All users`. - Select `Cloud apps or actions` > `Select apps` and select `Office 365` - Select `Conditions` > `Client apps` > `Yes` check only `Browser` unchecking all other boxes. - Select `Sessions` and check `Use app enforced restrictions`.4. Set `Enable policy` to `On` and click `Create`.**Note:** To ensure that idle timeouts affect only unmanaged devices, both steps must be completed.",
+ "AuditProcedure": "**Step 1 - Ensure Idle session timeout is configured:**1. Navigate to the `Microsoft 365 admin center` https://admin.microsoft.com/.2. Click to expand `Settings` Select `Org settings`.3. Click `Security & Privacy` tab.4. Select `Idle session timeout`.5. Verify `Turn on to set the period of inactivity for users to be signed off of Microsoft 365 web apps` is set to `3 hours` (or less).**Step 2 - Ensure the Conditional Access policy is in place:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Expand `Protect` > `Conditional Access`.3. Inspect existing conditional access rules for one that meets the below conditions: - `Users` is set to `All users`. - `Cloud apps or actions` > `Select apps` is set to `Office 365`. - `Conditions` > `Client apps` is `Browser` and nothing else. - `Session` is set to `Use app enforced restrictions`. - `Enable Policy` is set to `On`**Note:** To ensure that idle timeouts affect only unmanaged devices, both steps must be completed.",
+ "AdditionalInformation": "According to Microsoft idle session timeout isn't supported when third party cookies are disabled in the browser. Users won't see any sign-out prompts.",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/manage/idle-session-timeout-web-apps?view=o365-worldwide",
+ "DefaultValue": "Not configured. (Idle sessions will not timeout.)"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.3",
+ "Description": "External calendar sharing allows an administrator to enable the ability for users to share calendars with anyone outside of the organization. Outside users will be sent a URL that can be used to view the calendar.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "External calendar sharing allows an administrator to enable the ability for users to share calendars with anyone outside of the organization. Outside users will be sent a URL that can be used to view the calendar.",
+ "RationaleStatement": "Attackers often spend time learning about organizations before launching an attack. Publicly available calendars can help attackers understand organizational relationships and determine when specific users may be more vulnerable to an attack, such as when they are traveling.",
+ "ImpactStatement": "This functionality is not widely used. As a result, it is unlikely that implementation of this setting will cause an impact to most users. Users that do utilize this functionality are likely to experience a minor inconvenience when scheduling meetings or synchronizing calendars with people outside the tenant.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` select `Org settings`.3. In the `Services` section click `Calendar`.4. Uncheck `Let your users share their calendars with people outside of your organization who have Office 365 or Exchange`.5. Click `Save`.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following Exchange Online PowerShell command:```Set-SharingPolicy -Identity \"Default Sharing Policy\" -Enabled $False```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` select `Org settings`.3. In the `Services` section click `Calendar`.4. Verify `Let your users share their calendars with people outside of your organization who have Office 365 or Exchange` is unchecked.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following Exchange Online PowerShell command:```Get-SharingPolicy -Identity \"Default Sharing Policy\"```3. Verify `Enabled` is set to `False`",
+ "AdditionalInformation": "**The following script can be used to audit any mailboxes that might be sharing calendars prior to disabling the feature globally:**```$mailboxes = Get-Mailbox -ResultSize Unlimited foreach ($mailbox in $mailboxes) { # Get the name of the default calendar folder (depends on the mailbox's language) $calendarFolder = [string](Get-ExoMailboxFolderStatistics $mailbox.PrimarySmtpAddress -FolderScope Calendar| Where-Object { $_.FolderType -eq 'Calendar' }).Name # Get users calendar folder settings for their default Calendar folder # calendar has the format identity:\\ $calendar = Get-MailboxCalendarFolder -Identity \"$($mailbox.PrimarySmtpAddress):\\$calendarFolder\" if ($calendar.PublishEnabled) { Write-Host -ForegroundColor Yellow \"Calendar publishing is enabled for $($mailbox.PrimarySmtpAddress) on $($calendar.PublishedCalendarUrl)\" }}```",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/manage/share-calendars-with-external-users?view=o365-worldwide",
+ "DefaultValue": "Enabled (True)"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.4",
+ "Description": "By default, users can install add-ins in their Microsoft Word, Excel, and PowerPoint applications, allowing data access within the application.Do not allow users to install add-ins in Word, Excel, or PowerPoint.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "By default, users can install add-ins in their Microsoft Word, Excel, and PowerPoint applications, allowing data access within the application.Do not allow users to install add-ins in Word, Excel, or PowerPoint.",
+ "RationaleStatement": "Attackers commonly use vulnerable and custom-built add-ins to access data in user applications.While allowing users to install add-ins by themselves does allow them to easily acquire useful add-ins that integrate with Microsoft applications, it can represent a risk if not used and monitored carefully.Disable future user's ability to install add-ins in Microsoft Word, Excel, or PowerPoint helps reduce your threat-surface and mitigate this risk.",
+ "ImpactStatement": "Implementation of this change will impact both end users and administrators. End users will not be able to install add-ins that they may want to install.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` > `Org settings`.3. In `Services` select `User owned apps and services`.4. Uncheck `Let users access the Office Store` and `Let users start trials on behalf of your organization`.5. Click `Save`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` > `Org settings`.3. In `Services` select `User owned apps and services`.4. Verify `Let users access the Office Store` and `Let users start trials on behalf of your organization` are **not checked**.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/manage/manage-addins-in-the-admin-center?view=o365-worldwide#manage-add-in-downloads-by-turning-onoff-the-office-store-across-all-apps-except-outlook",
+ "DefaultValue": "`Let users access the Office Store` is `Checked``Let users start trials on behalf of your organization` is `Checked`"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.5",
+ "Description": "Microsoft Forms can be used for phishing attacks by asking personal or sensitive information and collecting the results. Microsoft 365 has built-in protection that will proactively scan for phishing attempt in forms such personal information request.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft Forms can be used for phishing attacks by asking personal or sensitive information and collecting the results. Microsoft 365 has built-in protection that will proactively scan for phishing attempt in forms such personal information request.",
+ "RationaleStatement": "Enabling internal phishing protection for Microsoft Forms will prevent attackers using forms for phishing attacks by asking personal or other sensitive information and URLs.",
+ "ImpactStatement": "If potential phishing was detected, the form will be temporarily blocked and cannot be distributed, and response collection will not happen until it is unblocked by the administrator or keywords were removed by the creator.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` then select `Org settings`.3. Under Services select `Microsoft Forms`.4. Click the checkbox labeled `Add internal phishing protection` under `Phishing protection`.5. Click Save.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 admin` center https://admin.microsoft.com.2. Click to expand `Settings` then select `Org settings`.3. Under Services select `Microsoft Forms`.4. Ensure the checkbox labeled `Add internal phishing protection` is checked under `Phishing protection`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-US/microsoft-forms/administrator-settings-microsoft-forms:https://learn.microsoft.com/en-US/microsoft-forms/review-unblock-forms-users-detected-blocked-potential-phishing",
+ "DefaultValue": "Internal Phishing Protection is enabled."
+ }
+ ]
+ },
+ {
+ "Id": "1.3.6",
+ "Description": "Customer Lockbox is a security feature that provides an additional layer of control and transparency to customer data in Microsoft 365. It offers an approval process for Microsoft support personnel to access organization data and creates an audited trail to meet compliance requirements.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Customer Lockbox is a security feature that provides an additional layer of control and transparency to customer data in Microsoft 365. It offers an approval process for Microsoft support personnel to access organization data and creates an audited trail to meet compliance requirements.",
+ "RationaleStatement": "Enabling this feature protects organizational data against data spillage and exfiltration.",
+ "ImpactStatement": "Administrators will need to grant Microsoft access to the tenant environment prior to a Microsoft engineer accessing the environment for support or troubleshooting.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` then select `Org settings`.3. Select `Security & privacy` tab.4. Click `Customer lockbox`.5. Check the box `Require approval for all data access requests`. 6. Click `Save`.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command\\:```Set-OrganizationConfig -CustomerLockBoxEnabled $true```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` then select `Org settings`.3. Select `Security & privacy` tab.4. Click `Customer lockbox`.5. Ensure the box labeled `Require approval for all data access requests` is checked. **To audit using SecureScore:** 1. Navigate to the Microsoft 365 SecureScore portal. https://securescore.microsoft.com2. Search for `Turn on customer lockbox feature` under `Improvement actions`.**To audit using PowerShell:** 1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-OrganizationConfig | Select-Object CustomerLockBoxEnabled```3. Verify the value is set to `True`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/azure/security/fundamentals/customer-lockbox-overview",
+ "DefaultValue": "`Require approval for all data access requests` - `Unchecked``CustomerLockboxEnabled` - `False`"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.7",
+ "Description": "Third-party storage can be enabled for users in Microsoft 365, allowing them to store and share documents using services such as Dropbox, alongside OneDrive and team sites.Ensure `Microsoft 365 on the web` third-party storage services are restricted.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Third-party storage can be enabled for users in Microsoft 365, allowing them to store and share documents using services such as Dropbox, alongside OneDrive and team sites.Ensure `Microsoft 365 on the web` third-party storage services are restricted.",
+ "RationaleStatement": "By using external storage services an organization may increase the risk of data breaches and unauthorized access to confidential information. Additionally, third-party services may not adhere to the same security standards as the organization, making it difficult to maintain data privacy and security.",
+ "ImpactStatement": "Impact associated with this change is highly dependent upon current practices in the tenant. If users do not use other storage providers, then minimal impact is likely. However, if users do regularly utilize providers outside of the tenant this will affect their ability to continue to do so.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com2. Go to `Settings` > `Org Settings` > `Services` > `Microsoft 365 on the web` 3. Uncheck `Let users open files stored in third-party storage services in Microsoft 365 on the web`",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com2. Go to `Settings` > `Org Settings` > `Services` > `Microsoft 365 on the web` 3. Ensure `Let users open files stored in third-party storage services in Microsoft 365 on the web` is not checked.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/setup/set-up-file-storage-and-sharing?view=o365-worldwide#enable-or-disable-third-party-storage-services",
+ "DefaultValue": "Enabled - Users are able to open files stored in third-party storage services"
+ }
+ ]
+ },
+ {
+ "Id": "1.3.8",
+ "Description": "Sway is a Microsoft 365 app that lets organizations create interactive, web-based presentations using images, text, videos and other media. Its design engine simplifies the process, allowing for quick customization. Presentations can then be shared via a link.This setting controls user Sway sharing capability, both within and outside of the organization. By default, Sway is enabled for everyone in the organization.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "1.3",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Sway is a Microsoft 365 app that lets organizations create interactive, web-based presentations using images, text, videos and other media. Its design engine simplifies the process, allowing for quick customization. Presentations can then be shared via a link.This setting controls user Sway sharing capability, both within and outside of the organization. By default, Sway is enabled for everyone in the organization.",
+ "RationaleStatement": "Disable external sharing of Sway documents that can contain sensitive information to prevent accidental or arbitrary data leaks.",
+ "ImpactStatement": "Interactive reports, presentations, newsletters, and other items created in Sway will not be shared outside the organization by users.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` then select `Org settings`.3. Under Services select `Sway` - Uncheck: `Let people in your organization share their sways with people outside your organization`.4. Click `Save`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft 365 admin center` https://admin.microsoft.com.2. Click to expand `Settings` then select `Org settings`.3. Under Services select `Sway`.4. Confirm that under `Sharing` the following is not checked - Option: `Let people in your organization share their sways with people outside your organization`.",
+ "AdditionalInformation": "",
+ "References": "https://support.microsoft.com/en-us/office/administrator-settings-for-sway-d298e79b-b6ab-44c6-9239-aa312f5784d4:https://learn.microsoft.com/en-us/office365/servicedescriptions/microsoft-sway-service-description",
+ "DefaultValue": "`Let people in your organization share their sways with people outside your organization` - Enabled"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.1",
+ "Description": "Enabling Safe Links policy for Office applications allows URL's that exist inside of Office documents and email applications opened by Office, Office Online and Office mobile to be processed against Defender for Office time-of-click verification and rewritten if required.**Note:** E5 Licensing includes a number of Built-in Protection policies. When auditing policies note which policy you are viewing, and keep in mind CIS recommendations often extend the Default or Build-in Policies provided by MS. In order to **Pass** the highest priority policy must match all settings recommended.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Enabling Safe Links policy for Office applications allows URL's that exist inside of Office documents and email applications opened by Office, Office Online and Office mobile to be processed against Defender for Office time-of-click verification and rewritten if required.**Note:** E5 Licensing includes a number of Built-in Protection policies. When auditing policies note which policy you are viewing, and keep in mind CIS recommendations often extend the Default or Build-in Policies provided by MS. In order to **Pass** the highest priority policy must match all settings recommended.",
+ "RationaleStatement": "Safe Links for Office applications extends phishing protection to documents and emails that contain hyperlinks, even after they have been delivered to a user.",
+ "ImpactStatement": "User impact associated with this change is minor - users may experience a very short delay when clicking on URLs in Office documents before being directed to the requested site. Users should be informed of the change as, in the event a link is unsafe and blocked, they will receive a message that it has been blocked.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com2. Under `Email & collaboration` select `Policies & rules`3. Select `Threat policies` then `Safe Links`4. Click on `+Create`5. Name the policy then click `Next`6. In `Domains` select all valid domains for the organization and `Next`7. Ensure the following `URL & click protection settings` are defined: **Email** - Checked `On: Safe Links checks a list of known, malicious links when users click links in email. URLs are rewritten by default` - Checked `Apply Safe Links to email messages sent within the organization` - Checked `Apply real-time URL scanning for suspicious links and links that point to files` - Checked `Wait for URL scanning to complete before delivering the message` - Unchecked `Do not rewrite URLs, do checks via Safe Links API only.` **Teams** - Checked `On: Safe Links checks a list of known, malicious links when users click links in Microsoft Teams. URLs are not rewritten` **Office 365 Apps** - Checked `On: Safe Links checks a list of known, malicious links when users click links in Microsoft Office apps. URLs are not rewritten` **Click protection settings** - Checked `Track user clicks` - Unchecked `Let users click through the original URL` - There is no recommendation for organization branding.8. Click `Next` twice and finally `Submit`**To remediate using PowerShell:**1. Connect using `Connect-ExchangeOnline`.2. Run the following PowerShell script to create a policy at highest priority that will apply to all valid domains on the tenant:```# Create the Policy$params = @{ Name = \"CIS SafeLinks Policy\" EnableSafeLinksForEmail = $true EnableSafeLinksForTeams = $true EnableSafeLinksForOffice = $true TrackClicks = $true AllowClickThrough = $false ScanUrls = $true EnableForInternalSenders = $true DeliverMessageAfterScan = $true DisableUrlRewrite = $false}New-SafeLinksPolicy @params# Create the rule for all users in all valid domains and associate with PolicyNew-SafeLinksRule -Name \"CIS SafeLinks\" -SafeLinksPolicy \"CIS SafeLinks Policy\" -RecipientDomainIs (Get-AcceptedDomain).Name -Priority 0```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com2. Under `Email & collaboration` select `Policies & rules`3. Select `Threat policies` then `Safe Links`4. Inspect each policy and attempt to identify one that matches the parameters outlined below.5. Scroll down the pane and click on `Edit Protection settings` (Global Readers will look for on or off values)6. Ensure the following protection settings are set as outlined: **Email** - Checked `On: Safe Links checks a list of known, malicious links when users click links in email. URLs are rewritten by default` - Checked `Apply Safe Links to email messages sent within the organization` - Checked `Apply real-time URL scanning for suspicious links and links that point to files` - Checked `Wait for URL scanning to complete before delivering the message` - Unchecked `Do not rewrite URLs, do checks via Safe Links API only.` **Teams** - Checked `On: Safe Links checks a list of known, malicious links when users click links in Microsoft Teams. URLs are not rewritten` **Office 365 Apps** - Checked `On: Safe Links checks a list of known, malicious links when users click links in Microsoft Office apps. URLs are not rewritten` **Click protection settings** - Checked `Track user clicks` - Unchecked `Let users click through the original URL`7. There is no recommendation for organization branding.8. Click close**To audit using PowerShell:**1. Connect using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-SafeLinksPolicy | Format-Table Name```3. Once this returns the list of policies run the following command to view the policies.```Get-SafeLinksPolicy -Identity \"Policy Name\"```4. Verify the value for the following. - `EnableSafeLinksForEmail: True` - `EnableSafeLinksForTeams: True` - `EnableSafeLinksForOffice: True` - `TrackClicks: True` - `AllowClickThrough: False` - `ScanUrls: True` - `EnableForInternalSenders: True` - `DeliverMessageAfterScan: True` - `DisableUrlRewrite: False`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/safe-links-policies-configure?view=o365-worldwide:https://learn.microsoft.com/en-us/powershell/module/exchange/set-safelinkspolicy?view=exchange-ps:https://learn.microsoft.com/en-us/defender-office-365/preset-security-policies?view=o365-worldwide",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.2",
+ "Description": "The Common Attachment Types Filter lets a user block known and custom malicious file types from being attached to emails.",
+ "Checks": [
+ "defender_malware_policy_common_attachments_filter_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "The Common Attachment Types Filter lets a user block known and custom malicious file types from being attached to emails.",
+ "RationaleStatement": "Blocking known malicious file types can help prevent malware-infested files from infecting a host.",
+ "ImpactStatement": "Blocking common malicious file types should not cause an impact in modern computing environments.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules`. 3. On the Policies & rules page select `Threat policies`.4. Under polices select `Anti-malware` and click on the `Default (Default)` policy.5. On the Policy page that appears on the right hand pane scroll to the bottom and click on `Edit protection settings`, check the `Enable the common attachments filter`.6. Click Save.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following Exchange Online PowerShell command:```Set-MalwareFilterPolicy -Identity Default -EnableFileFilter $true```**Note:** Audit and Remediation guidance may focus on the **Default policy** however, if a Custom Policy exists in the organization's tenant, then ensure the setting is set as outlined in the highest priority policy listed.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules`. 3. On the Policies & rules page select `Threat policies`.4. Under **Policies** select `Anti-malware` and click on the `Default (Default)` policy.5. On the policy page that appears on the righthand pane, under `Protection settings`, verify that the `Enable the common attachments filter` has the value of `On`. **To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following Exchange Online PowerShell command:```Get-MalwareFilterPolicy -Identity Default | Select-Object EnableFileFilter```3. Verify `EnableFileFilter` is set to `True`.**Note:** Audit and Remediation guidance may focus on the **Default policy** however, if a Custom Policy exists in the organization's tenant, then ensure the setting is set as outlined in the highest priority policy listed.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/exchange/get-malwarefilterpolicy?view=exchange-ps:https://learn.microsoft.com/en-us/defender-office-365/anti-malware-policies-configure?view=o365-worldwide",
+ "DefaultValue": "Always on"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.3",
+ "Description": "Exchange Online Protection (EOP) is the cloud-based filtering service that protects organizations against spam, malware, and other email threats. EOP is included in all Microsoft 365 organizations with Exchange Online mailboxes.EOP uses flexible anti-malware policies for malware protection settings. These policies can be set to notify Admins of malicious activity.",
+ "Checks": [
+ "defender_malware_policy_notifications_internal_users_malware_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Exchange Online Protection (EOP) is the cloud-based filtering service that protects organizations against spam, malware, and other email threats. EOP is included in all Microsoft 365 organizations with Exchange Online mailboxes.EOP uses flexible anti-malware policies for malware protection settings. These policies can be set to notify Admins of malicious activity.",
+ "RationaleStatement": "This setting alerts administrators that an internal user sent a message that contained malware. This may indicate an account or machine compromise that would need to be investigated.",
+ "ImpactStatement": "Notification of account with potential issues should not have an impact on the user.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `E-mail & Collaboration` select `Policies & rules`. 3. On the Policies & rules page select `Threat policies`.4. Under Policies select `Anti-malware`.5. Click on the `Default (Default)` policy.6. Click on `Edit protection settings` and change the settings for `Notify an admin about undelivered messages from internal senders` to `On` and enter the email address of the administrator who should be notified under `Administrator email address`.7. Click Save.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following command: ```Set-MalwareFilterPolicy -Identity '{Identity Name}' -EnableInternalSenderAdminNotifications $True -InternalSenderAdminAddress {admin@domain1.com}```**Note:** Audit and Remediation guidance may focus on the **Default policy** however, if a Custom Policy exists in the organization's tenant, then ensure the setting is set as outlined in the highest priority policy listed.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `E-mail & Collaboration` select `Policies & rules`. 3. On the Policies & rules page select `Threat policies`.4. Under Policies select `Anti-malware`.5. Click on the `Default (Default)` policy.6. Ensure the setting `Notify an admin about undelivered messages from internal senders` is set to `On` and that there is at least one email address under `Administrator email address`.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following command: ```Get-MalwareFilterPolicy | fl Identity, EnableInternalSenderAdminNotifications, InternalSenderAdminAddress```**Note:** Audit and Remediation guidance may focus on the **Default policy** however, if a Custom Policy exists in the organization's tenant, then ensure the setting is set as outlined in the highest priority policy listed.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/anti-malware-protection-about:https://learn.microsoft.com/en-us/defender-office-365/anti-malware-policies-configure",
+ "DefaultValue": "```EnableInternalSenderAdminNotifications : FalseInternalSenderAdminAddress : $null```"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.4",
+ "Description": "The Safe Attachments policy helps protect users from malware in email attachments by scanning attachments for viruses, malware, and other malicious content. When an email attachment is received by a user, Safe Attachments will scan the attachment in a secure environment and provide a verdict on whether the attachment is safe or not.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "The Safe Attachments policy helps protect users from malware in email attachments by scanning attachments for viruses, malware, and other malicious content. When an email attachment is received by a user, Safe Attachments will scan the attachment in a secure environment and provide a verdict on whether the attachment is safe or not.",
+ "RationaleStatement": "Enabling Safe Attachments policy helps protect against malware threats in email attachments by analyzing suspicious attachments in a secure, cloud-based environment before they are delivered to the user's inbox. This provides an additional layer of security and can prevent new or unseen types of malware from infiltrating the organization's network.",
+ "ImpactStatement": "Delivery of email with attachments may be delayed while scanning is occurring.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `E-mail & Collaboration` select `Policies & rules`. 3. On the Policies & rules page select `Threat policies`.4. Under `Policies` select `Safe Attachments`.5. Click `+ Create`.6. Create a Policy Name and Description, and then click `Next`.7. Select all valid domains and click `Next`.8. Select `Block`.9. Quarantine policy is `AdminOnlyAccessPolicy`.10. Leave `Enable redirect` unchecked.11. Click `Next` and finally `Submit`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `E-mail & Collaboration` select `Policies & rules`. 3. On the Policies & rules page select `Threat policies`.4. Under `Policies` select `Safe Attachments`.5. Inspect the highest priority policy.6. Ensure `Users and domains` and `Included recipient domains` are in scope for the organization.7. Ensure `Safe Attachments detection response:` is set to `Block - Block current and future messages and attachments with detected malware`.8. Ensure the `Quarantine Policy` is set to `AdminOnlyAccessPolicy`.9. Ensure the policy is not disabled.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-SafeAttachmentPolicy | where-object {$_.Enable -eq \"True\"}```",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/safe-attachments-about:https://learn.microsoft.com/en-us/defender-office-365/safe-attachments-policies-configure",
+ "DefaultValue": "disabled"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.5",
+ "Description": "Safe Attachments for SharePoint, OneDrive, and Microsoft Teams scans these services for malicious files.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Safe Attachments for SharePoint, OneDrive, and Microsoft Teams scans these services for malicious files.",
+ "RationaleStatement": "Safe Attachments for SharePoint, OneDrive, and Microsoft Teams protect organizations from inadvertently sharing malicious files. When a malicious file is detected that file is blocked so that no one can open, copy, move, or share it until further actions are taken by the organization's security team.",
+ "ImpactStatement": "Impact associated with Safe Attachments is minimal, and equivalent to impact associated with anti-virus scanners in an environment.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com2. Under `Email & collaboration` select `Policies & rules`3. Select Threat policies then `Safe Attachments`.4. Click on `Global settings`5. Click to `Enable` `Turn on Defender for Office 365 for SharePoint, OneDrive, and Microsoft Teams`6. Click to `Enable` `Turn on Safe Documents for Office clients`7. Click to `Disable` `Allow people to click through Protected View even if Safe Documents identified the file as malicious`.8. Click `Save`**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`. 2. Run the following PowerShell command: ```Set-AtpPolicyForO365 -EnableATPForSPOTeamsODB $true -EnableSafeDocs $true -AllowSafeDocsOpen $false```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com2. Under `Email & collaboration` select `Policies & rules`3. Select Threat policies then `Safe Attachments`.4. Click on `Global settings`5. Ensure the toggle is `Enabled` to `Turn on Defender for Office 365 for SharePoint, OneDrive, and Microsoft Teams`.6. Ensure the toggle is `Enabled` to `Turn on Safe Documents for Office clients`. 6. Ensure the toggle is `Deselected/Disabled` to `Allow people to click through Protected View even if Safe Documents identified the file as malicious`. **To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`. 2. Run the following PowerShell command: ```Get-AtpPolicyForO365 | fl Name,EnableATPForSPOTeamsODB,EnableSafeDocs,AllowSafeDocsOpen```Verify the values for each parameter as below: EnableATPForSPOTeamsODB : True EnableSafeDocs : True AllowSafeDocsOpen : False",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/safe-attachments-for-spo-odfb-teams-about",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.6",
+ "Description": "In Microsoft 365 organizations with mailboxes in Exchange Online or standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, email messages are automatically protected against spam (junk email) by EOP.Configure Exchange Online Spam Policies to copy emails and notify someone when a sender in the organization has been blocked for sending spam emails.",
+ "Checks": [
+ "defender_antispam_outbound_policy_configured"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "In Microsoft 365 organizations with mailboxes in Exchange Online or standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, email messages are automatically protected against spam (junk email) by EOP.Configure Exchange Online Spam Policies to copy emails and notify someone when a sender in the organization has been blocked for sending spam emails.",
+ "RationaleStatement": "A blocked account is a good indication that the account in question has been breached and an attacker is using it to send spam emails to other people.",
+ "ImpactStatement": "Notification of users that have been blocked should not cause an impact to the user.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules`> `Threat policies`. 3. Under Policies select `Anti-spam`.4. Click on the `Anti-spam outbound policy (default)`.5. Select `Edit protection settings` then under `Notifications`6. Check `Send a copy of suspicious outbound messages or message that exceed these limits to these users and groups` then enter the desired email addresses.7. Check `Notify these users and groups if a sender is blocked due to sending outbound spam` then enter the desired email addresses.8. Click `Save`.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```$BccEmailAddress = @(\"\")$NotifyEmailAddress = @(\"\")Set-HostedOutboundSpamFilterPolicy -Identity Default -BccSuspiciousOutboundAdditionalRecipients $BccEmailAddress -BccSuspiciousOutboundMail $true -NotifyOutboundSpam $true -NotifyOutboundSpamRecipients $NotifyEmailAddress```**Note:** Audit and Remediation guidance may focus on the **Default policy** however, if a Custom Policy exists in the organization's tenant, then ensure the setting is set as outlined in the highest priority policy listed.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules` > `Threat policies`. 3. Under Policies select `Anti-spam`.4. Click on the `Anti-spam outbound policy (default)`.5. Verify that `Send a copy of suspicious outbound messages or message that exceed these limits to these users and groups` is set to `On`, ensure the email address is correct.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-HostedOutboundSpamFilterPolicy | Select-Object Bcc*, Notify*```3. Verify both `BccSuspiciousOutboundMail` and `NotifyOutboundSpam` are set to `True` and the email addresses to be notified are correct.**Note:** Audit and Remediation guidance may focus on the **Default policy** however, if a Custom Policy exists in the organization's tenant, then ensure the setting is set as outlined in the highest priority policy listed.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/outbound-spam-protection-about",
+ "DefaultValue": "```BccSuspiciousOutboundAdditionalRecipients : {}BccSuspiciousOutboundMail : FalseNotifyOutboundSpamRecipients : {}NotifyOutboundSpam : False```"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.7",
+ "Description": "By default, Office 365 includes built-in features that help protect users from phishing attacks. Set up anti-phishing polices to increase this protection, for example by refining settings to better detect and prevent impersonation and spoofing attacks. The default policy applies to all users within the organization and is a single view to fine-tune anti-phishing protection. Custom policies can be created and configured for specific users, groups or domains within the organization and will take precedence over the default policy for the scoped users.",
+ "Checks": [
+ "defender_antiphishing_policy_configured"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "By default, Office 365 includes built-in features that help protect users from phishing attacks. Set up anti-phishing polices to increase this protection, for example by refining settings to better detect and prevent impersonation and spoofing attacks. The default policy applies to all users within the organization and is a single view to fine-tune anti-phishing protection. Custom policies can be created and configured for specific users, groups or domains within the organization and will take precedence over the default policy for the scoped users.",
+ "RationaleStatement": "Protects users from phishing attacks (like impersonation and spoofing) and uses safety tips to warn users about potentially harmful messages.",
+ "ImpactStatement": "Mailboxes that are used for support systems such as helpdesk and billing systems send mail to internal users and are often not suitable candidates for impersonation protection. Care should be taken to ensure that these systems are excluded from Impersonation Protection.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules` 3. Select `Threat policies`.4. Under Policies select `Anti-phishing` and click `Create`.5. Name the policy, continuing and clicking `Next` as needed: - Add `Groups` and/or `Domains` that contain a majority of the organization. - Set `Phishing email threshold` to `3 - More Aggressive` - Check `Enable users to protect` and add up to 350 users. - Check `Enable domains to protect` and check `Include domains I own`. - Check `Enable mailbox intelligence (Recommended)`. - Check `Enable Intelligence for impersonation protection (Recommended)`. - Check `Enable spoof intelligence (Recommended).`6. Under **Actions** configure the following: - Set `If a message is detected as user impersonation` to `Quarantine the message`. - Set `If a message is detected as domain impersonation` to `Quarantine the message`. - Set `If Mailbox Intelligence detects an impersonated user` to `Quarantine the message`. - Leave `Honor DMARC record policy when the message is detected as spoof` checked. - Check `Show first contact safety tip (Recommended)`. - Check `Show user impersonation safety tip`. - Check `Show domain impersonation safety tip`. - Check `Show user impersonation unusual characters safety tip`.7. Finally click `Next` and `Submit` the policy.**Note:** `DefaultFullAccessWithNotificationPolicy` is suggested but not required. Users will be notified that impersonation emails are in the Quarantine.**To remediate using PowerShell:**1. Connect to Exchange Online service using `Connect-ExchangeOnline`.2. Run the following Exchange Online PowerShell script to create an AntiPhish policy:```# Create the Policy$params = @{ Name = \"CIS AntiPhish Policy\" PhishThresholdLevel = 3 EnableTargetedUserProtection = $true EnableOrganizationDomainsProtection = $true EnableMailboxIntelligence = $true EnableMailboxIntelligenceProtection = $true EnableSpoofIntelligence = $true TargetedUserProtectionAction = 'Quarantine' TargetedDomainProtectionAction = 'Quarantine' MailboxIntelligenceProtectionAction = 'Quarantine' TargetedUserQuarantineTag = 'DefaultFullAccessWithNotificationPolicy' MailboxIntelligenceQuarantineTag = 'DefaultFullAccessWithNotificationPolicy' TargetedDomainQuarantineTag = 'DefaultFullAccessWithNotificationPolicy' EnableFirstContactSafetyTips = $true EnableSimilarUsersSafetyTips = $true EnableSimilarDomainsSafetyTips = $true EnableUnusualCharactersSafetyTips = $true HonorDmarcPolicy = $true}New-AntiPhishPolicy @params# Create the rule for all users in all valid domains and associate with PolicyNew-AntiPhishRule -Name $params.Name -AntiPhishPolicy $params.Name -RecipientDomainIs (Get-AcceptedDomain).Name -Priority 0```3. The new policy can be edited in the UI or via PowerShell.**Note:** Remediation guidance is intended to help create a qualifying AntiPhish policy that meets the recommended criteria while protecting the majority of the organization. It's understood some individual user exceptions may exist or exceptions for the entire policy if another product acts as a similiar control.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules` 3. Select `Threat policies`.4. Under Policies select `Anti-phishing`.5. Ensure an AntiPhish policy exists that is `On` and meets the following criteria:6. Under **Users, groups, and domains**. - Verify that the included domains and groups includes a majority of the organization.7. Under **Phishing threshold & protection** - Verify `Phishing email threshold` is at least `3 - More Aggressive`. - Verify `User impersonation protection` is `On` and contains a subset of users. - Verify `Domain impersonation protection` is `On for owned domains`. - Verify `Mailbox intelligence` and `Mailbox intelligence for impersonations` and `Spoof intelligence` are `On`.8. Under **Actions** review the following: - Verify `If a message is detected as user impersonation` is set to `Quarantine the message`. - Verify `If a message is detected as domain impersonation` is set to `Quarantine the message`. - Verify `If Mailbox Intelligence detects an impersonated user` is set to `Quarantine the message`. - Verify `First contact safety tip` is `On`. - Verify `User impersonation safety tip` is `On`. - Verify `Domain impersonation safety tip` is `On`. - Verify `Unusual characters safety tip` is `On`. - Verify `Honor DMARC record policy when the message is detected as spoof` is `On`.**Note:** `DefaultFullAccessWithNotificationPolicy` is suggested but not required. Users will be notified that impersonation emails are in the Quarantine.**To audit using PowerShell:**1. Connect to Exchange Online service using `Connect-ExchangeOnline`.2. Run the following Exchange Online PowerShell commands:```$params = @( \"name\",\"Enabled\",\"PhishThresholdLevel\",\"EnableTargetedUserProtection\" \"EnableOrganizationDomainsProtection\",\"EnableMailboxIntelligence\" \"EnableMailboxIntelligenceProtection\",\"EnableSpoofIntelligence\" \"TargetedUserProtectionAction\",\"TargetedDomainProtectionAction\" \"MailboxIntelligenceProtectionAction\",\"EnableFirstContactSafetyTips\" \"EnableSimilarUsersSafetyTips\",\"EnableSimilarDomainsSafetyTips\" \"EnableUnusualCharactersSafetyTips\",\"TargetedUsersToProtect\" \"HonorDmarcPolicy\")Get-AntiPhishPolicy | fl $params```3. Verify there is a policy created the matches the values for the following parameters:```Enabled : TruePhishThresholdLevel : 3EnableTargetedUserProtection : TrueEnableOrganizationDomainsProtection : TrueEnableMailboxIntelligence : TrueEnableMailboxIntelligenceProtection : TrueEnableSpoofIntelligence : TrueTargetedUserProtectionAction : QuarantineTargetedDomainProtectionAction : QuarantineMailboxIntelligenceProtectionAction : QuarantineEnableFirstContactSafetyTips : TrueEnableSimilarUsersSafetyTips : TrueEnableSimilarDomainsSafetyTips : TrueEnableUnusualCharactersSafetyTips : TrueTargetedUsersToProtect : {}HonorDmarcPolicy : True```4. Verify that `TargetedUsersToProtect` contains a subset of the organization, up to 350 users, for targeted Impersonation Protection.5. Use PowerShell to verify the AntiPhishRule is configured and enabled.```Get-AntiPhishRule | ft AntiPhishPolicy,Priority,State,SentToMemberOf,RecipientDomainIs```6. Identity correct rule from the matching `AntiPhishPolicy` name in step 3. Ensure the rule defines groups or domains that include the majority of the organization by inspecting `SentToMemberOf` or `RecipientDomainIs`.**Note:** Audit guidance is intended to help identify a qualifying AntiPhish policy+rule that meets the recommended criteria while protecting the majority of the organization. It's understood some individual user exceptions may exist or exceptions for the entire policy if another product stands in as an equivalent control.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/anti-phishing-protection-about:https://learn.microsoft.com/en-us/defender-office-365/anti-phishing-policies-eop-configure",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.8",
+ "Description": "For each domain that is configured in Exchange, a corresponding Sender Policy Framework (SPF) record should be created.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "For each domain that is configured in Exchange, a corresponding Sender Policy Framework (SPF) record should be created.",
+ "RationaleStatement": "SPF records allow Exchange Online Protection and other mail systems to know where messages from domains are allowed to originate. This information can be used by that system to determine how to treat the message based on if it is being spoofed or is valid.",
+ "ImpactStatement": "There should be minimal impact of setting up SPF records however, organizations should ensure proper SPF record setup as email could be flagged as spam if SPF is not setup appropriately.",
+ "RemediationProcedure": "**To remediate using a DNS Provider:**1. If all email in your domain is sent from and received by Exchange Online, add the following TXT record for each Accepted Domain:```v=spf1 include:spf.protection.outlook.com -all```2. If there are other systems that send email in the environment, refer to this article for the proper SPF configuration: [https://docs.microsoft.com/en-us/office365/SecurityCompliance/set-up-spf-in-office-365-to-help-prevent-spoofing](https://docs.microsoft.com/en-us/office365/SecurityCompliance/set-up-spf-in-office-365-to-help-prevent-spoofing).",
+ "AuditProcedure": "**To audit using PowerShell:**1. Open a command prompt.2. Type the following command in PowerShell:```Resolve-DnsName [domain1.com] txt | fl```3. Ensure that a value exists and that it includes `v=spf1 include:spf.protection.outlook.com`. This designates Exchange Online as a designated sender.**To verify the SPF records are published, use the REST API for each domain:**```https://graph.microsoft.com/v1.0/domains/[DOMAIN.COM]/serviceConfigurationRecords```1. Ensure that a value exists that includes `v=spf1 include:spf.protection.outlook.com`. This designates Exchange Online as a designated sender.**Note:** Resolve-DnsName is not available on older versions of Windows prior to Windows 8 and Server 2012.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/email-authentication-spf-configure?view=o365-worldwide",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.9",
+ "Description": "DKIM is one of the trio of Authentication methods (SPF, DKIM and DMARC) that help prevent attackers from sending messages that look like they come from your domain. DKIM lets an organization add a digital signature to outbound email messages in the message header. When DKIM is configured, the organization authorizes it's domain to associate, or sign, its name to an email message using cryptographic authentication. Email systems that get email from this domain can use a digital signature to help verify whether incoming email is legitimate.Use of DKIM in addition to SPF and DMARC to help prevent malicious actors using spoofing techniques from sending messages that look like they are coming from your domain.",
+ "Checks": [
+ "defender_domain_dkim_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "DKIM is one of the trio of Authentication methods (SPF, DKIM and DMARC) that help prevent attackers from sending messages that look like they come from your domain. DKIM lets an organization add a digital signature to outbound email messages in the message header. When DKIM is configured, the organization authorizes it's domain to associate, or sign, its name to an email message using cryptographic authentication. Email systems that get email from this domain can use a digital signature to help verify whether incoming email is legitimate.Use of DKIM in addition to SPF and DMARC to help prevent malicious actors using spoofing techniques from sending messages that look like they are coming from your domain.",
+ "RationaleStatement": "By enabling DKIM with Office 365, messages that are sent from Exchange Online will be cryptographically signed. This will allow the receiving email system to validate that the messages were generated by a server that the organization authorized and not being spoofed.",
+ "ImpactStatement": "There should be no impact of setting up DKIM however, organizations should ensure appropriate setup to ensure continuous mail-flow.",
+ "RemediationProcedure": "**To remediate using a DNS Provider:**1. For each accepted domain in Exchange Online, two DNS entries are required.```Host name: selector1._domainkeyPoints to address or value: selector1-._domainkey. TTL: 3600Host name: selector2._domainkeyPoints to address or value: selector2-._domainkey. TTL: 3600```For Office 365, the selectors will always be `selector1` or `selector2`.domainGUID is the same as the domainGUID in the customized MX record for your custom domain that appears before mail.protection.outlook.com. For example, in the following MX record for the domain contoso.com, the domainGUID is contoso-com:```contoso.com. 3600 IN MX 5 contoso-com.mail.protection.outlook.com```The initial domain is the domain that you used when you signed up for Office 365. Initial domains always end with on.microsoft.com.1. After the DNS records are created, enable DKIM signing in Defender.2. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/3. Expand `Email & collaboration` > `Policies & rules` > `Threat policies`.4. Under `Rules` section click `Email authentication settings`.5. Select `DKIM`6. Click on each domain and click `Enable` next to `Sign messages for this domain with DKIM signature`.**Final remediation step using the Exchange Online PowerShell Module:**1. Connect to Exchange Online service using `Connect-ExchangeOnline`.2. Run the following Exchange Online PowerShell command:```Set-DkimSigningConfig -Identity < domainName > -Enabled $True```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Expand `Email & collaboration` > `Policies & rules` > `Threat policies`.3. Under `Rules` section click `Email authentication settings`.4. Select `DKIM`5. Click on each domain and confirm that `Sign messages for this domain with DKIM signatures` is `Enabled`.6. A status of `Not signing DKIM signatures for this domain` is an audit fail.**To audit using PowerShell:**1. Connect to Exchange Online service using `Connect-ExchangeOnline`.2. Run the following Exchange Online PowerShell command:```Get-DkimSigningConfig```3. Verify `Enabled` is set to True",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/email-authentication-dkim-configure?view=o365-worldwide",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.10",
+ "Description": "DMARC, or Domain-based Message Authentication, Reporting, and Conformance, assists recipient mail systems in determining the appropriate action to take when messages from a domain fail to meet SPF or DKIM authentication criteria.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "DMARC, or Domain-based Message Authentication, Reporting, and Conformance, assists recipient mail systems in determining the appropriate action to take when messages from a domain fail to meet SPF or DKIM authentication criteria.",
+ "RationaleStatement": "DMARC strengthens the trustworthiness of messages sent from an organization's domain to destination email systems. By integrating DMARC with SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail), organizations can significantly enhance their defenses against email spoofing and phishing attempts.Leaving a DMARC policy set to `p=none` can result in failed action when a spear phishing email fails DMARC but passes SPF and DKIM checks. Having DMARC fully configured is a critical part in preventing business email compromise.",
+ "ImpactStatement": "There should be no impact of setting up DMARC however, organizations should ensure appropriate setup to ensure continuous mail-flow.",
+ "RemediationProcedure": "**To remediate using a DNS Provider:**1. For each Exchange Online Accepted Domain, add the following record to DNS:``` Record: _dmarc.domain1.comType: TXTValue: v=DMARC1; p=none; rua=mailto:; ruf=mailto:```2. This will create a basic DMARC policy that will allow the organization to start monitoring message statistics.3. One week is enough time for data generated by the reports to be useful in understanding email trends and traffic. The final step requires implementing a policy of `p=reject` OR `p=quarantine` and `pct=100` with the necessary `rua` and `ruf` email addresses defined:```Record: _dmarc.domain1.comType: TXTValue: v=DMARC1; p=reject; pct=100; rua=mailto:; ruf=mailto:```**Also remediate the MOREA domain using the UI:**1. Navigate to the Microsoft 365 admin center https://admin.microsoft.com/2. Expand `Settings` and select `Domains`.3. Select your tenant domain (for example, contoso.onmicrosoft.com).4. Select `DNS records` and click `+ Add record`.5. Add a new record with the TXT name of `_dmarc` with the appropriate values outlined above.**Note:** The remediation portion involves a multi-staged approach over a period of time. First, a baseline of the current state of email will be established with `p=none` and `rua` and `ruf`. Once the environment is better understood and reports have been analyzed an organization will move to the final state with dmarc record values as outlined in the audit section.Microsoft has a list of [best practices for implementing DMARC](https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/email-authentication-dmarc-configure?view=o365-worldwide#best-practices-for-implementing-dmarc-in-microsoft-365) that cover these steps in detail.",
+ "AuditProcedure": "**To audit using PowerShell:**1. Open a command prompt.2. For each of the Accepted Domains in Exchange Online run the following in PowerShell:```Resolve-DnsName _dmarc.[domain1.com] txt```3. Ensure that the record exists and has at minimum the following flags defined as follows: `v=DMARC1;` (`p=quarantine` OR `p=reject`), `pct=100`, `rua=mailto:` and `ruf=mailto:`The below example records would pass as they contain a policy that would either `quarantine` or `reject` messages failing DMARC, the policy affects 100% of mail `pct=100` as well as containing valid reporting addresses:```v=DMARC1; p=reject; pct=100; rua=mailto:rua@contoso.com; ruf=mailto:ruf@contoso.com; fo=1v=DMARC1; p=reject; pct=100; fo=1; ri=3600; rua=mailto:rua@contoso.com; ruf=mailto:ruf@contoso.comv=DMARC1; p=quarantine; pct=100; sp=none; fo=1; ri=3600; rua=mailto:rua@contoso.com; ruf=ruf@contoso.com;```4. Ensure the Microsoft MOERA domain is also configured.```Resolve-DnsName _dmarc.[tenant].onmicrosoft.com txt```5. Ensure the record meets the same criteria listed in step #3.**Note:** Resolve-DnsName is not available on older versions of Windows prior to Windows 8 and Server 2012.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/email-authentication-dmarc-configure?view=o365-worldwide:https://learn.microsoft.com/en-us/defender-office-365/step-by-step-guides/how-to-enable-dmarc-reporting-for-microsoft-online-email-routing-address-moera-and-parked-domains?view=o365-worldwide:https://media.defense.gov/2024/May/02/2003455483/-1/-1/0/CSA-NORTH-KOREAN-ACTORS-EXPLOIT-WEAK-DMARC.PDF",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "2.1.11",
+ "Description": "The Common Attachment Types Filter lets a user block known and custom malicious file types from being attached to emails. The policy provided by Microsoft covers 53 extensions, and an additional custom list of extensions can be defined.The list of 186 extensions provided in this recommendation is comprehensive but not exhaustive.",
+ "Checks": [
+ "defender_malware_policy_comprehensive_attachments_filter_applied"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "The Common Attachment Types Filter lets a user block known and custom malicious file types from being attached to emails. The policy provided by Microsoft covers 53 extensions, and an additional custom list of extensions can be defined.The list of 186 extensions provided in this recommendation is comprehensive but not exhaustive.",
+ "RationaleStatement": "Blocking known malicious file types can help prevent malware-infested files from infecting a host or performing other malicious attacks such as phishing and data extraction.Defining a comprehensive list of attachments can help protect against additional unknown and known threats. Many legacy file formats, binary files and compressed files have been used as delivery mechanisms for malicious software. Organizations can protect themselves from Business E-mail Compromise (BEC) by allow-listing only the file types relevant to their line of business and blocking all others.",
+ "ImpactStatement": "For file types that are business necessary users will need to use other organizationally approved methods to transfer blocked extension types between business partners.",
+ "RemediationProcedure": "**To Remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following script:```# Create an attachment policy and associated rule. The rule is# intentionally disabled allowing the org to enable it when ready$Policy = @{ Name = \"CIS L2 Attachment Policy\" EnableFileFilter = $true ZapEnabled = $true EnableInternalSenderAdminNotifications = $true InternalSenderAdminAddress = 'admin@contoso.com' # Change this.}$L2Extensions = @( \"7z\", \"a3x\", \"ace\", \"ade\", \"adp\", \"ani\", \"app\", \"appinstaller\", \"applescript\", \"application\", \"appref-ms\", \"appx\", \"appxbundle\", \"arj\", \"asd\", \"asx\", \"bas\", \"bat\", \"bgi\", \"bz2\", \"cab\", \"chm\", \"cmd\", \"com\", \"cpl\", \"crt\", \"cs\", \"csh\", \"daa\", \"dbf\", \"dcr\", \"deb\", \"desktopthemepackfile\", \"dex\", \"diagcab\", \"dif\", \"dir\", \"dll\", \"dmg\", \"doc\", \"docm\", \"dot\", \"dotm\", \"elf\", \"eml\", \"exe\", \"fxp\", \"gadget\", \"gz\", \"hlp\", \"hta\", \"htc\", \"htm\", \"htm\", \"html\", \"html\", \"hwpx\", \"ics\", \"img\", \"inf\", \"ins\", \"iqy\", \"iso\", \"isp\", \"jar\", \"jnlp\", \"js\", \"jse\", \"kext\", \"ksh\", \"lha\", \"lib\", \"library-ms\", \"lnk\", \"lzh\", \"macho\", \"mam\", \"mda\", \"mdb\", \"mde\", \"mdt\", \"mdw\", \"mdz\", \"mht\", \"mhtml\", \"mof\", \"msc\", \"msi\", \"msix\", \"msp\", \"msrcincident\", \"mst\", \"ocx\", \"odt\", \"ops\", \"oxps\", \"pcd\", \"pif\", \"plg\", \"pot\", \"potm\", \"ppa\", \"ppam\", \"ppkg\", \"pps\", \"ppsm\", \"ppt\", \"pptm\", \"prf\", \"prg\", \"ps1\", \"ps11\", \"ps11xml\", \"ps1xml\", \"ps2\", \"ps2xml\", \"psc1\", \"psc2\", \"pub\", \"py\", \"pyc\", \"pyo\", \"pyw\", \"pyz\", \"pyzw\", \"rar\", \"reg\", \"rev\", \"rtf\", \"scf\", \"scpt\", \"scr\", \"sct\", \"searchConnector-ms\", \"service\", \"settingcontent-ms\", \"sh\", \"shb\", \"shs\", \"shtm\", \"shtml\", \"sldm\", \"slk\", \"so\", \"spl\", \"stm\", \"svg\", \"swf\", \"sys\", \"tar\", \"theme\", \"themepack\", \"timer\", \"uif\", \"url\", \"uue\", \"vb\", \"vbe\", \"vbs\", \"vhd\", \"vhdx\", \"vxd\", \"wbk\", \"website\", \"wim\", \"wiz\", \"ws\", \"wsc\", \"wsf\", \"wsh\", \"xla\", \"xlam\", \"xlc\", \"xll\", \"xlm\", \"xls\", \"xlsb\", \"xlsm\", \"xlt\", \"xltm\", \"xlw\", \"xnk\", \"xps\", \"xsl\", \"xz\", \"z\")# Create the policyNew-MalwareFilterPolicy @Policy -FileTypes $L2Extensions# Create the rule for all accepted domains$Rule = @{ Name = $Policy.Name Enabled = $false MalwareFilterPolicy = $Policy.Name RecipientDomainIs = (Get-AcceptedDomain).Name Priority = 0}New-MalwareFilterRule @Rule```3. When prepared enable the rule either through the UI or PowerShell.**Note:** Due to the number of extensions the UI method is not covered. The objects can however be edited in the UI or manually added using the list from the script.1. Navigate to `Microsoft Defender` at https://security.microsoft.com/2. Browse to `Policies & rules` > `Threat policies` > `Anti-malware`.",
+ "AuditProcedure": "**Note:** Utilizing the UI for auditing Anti-malware policies can be very time consuming so it is recommended to use a script like the one supplied below.**To Audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following script:```# Evaluate each Malware policy. If one exist with more than 120 extensions then # the script will output a report showing a list of missing extensions along with# other parameters.$L2Extensions = @( \"7z\", \"a3x\", \"ace\", \"ade\", \"adp\", \"ani\", \"app\", \"appinstaller\", \"applescript\", \"application\", \"appref-ms\", \"appx\", \"appxbundle\", \"arj\", \"asd\", \"asx\", \"bas\", \"bat\", \"bgi\", \"bz2\", \"cab\", \"chm\", \"cmd\", \"com\", \"cpl\", \"crt\", \"cs\", \"csh\", \"daa\", \"dbf\", \"dcr\", \"deb\", \"desktopthemepackfile\", \"dex\", \"diagcab\", \"dif\", \"dir\", \"dll\", \"dmg\", \"doc\", \"docm\", \"dot\", \"dotm\", \"elf\", \"eml\", \"exe\", \"fxp\", \"gadget\", \"gz\", \"hlp\", \"hta\", \"htc\", \"htm\", \"htm\", \"html\", \"html\", \"hwpx\", \"ics\", \"img\", \"inf\", \"ins\", \"iqy\", \"iso\", \"isp\", \"jar\", \"jnlp\", \"js\", \"jse\", \"kext\", \"ksh\", \"lha\", \"lib\", \"library-ms\", \"lnk\", \"lzh\", \"macho\", \"mam\", \"mda\", \"mdb\", \"mde\", \"mdt\", \"mdw\", \"mdz\", \"mht\", \"mhtml\", \"mof\", \"msc\", \"msi\", \"msix\", \"msp\", \"msrcincident\", \"mst\", \"ocx\", \"odt\", \"ops\", \"oxps\", \"pcd\", \"pif\", \"plg\", \"pot\", \"potm\", \"ppa\", \"ppam\", \"ppkg\", \"pps\", \"ppsm\", \"ppt\", \"pptm\", \"prf\", \"prg\", \"ps1\", \"ps11\", \"ps11xml\", \"ps1xml\", \"ps2\", \"ps2xml\", \"psc1\", \"psc2\", \"pub\", \"py\", \"pyc\", \"pyo\", \"pyw\", \"pyz\", \"pyzw\", \"rar\", \"reg\", \"rev\", \"rtf\", \"scf\", \"scpt\", \"scr\", \"sct\", \"searchConnector-ms\", \"service\", \"settingcontent-ms\", \"sh\", \"shb\", \"shs\", \"shtm\", \"shtml\", \"sldm\", \"slk\", \"so\", \"spl\", \"stm\", \"svg\", \"swf\", \"sys\", \"tar\", \"theme\", \"themepack\", \"timer\", \"uif\", \"url\", \"uue\", \"vb\", \"vbe\", \"vbs\", \"vhd\", \"vhdx\", \"vxd\", \"wbk\", \"website\", \"wim\", \"wiz\", \"ws\", \"wsc\", \"wsf\", \"wsh\", \"xla\", \"xlam\", \"xlc\", \"xll\", \"xlm\", \"xls\", \"xlsb\", \"xlsm\", \"xlt\", \"xltm\", \"xlw\", \"xnk\", \"xps\", \"xsl\", \"xz\", \"z\")$MissingCount = 0$ExtensionPolicies = $null$RLine = $ExtensionReport = @()$FilterRules = Get-MalwareFilterRule$DateTime = $(((Get-Date).ToUniversalTime()).ToString(\"yyyyMMddTHHmmssZ\"))$OutputFilePath = \"$PWD\\CIS-Report_$($DateTime).txt\"$RLine += \"$(Get-Date)`n\"function Test-MalwarePolicy { param ( $PolicyId ) # Find the matching rule for custom policies $FoundRule = $null $FoundRule = $FilterRules | Where-Object { $_.MalwareFilterPolicy -eq $PolicyId } if ($PolicyId.EnableFileFilter -eq $false) { $script:RLine += \"WARNING: Common attachments filter is disabled.\" } if ($FoundRule.State -eq 'Disabled') { $script:RLine += \"WARNING: The Anti-malware rule is disabled.\" } $script:RLine += \"`nManual review needed - Domains, inclusions and exclusions must be valid:\" $script:RLine += $FoundRule | Format-List Name, RecipientDomainIs, Sent*, Except*}# Match any policy that has over 120 extensions defined$ExtensionPolicies = Get-MalwareFilterPolicy | Where-Object {$_.FileTypes.Count -gt 120 }if (!$ExtensionPolicies) { Write-Host \"`nFAIL: A policy containing the minimum number of extensions was not found.\" -ForegroundColor Red Write-Host \"Only policies with over 120 extensions defined will be evaluated.\" -ForegroundColor Red Exit}# Check each policy for missing extensionsforeach ($policy in $ExtensionPolicies) { $MissingExtensions = $L2Extensions | Where-Object { $extension = $_; -not $policy.FileTypes.Contains($extension) } if ($MissingExtensions.Count -eq 0) { $RLine += \"-\" * 60 $RLine += \"[FOUND] $($policy.Identity)\" $RLine += \"-\" * 60 $RLine += \"PASS: Policy contains all extensions\" Test-MalwarePolicy -PolicyId $policy } else { $MissingCount++ $ExtensionReport += @{ Identity = $policy.Identity MissingExtensions = $MissingExtensions -join ', ' } }}if ($MissingCount -gt 0) { foreach ($fpolicy in $ExtensionReport) { $RLine += \"-\" * 60 $RLine += \"[PARTIAL] $($fpolicy.Identity)\" $RLine += \"-\" * 60 $RLine += \"NOTICE - The following extensions were not found:`n\" $RLine += \"$($fpolicy.MissingExtensions)`n\" Test-MalwarePolicy -PolicyId $fpolicy.Identity }}# Output the report to a text fileOut-File -FilePath $OutputFilePath -InputObject $RLineGet-Content $OutputFilePathWrite-Host \"`nLog file exported to\" $OutputFilePath```3. Review the exported results which are stored in the present working directory.4. A pass for this recommendation is made when an active policy is in place that covers all extensions except for those explicitly defined as an exception by the organization. A passing policy must also be `enabled` and have the `EnableFileFilter` parameter enabled.5. Review any manual steps listed in the output, exceptions and inclusions are organizational specific.**Note:** The audit procedure intentionally does not include the action taken for matched extensions, e.g. Reject with NDR or Quarantine the message. These are considered organization specific and are not scored. When `FileTypeAction` is not specified the action will default to `Reject the message with a non-delivery receipt (NDR)`. The Quarantine Policy is also considered organization specific.**Note 2:** Weighting by individual extension risk is beyond the scope of this document. Organizations should evaluate these both independently and based on business need.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/exchange/get-malwarefilterpolicy?view=exchange-ps:https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/anti-malware-policies-configure?view=o365-worldwide:https://learn.microsoft.com/en-us/office/compatibility/office-file-format-reference",
+ "DefaultValue": "The following extensions are blocked by default:ace, ani, apk, app, appx, arj, bat, cab, cmd, com, deb, dex, dll, docm, elf, exe, hta, img, iso, jar, jnlp, kext, lha, lib, library, lnk, lzh, macho, msc, msi, msix, msp, mst, pif, ppa, ppam, reg, rev, scf, scr, sct, sys, uif, vb, vbe, vbs, vxd, wsc, wsf, wsh, xll, xz, z"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.12",
+ "Description": "In Microsoft 365 organizations with Exchange Online mailboxes or standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, connection filtering and the default connection filter policy identify good or bad source email servers by IP addresses. The key components of the default connection filter policy are **IP Allow List**, **IP Block List** and **Safe list**.The recommended state is `IP Allow List` empty or undefined.",
+ "Checks": [
+ "defender_antispam_connection_filter_policy_empty_ip_allowlist"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "In Microsoft 365 organizations with Exchange Online mailboxes or standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, connection filtering and the default connection filter policy identify good or bad source email servers by IP addresses. The key components of the default connection filter policy are **IP Allow List**, **IP Block List** and **Safe list**.The recommended state is `IP Allow List` empty or undefined.",
+ "RationaleStatement": "Without additional verification like mail flow rules, email from sources in the IP Allow List skips spam filtering and sender authentication (SPF, DKIM, DMARC) checks. This method creates a high risk of attackers successfully delivering email to the Inbox that would otherwise be filtered. Messages that are determined to be malware or high confidence phishing are filtered.",
+ "ImpactStatement": "This is the default behavior. IP Allow lists may reduce false positives, however, this benefit is outweighed by the importance of a policy which scans all messages regardless of the origin. This supports the principle of zero trust.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules`> `Threat policies`. 3. Under Policies select `Anti-spam`.4. Click on the `Connection filter policy (Default)`.5. Click `Edit connection filter policy`.6. Remove any IP entries from `Always allow messages from the following IP addresses or address range:`.7. Click `Save`.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-HostedConnectionFilterPolicy -Identity Default -IPAllowList @{}```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules` > `Threat policies`. 3. Under Policies select `Anti-spam`.4. Click on the `Connection filter policy (Default)`.5. Ensure `IP Allow list` contains no entries.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-HostedConnectionFilterPolicy -Identity Default | fl IPAllowList```3. Ensure `IPAllowList` is empty or `{}`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/connection-filter-policies-configure:https://learn.microsoft.com/en-us/defender-office-365/create-safe-sender-lists-in-office-365#use-the-ip-allow-list:https://learn.microsoft.com/en-us/defender-office-365/how-policies-and-protections-are-combined#user-and-tenant-settings-conflict",
+ "DefaultValue": "IPAllowList : {}"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.13",
+ "Description": "In Microsoft 365 organizations with Exchange Online mailboxes or standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, connection filtering and the default connection filter policy identify good or bad source email servers by IP addresses. The key components of the default connection filter policy are **IP Allow List**, **IP Block List** and **Safe list**.The safe list is a pre-configured allow list that is dynamically updated by Microsoft.The recommended safe list state is: `Off` or `False`",
+ "Checks": [
+ "defender_antispam_connection_filter_policy_safe_list_off"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "In Microsoft 365 organizations with Exchange Online mailboxes or standalone Exchange Online Protection (EOP) organizations without Exchange Online mailboxes, connection filtering and the default connection filter policy identify good or bad source email servers by IP addresses. The key components of the default connection filter policy are **IP Allow List**, **IP Block List** and **Safe list**.The safe list is a pre-configured allow list that is dynamically updated by Microsoft.The recommended safe list state is: `Off` or `False`",
+ "RationaleStatement": "Without additional verification like mail flow rules, email from sources in the IP Allow List skips spam filtering and sender authentication (SPF, DKIM, DMARC) checks. This method creates a high risk of attackers successfully delivering email to the Inbox that would otherwise be filtered. Messages that are determined to be malware or high confidence phishing are filtered.The safe list is managed dynamically by Microsoft, and administrators do not have visibility into which sender are included. Incoming messages from email servers on the safe list bypass spam filtering.",
+ "ImpactStatement": "This is the default behavior. IP Allow lists may reduce false positives, however, this benefit is outweighed by the importance of a policy which scans all messages regardless of the origin. This supports the principle of zero trust.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules`> `Threat policies`. 3. Under Policies select `Anti-spam`.4. Click on the `Connection filter policy (Default)`.5. Click `Edit connection filter policy`.6. Uncheck `Turn on safe list`.7. Click `Save`.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-HostedConnectionFilterPolicy -Identity Default -EnableSafeList $false```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules` > `Threat policies`. 3. Under Policies select `Anti-spam`.4. Click on the `Connection filter policy (Default)`.5. Ensure `Safe list` is `Off`. **To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-HostedConnectionFilterPolicy -Identity Default | fl EnableSafeList```3. Ensure `EnableSafeList` is `False`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/connection-filter-policies-configure:https://learn.microsoft.com/en-us/defender-office-365/create-safe-sender-lists-in-office-365#use-the-ip-allow-list:https://learn.microsoft.com/en-us/defender-office-365/how-policies-and-protections-are-combined#user-and-tenant-settings-conflict",
+ "DefaultValue": "EnableSafeList : False"
+ }
+ ]
+ },
+ {
+ "Id": "2.1.14",
+ "Description": "Anti-spam protection is a feature of Exchange Online that utilizes policies to help to reduce the amount of junk email, bulk and phishing emails a mailbox receives. These policies contain lists to allow or block specific senders or domains. - The allowed senders list- The allowed domains list- The blocked senders list- The blocked domains listThe recommended state is: Do not define any `Allowed domains`",
+ "Checks": [
+ "defender_antispam_policy_inbound_no_allowed_domains"
+ ],
+ "Attributes": [
+ {
+ "Section": "2.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Anti-spam protection is a feature of Exchange Online that utilizes policies to help to reduce the amount of junk email, bulk and phishing emails a mailbox receives. These policies contain lists to allow or block specific senders or domains. - The allowed senders list- The allowed domains list- The blocked senders list- The blocked domains listThe recommended state is: Do not define any `Allowed domains`",
+ "RationaleStatement": "Messages from entries in the allowed senders list or the allowed domains list bypass most email protection (except malware and high confidence phishing) and email authentication checks (SPF, DKIM and DMARC). Entries in the allowed senders list or the allowed domains list create a high risk of attackers successfully delivering email to the Inbox that would otherwise be filtered. The risk is increased even more when allowing common domain names as these can be easily spoofed by attackers.Microsoft specifies in its documentation that allowed domains should be used for testing purposes only.",
+ "ImpactStatement": "This is the default behavior. Allowed domains may reduce false positives, however, this benefit is outweighed by the importance of having a policy which scans all messages regardless of the origin. As an alternative consider sender based lists. This supports the principle of zero trust.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules`> `Threat policies`. 3. Under Policies select `Anti-spam`.4. Open each out of compliance inbound anti-spam policy by clicking on it.5. Click `Edit allowed and blocked senders and domains`.6. Select `Allow domains`.7. Delete each domain from the domains list.8. Click `Done` > `Save`.9. Repeat as needed.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-HostedContentFilterPolicy -Identity -AllowedSenderDomains @{}```Or, run this to remove allowed domains from all inbound anti-spam policies:```$AllowedDomains = Get-HostedContentFilterPolicy | Where-Object {$_.AllowedSenderDomains}$AllowedDomains | Set-HostedContentFilterPolicy -AllowedSenderDomains @{}```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Click to expand `Email & collaboration` select `Policies & rules` > `Threat policies`. 3. Under Policies select `Anti-spam`.4. Inspect each **inbound anti-spam** policy5. Ensure `Allowed domains` does not contain any domain names.6. Repeat as needed for any additional inbound anti-spam policy.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-HostedContentFilterPolicy | ft Identity,AllowedSenderDomains```3. Ensure `AllowedSenderDomains` is undefined for each inbound policy.**Note:** Each inbound policy must pass for this recommendation to be considered to be in a passing state.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/anti-spam-protection-about#allow-and-block-lists-in-anti-spam-policies",
+ "DefaultValue": "AllowedSenderDomains : {}"
+ }
+ ]
+ },
+ {
+ "Id": "2.4.1",
+ "Description": "Identify _priority accounts_ to utilize Microsoft 365's advanced custom security features. This is an essential tool to bolster protection for users who are frequently targeted due to their critical positions, such as executives, leaders, managers, or others who have access to sensitive, confidential, financial, or high-priority information.Once these accounts are identified, several services and features can be enabled, including threat policies, enhanced sign-in protection through conditional access policies, and alert policies, enabling faster response times for incident response teams.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Identify _priority accounts_ to utilize Microsoft 365's advanced custom security features. This is an essential tool to bolster protection for users who are frequently targeted due to their critical positions, such as executives, leaders, managers, or others who have access to sensitive, confidential, financial, or high-priority information.Once these accounts are identified, several services and features can be enabled, including threat policies, enhanced sign-in protection through conditional access policies, and alert policies, enabling faster response times for incident response teams.",
+ "RationaleStatement": "Enabling priority account protection for users in Microsoft 365 is necessary to enhance security for accounts with access to sensitive data and high privileges, such as CEOs, CISOs, CFOs, and IT admins. These priority accounts are often targeted by spear phishing or whaling attacks and require stronger protection to prevent account compromise. To address this, Microsoft 365 and Microsoft Defender for Office 365 offer several key features that provide extra security, including the identification of incidents and alerts involving priority accounts and the use of built-in custom protections designed specifically for them.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "_Remediate with a 3-step process_**Step 1: Enable Priority account protection in Microsoft 365 Defender:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Click to expand `System` select `Settings`.3. Select `E-mail & Collaboration` > `Priority account protection`4. Ensure `Priority account protection` is set to `On`**Step 2: Tag priority accounts:**5. Select `User tags`6. Select the `PRIORITY ACCOUNT` tag and click `Edit`7. Select `Add members` to add users, or groups. **Groups are recommended.**8. Repeat the previous 2 steps for any additional tags needed, such as Finance or HR.9. `Next` and `Submit`.**Step 3: Configure E-mail alerts for Priority Accounts:**10. Expand `E-mail & Collaboration` on the left column. 11. Select `New Alert Policy`12. Enter a valid policy Name & Description. Set `Severity` to `High` and `Category` to `Threat management`.13. Set `Activity is` to `Detected malware in an e-mail message`14. Mail direction is `Inbound`15. Select `Add Condition` and `User: recipient tags are` 16. In the `Selection option` field add chosen priority tags such as Priority account.17. Select `Every time an activity matches the rule`.18. `Next` and verify valid recipient(s) are selected.19. `Next` and select `Yes, turn it on right away.` Click `Submit` to save the alert.20. Repeat steps 10 - 18 for the Activity field `Activity is`: `Phishing email detected at time of delivery`**NOTE:** Any additional activity types may be added as needed. Above are the minimum recommended.",
+ "AuditProcedure": "_Audit with a 3-step process_**Step 1: Verify Priority account protection is enabled:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Click to expand `System` select `Settings`.3. Select `E-mail & collaboration` > `Priority account protection`4. Ensure `Priority account protection` is set to `On`**Step 2: Verify that priority accounts are identified and tagged accordingly:**5. Select `User tags`6. Select the `PRIORITY ACCOUNT` tag and click `Edit`7. Verify the assigned members match the organization's defined priority accounts or groups.8. Repeat the previous 2 steps for any additional tags identified, such as Finance or HR.**Step 3: Ensure alerts are configured:**9. Expand `E-mail & Collaboration` on the left column. 10. Select `Policies & rules` > `Alert policy`11. Ensure alert policies are configured for priority accounts, enabled and have a valid recipient. The tags column can be used to identify policies using a specific tag.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/setup/priority-accounts:https://learn.microsoft.com/en-us/defender-office-365/priority-accounts-security-recommendations",
+ "DefaultValue": "By default, priority accounts are undefined."
+ }
+ ]
+ },
+ {
+ "Id": "2.4.2",
+ "Description": "Preset security policies have been established by Microsoft, utilizing observations and experiences within datacenters to strike a balance between the exclusion of malicious content from users and limiting unwarranted disruptions. These policies can apply to all, or select users and encompass recommendations for addressing spam, malware, and phishing threats. The policy parameters are pre-determined and non-adjustable.`Strict protection` has the most aggressive protection of the 3 presets.- EOP: Anti-spam, Anti-malware and Anti-phishing- Defender: Spoof protection, Impersonation protection and Advanced phishing- Defender: Safe Links and Safe Attachments**NOTE: The preset security polices cannot target Priority account TAGS currently, groups should be used instead.**",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Preset security policies have been established by Microsoft, utilizing observations and experiences within datacenters to strike a balance between the exclusion of malicious content from users and limiting unwarranted disruptions. These policies can apply to all, or select users and encompass recommendations for addressing spam, malware, and phishing threats. The policy parameters are pre-determined and non-adjustable.`Strict protection` has the most aggressive protection of the 3 presets.- EOP: Anti-spam, Anti-malware and Anti-phishing- Defender: Spoof protection, Impersonation protection and Advanced phishing- Defender: Safe Links and Safe Attachments**NOTE: The preset security polices cannot target Priority account TAGS currently, groups should be used instead.**",
+ "RationaleStatement": "Enabling priority account protection for users in Microsoft 365 is necessary to enhance security for accounts with access to sensitive data and high privileges, such as CEOs, CISOs, CFOs, and IT admins. These priority accounts are often targeted by spear phishing or whaling attacks and require stronger protection to prevent account compromise.The implementation of stringent, pre-defined policies may result in instances of false positive, however, the benefit of requiring the end-user to preview junk email before accessing their inbox outweighs the potential risk of mistakenly perceiving a malicious email as safe due to its placement in the inbox.",
+ "ImpactStatement": "Strict policies are more likely to cause false positives in anti-spam, phishing, impersonation, spoofing and intelligence responses.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Select to expand `E-mail & collaboration`.3. Select `Policies & rules` > `Threat policies` > `Preset security policies`.4. Click to `Manage protection settings` for `Strict protection` preset.5. For `Apply Exchange Online Protection` select at minimum `Specific recipients` and include the Accounts/Groups identified as Priority Accounts.6. For `Apply Defender for Office 365 Protection` select at minimum `Specific recipients` and include the Accounts/Groups identified as Priority Accounts.7. For `Impersonation protection` click `Next` and add valid e-mails or priority accounts both internal and external that may be subject to impersonation.8. For `Protected custom domains` add the organization's domain name, along side other key partners.9. Click `Next` and finally `Confirm`",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Select to expand `E-mail & collaboration`.3. Select `Policies & rules` > `Threat policies`.4. From here visit each section in turn: `Anti-phishing` `Anti-spam` `Anti-malware` `Safe Attachments` `Safe Links`5. Ensure in each there is a policy named `Strict Preset Security Policy` which includes the organization's priority Accounts/Groups.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/preset-security-policies?view=o365-worldwide:https://learn.microsoft.com/en-us/defender-office-365/priority-accounts-security-recommendations:https://learn.microsoft.com/en-us/defender-office-365/recommended-settings-for-eop-and-office365?view=o365-worldwide#impersonation-settings-in-anti-phishing-policies-in-microsoft-defender-for-office-365",
+ "DefaultValue": "By default, presets are not applied to any users or groups."
+ }
+ ]
+ },
+ {
+ "Id": "2.4.3",
+ "Description": "Microsoft Defender for Cloud Apps is a Cloud Access Security Broker (CASB). It provides visibility into suspicious activity in Microsoft 365, enabling investigation into potential security issues and facilitating the implementation of remediation measures if necessary.Some risk detection methods provided by Entra Identity Protection also require Microsoft Defender for Cloud Apps:- Suspicious manipulation of inbox rules- Suspicious inbox forwarding- New country detection- Impossible travel detection- Activity from anonymous IP addresses- Mass access to sensitive files",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft Defender for Cloud Apps is a Cloud Access Security Broker (CASB). It provides visibility into suspicious activity in Microsoft 365, enabling investigation into potential security issues and facilitating the implementation of remediation measures if necessary.Some risk detection methods provided by Entra Identity Protection also require Microsoft Defender for Cloud Apps:- Suspicious manipulation of inbox rules- Suspicious inbox forwarding- New country detection- Impossible travel detection- Activity from anonymous IP addresses- Mass access to sensitive files",
+ "RationaleStatement": "Security teams can receive notifications of triggered alerts for atypical or suspicious activities, see how the organization's data in Microsoft 365 is accessed and used, suspend user accounts exhibiting suspicious activity, and require users to log back in to Microsoft 365 apps after an alert has been triggered.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Click to expand `System` select `Settings` > `Cloud apps`.3. Scroll to `Information Protection` and select `Files`.4. Check `Enable file monitoring`.5. Scroll up to `Cloud Discovery` and select `Microsoft Defender for Endpoint.`6. Check `Enforce app access`, configure a Notification URL and `Save`.**Note:** Defender for Endpoint requires a Defender for Endpoint license.**Configure App Connectors:** 1. Scroll to `Connected apps` and select `App connectors`. 2. Click on `Connect an app` and select `Microsoft 365`.3. Check all Azure and Office 365 boxes then click `Connect Office 365`.4. Repeat for the `Microsoft Azure` application.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Click to expand `System` select `Settings` > `Cloud apps`.3. Scroll to `Connected apps` and select `App connectors`. 4. Ensure that **Microsoft 365** and **Microsoft Azure** both show in the list as `Connected`.5. Go to `Cloud Discovery` > `Microsoft Defender for Endpoint` and check if the integration is enabled.6. Go to `Information Protection` > `Files` and verify `Enable file monitoring` is checked.",
+ "AdditionalInformation": "Additional Microsoft 365 Defender features include:- The option to use Defender for cloud apps as a reverse proxy, allowing for the application of access or session controls through the definition of a conditional access policy.- The purchase and implementation of the \"App Governance\" add-on, which provides more precise control over OAuth app permissions and includes additional built-in policies.A list of Defender for Cloud Apps built-in policies for Office 365 can be found at https://learn.microsoft.com/en-us/defender-cloud-apps/protect-office-365.",
+ "References": "https://learn.microsoft.com/en-us/defender-cloud-apps/protect-office-365#connect-microsoft-365-to-microsoft-defender-for-cloud-apps:https://learn.microsoft.com/en-us/defender-cloud-apps/protect-azure#connect-azure-to-microsoft-defender-for-cloud-apps:https://learn.microsoft.com/en-us/defender-cloud-apps/best-practices:https://learn.microsoft.com/en-us/defender-cloud-apps/get-started:https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks",
+ "DefaultValue": "Disabled"
+ }
+ ]
+ },
+ {
+ "Id": "2.4.4",
+ "Description": "Zero-hour auto purge (ZAP) is a protection feature that retroactively detects and neutralizes malware and high confidence phishing. When ZAP for Teams protection blocks a message, the message is blocked for everyone in the chat. The initial block happens right after delivery, but ZAP occurs up to 48 hours after delivery.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "2.4",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Zero-hour auto purge (ZAP) is a protection feature that retroactively detects and neutralizes malware and high confidence phishing. When ZAP for Teams protection blocks a message, the message is blocked for everyone in the chat. The initial block happens right after delivery, but ZAP occurs up to 48 hours after delivery.",
+ "RationaleStatement": "ZAP is intended to protect users that have received zero-day malware messages or content that is weaponized after being delivered to users. It does this by continually monitoring spam and malware signatures taking automated retroactive action on messages that have already been delivered.",
+ "ImpactStatement": "As with any anti-malware or anti-phishing product, false positives may occur.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Defender` https://security.microsoft.com/2. Click to expand `System` select `Settings` > `Email & collaboration` > `Microsoft Teams protection`.3. Set `Zero-hour auto purge (ZAP)` to `On (Default)`**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following cmdlet:```Set-TeamsProtectionPolicy -Identity \"Teams Protection Policy\" -ZapEnabled $true```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Defender` https://security.microsoft.com/2. Click to expand `System` select `Settings` > `Email & collaboration` > `Microsoft Teams protection`.3. Ensure `Zero-hour auto purge (ZAP)` is set to `On (Default)`4. Under `Exclude these participants` review the list of exclusions and ensure they are justified and within tolerance for the organization.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following cmdlets:```Get-TeamsProtectionPolicy | fl ZapEnabledGet-TeamsProtectionPolicyRule | fl ExceptIf*```3. Ensure `ZapEnabled` is `True`.4. Review the list of exclusions and ensure they are justified and within tolerance for the organization. If nothing returns from the 2nd cmdlet then there are no exclusions defined.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/zero-hour-auto-purge?view=o365-worldwide#zero-hour-auto-purge-zap-in-microsoft-teams:https://learn.microsoft.com/en-us/defender-office-365/mdo-support-teams-about?view=o365-worldwide#configure-zap-for-teams-protection-in-defender-for-office-365-plan-2",
+ "DefaultValue": "On (Default)"
+ }
+ ]
+ },
+ {
+ "Id": "3.1.1",
+ "Description": "When audit log search is enabled in the Microsoft Purview compliance portal, user and admin activity within the organization is recorded in the audit log and retained for 90 days. However, some organizations may prefer to use a third-party security information and event management (SIEM) application to access their auditing data. In this scenario, a global admin can choose to turn off audit log search in Microsoft 365.",
+ "Checks": [
+ "purview_audit_log_search_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "3.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "When audit log search is enabled in the Microsoft Purview compliance portal, user and admin activity within the organization is recorded in the audit log and retained for 90 days. However, some organizations may prefer to use a third-party security information and event management (SIEM) application to access their auditing data. In this scenario, a global admin can choose to turn off audit log search in Microsoft 365.",
+ "RationaleStatement": "Enabling audit log search in the Microsoft Purview compliance portal can help organizations improve their security posture, meet regulatory compliance requirements, respond to security incidents, and gain valuable operational insights.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Purview` https://compliance.microsoft.com.2. Select `Audit` to open the audit search.3. Click `Start recording user and admin activity` next to the information warning at the top.4. Click `Yes` on the dialog box to confirm.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Purview` https://compliance.microsoft.com.2. Select `Audit` to open the audit search.3. Choose a date and time frame in the past 30 days.4. Verify search capabilities (e.g. try searching for Activities as `Accessed file` and results should be displayed).**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-AdminAuditLogConfig | Select-Object UnifiedAuditLogIngestionEnabled```3. Ensure `UnifiedAuditLogIngestionEnabled` is set to `True`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/purview/audit-log-enable-disable?view=o365-worldwide&tabs=microsoft-purview-portal:https://learn.microsoft.com/en-us/powershell/module/exchange/set-adminauditlogconfig?view=exchange-ps",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.2.1",
+ "Description": "Data Loss Prevention (DLP) policies allow Exchange Online and SharePoint Online content to be scanned for specific types of data like social security numbers, credit card numbers, or passwords.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "3.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Data Loss Prevention (DLP) policies allow Exchange Online and SharePoint Online content to be scanned for specific types of data like social security numbers, credit card numbers, or passwords.",
+ "RationaleStatement": "Enabling DLP policies alerts users and administrators that specific types of data should not be exposed, helping to protect the data from accidental exposure.",
+ "ImpactStatement": "Enabling a Teams DLP policy will allow sensitive data in Exchange Online and SharePoint Online to be detected or blocked. Always ensure to follow appropriate procedures during testing and implementation of DLP policies based on organizational standards.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Purview` https://compliance.microsoft.com.2. Under `Solutions` select `Data loss prevention` then `Policies`. 3. Click `Create policy`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Purview` https://compliance.microsoft.com.2. Under `Solutions` select `Data loss prevention` then `Policies`. 3. Verify that policies exist and are enabled.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/purview/dlp-learn-about-dlp?view=o365-worldwide",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "3.2.2",
+ "Description": "The default Teams Data Loss Prevention (DLP) policy rule in Microsoft 365 is a preconfigured rule that is automatically applied to all Teams conversations and channels. The default rule helps prevent accidental sharing of sensitive information by detecting and blocking certain types of content that are deemed sensitive or inappropriate by the organization. By default, the rule includes a check for the sensitive info type _Credit Card Number_ which is pre-defined by Microsoft.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "3.2",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "The default Teams Data Loss Prevention (DLP) policy rule in Microsoft 365 is a preconfigured rule that is automatically applied to all Teams conversations and channels. The default rule helps prevent accidental sharing of sensitive information by detecting and blocking certain types of content that are deemed sensitive or inappropriate by the organization. By default, the rule includes a check for the sensitive info type _Credit Card Number_ which is pre-defined by Microsoft.",
+ "RationaleStatement": "Enabling the default Teams DLP policy rule in Microsoft 365 helps protect an organization's sensitive information by preventing accidental sharing or leakage Credit Card information in Teams conversations and channels.DLP rules are not one size fits all, but at a minimum something should be defined. The organization should identify sensitive information important to them and seek to intercept it using DLP.",
+ "ImpactStatement": "End-users may be prevented from sharing certain types of content, which may require them to adjust their behavior or seek permission from administrators to share specific content. Administrators may receive requests from end-users for permission to share certain types of content or to modify the policy to better fit the needs of their teams.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Purview` compliance portal https://compliance.microsoft.com.2. Under `Solutions` select `Data loss prevention` then `Policies`. 3. Click `Policies` tab.4. Check `Default policy for Teams` then click `Edit policy`.5. The edit policy window will appear click Next6. At the `Choose locations to apply the policy` page, turn the status toggle to `On` for `Teams chat and channel messages` location and then click Next.7. On Customized advanced DLP rules page, ensure the `Default Teams DLP policy rule` Status is `On` and click Next.9. On the Policy mode page, select the radial for `Turn it on right away` and click Next.10. Review all the settings for the created policy on the Review your policy and create it page, and then click submit.11. Once the policy has been successfully submitted click Done.**Note:** Some tenants may not have a default policy for teams as Microsoft started creating these by default at a particular point in time. In this case a new policy will have to be created that includes a rule to protect data important to the organization such as credit cards and PII.",
+ "AuditProcedure": "**To audit the using the UI:**1. Navigate to `Microsoft Purview` compliance portal https://compliance.microsoft.com.2. Under `Solutions` select `Data loss prevention` then `Policies`. 3. Locate the `Default policy for Teams`.4. Verify the `Status` is `On`.5. Verify `Locations` include `Teams chat and channel messages - All accounts`.6. Verify `Policy settings` incudes the Default Teams DLP policy rule or one specific to the organization.**Note:** If there is not a default policy for teams inspect existing policies starting with step 4. DLP rules are specific to the organization and each organization should take steps to protect the data that matters to them. The default teams DLP rule will only alert on Credit Card matches.**To audit using PowerShell:**1. Connect to the Security & Compliance PowerShell using `Connect-IPPSSession`.2. Run the following to return policies that include Teams chat and channel messages:```$DlpPolicy = Get-DlpCompliancePolicy$DlpPolicy | Where-Object {$_.Workload -match \"Teams\"} | ft Name,Mode,TeamsLocation*```3. If nothing returns then there are no policies that include Teams and remediation is required.4. For any returned policy verify `Mode` is set to `Enable`.5. Verify `TeamsLocation` includes `All`.6. Verify `TeamsLocationException` includes only permitted exceptions. **Note:** Some tenants may not have a default policy for teams as Microsoft started creating these by default at a particular point in time. In this case a new policy will have to be created that includes a rule to protect data important to the organization such as credit cards and PII.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/exchange/connect-to-scc-powershell?view=exchange-ps:https://learn.microsoft.com/en-us/purview/dlp-teams-default-policy:https://learn.microsoft.com/en-us/powershell/module/exchange/connect-ippssession?view=exchange-ps",
+ "DefaultValue": "Enabled (On)"
+ }
+ ]
+ },
+ {
+ "Id": "3.3.1",
+ "Description": "SharePoint Online Data Classification Policies enables organizations to classify and label content in SharePoint Online based on its sensitivity and business impact. This setting helps organizations to manage and protect sensitive data by automatically applying labels to content, which can then be used to apply policy-based protection and governance controls.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "3.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "SharePoint Online Data Classification Policies enables organizations to classify and label content in SharePoint Online based on its sensitivity and business impact. This setting helps organizations to manage and protect sensitive data by automatically applying labels to content, which can then be used to apply policy-based protection and governance controls.",
+ "RationaleStatement": "By categorizing and applying policy-based protection, SharePoint Online Data Classification Policies can help reduce the risk of data loss or exposure and enable more effective incident response if a breach does occur.",
+ "ImpactStatement": "The creation of data classification policies is unlikely to have a significant impact on an organization. However, maintaining long-term adherence to policies may require ongoing training and compliance efforts across the organization. Therefore, organizations should include training and compliance planning as part of the data classification policy creation process.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Purview` compliance portal https://compliance.microsoft.com.2. Under `Solutions` select `Information protection`.3. Click on the `Label policies` tab.4. Click `Create a label` to create a label.5. Select the label and click on the `Publish label`.6. Fill out the forms to create the policy.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Purview` compliance portal https://compliance.microsoft.com.2. Under `Solutions` select `Information protection`.3. Click on the `Label policies` tab.4. Ensure that a Label policy exists and is published accordingly.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/purview/data-classification-overview?view=o365-worldwide#top-sensitivity-labels-applied-to-content:https://learn.microsoft.com/en-us/purview/sensitivity-labels-sharepoint-onedrive-files",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.1.1.1",
+ "Description": "Security defaults in Microsoft Entra ID make it easier to be secure and help protect the organization. Security defaults contain preconfigured security settings for common attacks.By default, Microsoft enables security defaults. The goal is to ensure that all organizations have a basic level of security enabled. The security default setting is manipulated in the Entra admin center.The use of security defaults, however, will prohibit custom settings which are being set with more advanced settings from this benchmark.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.1.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Security defaults in Microsoft Entra ID make it easier to be secure and help protect the organization. Security defaults contain preconfigured security settings for common attacks.By default, Microsoft enables security defaults. The goal is to ensure that all organizations have a basic level of security enabled. The security default setting is manipulated in the Entra admin center.The use of security defaults, however, will prohibit custom settings which are being set with more advanced settings from this benchmark.",
+ "RationaleStatement": "Security defaults provide secure default settings that are managed on behalf of organizations to keep customers safe until they are ready to manage their own identity security settings.For example, doing the following:- Requiring all users and admins to register for MFA.- Challenging users with MFA - mostly when they show up on a new device or app, but more often for critical roles and tasks.- Disabling authentication from legacy authentication clients, which can’t do MFA.",
+ "ImpactStatement": "The potential impact associated with disabling of Security Defaults is dependent upon the security controls implemented in the environment. It is likely that most organizations disabling Security Defaults plan to implement equivalent controls to replace Security Defaults.It may be necessary to check settings in other Microsoft products, such as Azure, to ensure settings and functionality are as expected when disabling security defaults for MS365.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com. 2. Click to expand `Identity` select `Overview`3. Click `Properties`.4. Click `Manage security defaults`.5. Set the `Security defaults` dropdown to `Disabled`.6. Select Save.**To remediate using PowerShell:**1. Connect to the Microsoft Graph service using `Connect-MgGraph -Scopes \"Policy.ReadWrite.ConditionalAccess\"`.2. Run the following Microsoft Graph PowerShell command:```$params = @{ IsEnabled = $false }Update-MgPolicyIdentitySecurityDefaultEnforcementPolicy -BodyParameter $params```**Warning:** It is recommended not to disable security defaults until you are ready to implement conditional access rules in the benchmark. Rules such as requiring MFA for all users and blocking legacy protocols are required in CA to make up for the gap created by disabling defaults. Plan accordingly. See the reference section for more details on what coverage Security Defaults provide.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com. 2. Click to expand `Identity` select `Overview`3. Click `Properties`.3. Review the section **Security Defaults** near the bottom4. If `Manage security defaults` appears clickable then proceed to the remediation section, otherwise read the note below.**Note:** If `Manage Conditional Access` appears in blue then Security defaults are already disabled, and CA is in use. The audit can be considered a Pass.**To audit using PowerShell:**1. Connect to the Microsoft Graph service using `Connect-MgGraph -Scopes \"Policy.Read.All\"`.2. Run the following Microsoft Graph PowerShell command:```Get-MgPolicyIdentitySecurityDefaultEnforcementPolicy | ft IsEnabled ```3. If the value is false then Security Defaults is disabled.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/fundamentals/security-defaults:https://techcommunity.microsoft.com/t5/microsoft-entra-blog/introducing-security-defaults/ba-p/1061414",
+ "DefaultValue": "Enabled."
+ }
+ ]
+ },
+ {
+ "Id": "5.1.2.1",
+ "Description": "Legacy per-user Multi-Factor Authentication (MFA) can be configured to require individual users to provide multiple authentication factors, such as passwords and additional verification codes, to access their accounts. It was introduced in earlier versions of Office 365, prior to the more comprehensive implementation of Conditional Access (CA).",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.1.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Legacy per-user Multi-Factor Authentication (MFA) can be configured to require individual users to provide multiple authentication factors, such as passwords and additional verification codes, to access their accounts. It was introduced in earlier versions of Office 365, prior to the more comprehensive implementation of Conditional Access (CA).",
+ "RationaleStatement": "Both security defaults and conditional access with security defaults turned off are not compatible with per-user multi-factor authentication (MFA), which can lead to undesirable user authentication states. The CIS Microsoft 365 Benchmark explicitly employs Conditional Access for MFA as an enhancement over security defaults and as a replacement for the outdated per-user MFA. To ensure a consistent authentication state disable per-user MFA on all accounts.",
+ "ImpactStatement": "Accounts using per-user MFA will need to be migrated to use CA.Prior to disabling per-user MFA the organization must be prepared to implement conditional access MFA to avoid security gaps and allow for a smooth transition. This will help ensure relevant accounts are covered by MFA during the change phase from disabling per-user MFA to enabling CA MFA. Section 5.2.2 in this document covers creating of a CA rule for both administrators and all users in the tenant.Microsoft has documentation on migrating from per-user MFA [Convert users from per-user MFA to Conditional Access based MFA](https://learn.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-getstarted#convert-users-from-per-user-mfa-to-conditional-access-based-mfa)",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Users` select `All users`.3. Click on `Per-user MFA` on the top row.4. Click the empty box next to `Display Name` to select all accounts.5. On the far right under _quick steps_ click `Disable`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Users` select `All users`.3. Click on `Per-user MFA` on the top row.4. Ensure under the column `Multi-factor Auth Status` that each account is set to `Disabled`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-userstates#convert-users-from-per-user-mfa-to-conditional-access:https://learn.microsoft.com/en-us/microsoft-365/admin/security-and-compliance/set-up-multi-factor-authentication?view=o365-worldwide#use-conditional-access-policies:https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-userstates#convert-per-user-mfa-enabled-and-enforced-users-to-disabled",
+ "DefaultValue": "Disabled"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.2.2",
+ "Description": "App registration allows users to register custom-developed applications for use within the directory.",
+ "Checks": [
+ "entra_thirdparty_integrated_apps_not_allowed"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "App registration allows users to register custom-developed applications for use within the directory.",
+ "RationaleStatement": "Third-party integrated applications connection to services should be disabled unless there is a very clear value and robust security controls are in place. While there are legitimate uses, attackers can grant access from breached accounts to third party applications to exfiltrate data from your tenancy without having to maintain the breached account.",
+ "ImpactStatement": "Implementation of this change will impact both end users and administrators. End users will not be able to integrate third-party applications that they may wish to use. Administrators are likely to receive requests from end users to grant them permission to necessary third-party applications.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Users` select `Users settings`.3. Set `Users can register applications` to `No`.4. Click Save.**To remediate using PowerShell:** 1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.ReadWrite.Authorization\"`2. Run the following commands:```$param = @{ AllowedToCreateApps = \"$false\" }Update-MgPolicyAuthorizationPolicy -DefaultUserRolePermissions $param```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Users` select `Users settings`.3. Verify `Users can register applications` is set to `No`.**To audit using PowerShell:** 1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.Read.All\"`2. Run the following command:```(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | fl AllowedToCreateApps```3. Ensure the returned value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity-platform/how-applications-are-added",
+ "DefaultValue": "Yes (Users can register applications.)"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.2.3",
+ "Description": "Non-privileged users can create tenants in the Entra administration portal under Manage tenant. The creation of a tenant is recorded in the Audit log as category \"DirectoryManagement\" and activity \"Create Company\". Anyone who creates a tenant becomes the Global Administrator of that tenant. The newly created tenant doesn't inherit any settings or configurations.",
+ "Checks": [
+ "entra_policy_ensure_default_user_cannot_create_tenants"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Non-privileged users can create tenants in the Entra administration portal under Manage tenant. The creation of a tenant is recorded in the Audit log as category \"DirectoryManagement\" and activity \"Create Company\". Anyone who creates a tenant becomes the Global Administrator of that tenant. The newly created tenant doesn't inherit any settings or configurations.",
+ "RationaleStatement": "Restricting tenant creation prevents unauthorized or uncontrolled deployment of resources and ensures that the organization retains control over its infrastructure. User generation of shadow IT could lead to multiple, disjointed environments that can make it difficult for IT to manage and secure the organization's data, especially if other users in the organization began using these tenants for business purposes under the misunderstanding that they were secured by the organization's security team.",
+ "ImpactStatement": "Non-admin users will need to contact I.T. if they have a valid reason to create a tenant.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Identity`> `Users` > `User settings`.3. Set `Restrict non-admin users from creating tenants` to `Yes` then `Save`.**To remediate using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.ReadWrite.Authorization\"`2. Run the following commands:```# Create hashtable and update the auth policy$params = @{ AllowedToCreateTenants = $false }Update-MgPolicyAuthorizationPolicy -DefaultUserRolePermissions $params```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Identity`> `Users` > `User settings`.3. Ensure `Restrict non-admin users from creating tenants` is set to `Yes`**To audit using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.Read.All\"`2. Run the following commands:```(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Select-Object AllowedToCreateTenants```3. Ensure the returned value is `False`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/fundamentals/users-default-permissions#restrict-member-users-default-permissions",
+ "DefaultValue": "No - Non-administrators can create tenants.`AllowedToCreateTenants` is `True`"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.2.4",
+ "Description": "Restrict non-privileged users from signing into the Microsoft Entra admin center.**Note:** This recommendation only affects access to the web portal. It does not prevent privileged users from using other methods such as Rest API or PowerShell to obtain information. Those channels are addressed elsewhere in this document.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.1.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Restrict non-privileged users from signing into the Microsoft Entra admin center.**Note:** This recommendation only affects access to the web portal. It does not prevent privileged users from using other methods such as Rest API or PowerShell to obtain information. Those channels are addressed elsewhere in this document.",
+ "RationaleStatement": "The Microsoft Entra admin center contains sensitive data and permission settings, which are still enforced based on the user's role. However, an end user may inadvertently change properties or account settings that could result in increased administrative overhead. Additionally, a compromised end user account could be used by a malicious attacker as a means to gather additional information and escalate an attack.**Note:** Users will still be able to sign into Microsoft Entra admin center but will be unable to see directory information.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Identity`> `Users` > `User settings`.3. Set `Restrict access to Microsoft Entra admin center` to `Yes` then `Save`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Identity`> `Users` > `User settings`.3. Verify under the **Administration center** section that `Restrict access to Microsoft Entra admin center` is set to `Yes`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/fundamentals/users-default-permissions#restrict-member-users-default-permissions",
+ "DefaultValue": "No - Non-administrators can access the Microsoft Entra admin center."
+ }
+ ]
+ },
+ {
+ "Id": "5.1.2.5",
+ "Description": "The option for the user to `Stay signed in`, or the `Keep me signed in` option, will prompt a user after a successful login. When the user selects this option, a persistent refresh token is created. The refresh token lasts for 90 days by default and does not prompt for sign-in or multifactor.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.1.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "The option for the user to `Stay signed in`, or the `Keep me signed in` option, will prompt a user after a successful login. When the user selects this option, a persistent refresh token is created. The refresh token lasts for 90 days by default and does not prompt for sign-in or multifactor.",
+ "RationaleStatement": "Allowing users to select this option presents risk, especially if the user signs into their account on a publicly accessible computer/web browser. In this case it would be trivial for an unauthorized person to gain access to any associated cloud data from that account.",
+ "ImpactStatement": "Once this setting is hidden users will no longer be prompted upon sign-in with the message `Stay signed in?`. This may mean users will be forced to sign in more frequently. Important: some features of SharePoint Online and Office 2010 have a dependency on users remaining signed in. If you hide this option, users may get additional and unexpected sign in prompts.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity`> `Users` > `User settings`.3. Set `Show keep user signed in` to `No`.4. Click `Save`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity`> `Users` > `User settings`.3. Ensure `Show keep user signed in` is highlighted `No`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/authentication/concepts-azure-multi-factor-authentication-prompts-session-lifetime:https://learn.microsoft.com/en-us/entra/fundamentals/how-to-manage-stay-signed-in-prompt",
+ "DefaultValue": "Users may select `stay signed in`"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.2.6",
+ "Description": "LinkedIn account connections allow users to connect their Microsoft work or school account with LinkedIn. After a user connects their accounts, information and highlights from LinkedIn are available in some Microsoft apps and services.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.1.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "LinkedIn account connections allow users to connect their Microsoft work or school account with LinkedIn. After a user connects their accounts, information and highlights from LinkedIn are available in some Microsoft apps and services.",
+ "RationaleStatement": "Disabling LinkedIn integration prevents potential phishing attacks and risk scenarios where an external party could accidentally disclose sensitive information.",
+ "ImpactStatement": "Users will not be able to sync contacts or use LinkedIn integration.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Users` select `User settings`.3. Under `LinkedIn account connections` select `No`.4. Click `Save`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Users` select `User settings`.3. Under `LinkedIn account connections` ensure `No` is highlighted.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/users/linkedin-integration:https://learn.microsoft.com/en-us/entra/identity/users/linkedin-user-consent",
+ "DefaultValue": "LinkedIn integration is enabled by default."
+ }
+ ]
+ },
+ {
+ "Id": "5.1.3.1",
+ "Description": "A dynamic group is a dynamic configuration of security group membership for Microsoft Entra ID. Administrators can set rules to populate groups that are created in Entra ID based on user attributes (such as userType, department, or country/region). Members can be automatically added to or removed from a security group based on their attributes.The recommended state is to create a dynamic group that includes guest accounts.",
+ "Checks": [
+ "entra_dynamic_group_for_guests_created"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "A dynamic group is a dynamic configuration of security group membership for Microsoft Entra ID. Administrators can set rules to populate groups that are created in Entra ID based on user attributes (such as userType, department, or country/region). Members can be automatically added to or removed from a security group based on their attributes.The recommended state is to create a dynamic group that includes guest accounts.",
+ "RationaleStatement": "Dynamic groups allow for an automated method to assign group membership.Guest user accounts will be automatically added to this group and through this existing conditional access rules, access controls and other security measures will ensure that new guest accounts are restricted in the same manner as existing guest accounts.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Groups` select `All groups`.3. Select `New group` and assign the following values: - Group type: `Security` - Microsoft Entra roles can be assigned to the group: `No` - Membership type: `Dynamic User`4. Select `Add dynamic query`.5. Above the `Rule syntax` text box, select `Edit`. 6. Place the following expression in the box:```(user.userType -eq \"Guest\")```7. Select `OK` and `Save`**To remediate using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Group.ReadWrite.All\"`2. In the script below edit `DisplayName` and `MailNickname` as needed and run:```$params = @{ DisplayName = \"Dynamic Test Group\" MailNickname = \"DynGuestUsers\" MailEnabled = $false SecurityEnabled = $true GroupTypes = \"DynamicMembership\" MembershipRule = '(user.userType -eq \"Guest\")' MembershipRuleProcessingState = \"On\"}New-MgGroup @params```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Groups` select `All groups`.3. On the right of the search field click `Add filter`.4. Set `Filter` to `Membership type` and `Value` to `Dynamic` then apply.5. Identify a dynamic group and select it.6. Under manage, select `Dynamic membership rules` and ensure the rule syntax contains `(user.userType -eq \"Guest\")`7. If necessary, inspect other dynamic groups for the value above.**To audit using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Group.Read.All\"`2. Run the following commands:```$groups = Get-MgGroup | Where-Object { $_.GroupTypes -contains \"DynamicMembership\" }$groups | ft DisplayName,GroupTypes,MembershipRule```3. Look for a dynamic group containing the rule `(user.userType -eq \"Guest\")`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/users/groups-create-rule:https://learn.microsoft.com/en-us/entra/identity/users/groups-dynamic-membership:https://learn.microsoft.com/en-us/entra/external-id/use-dynamic-groups",
+ "DefaultValue": "Undefined"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.5.1",
+ "Description": "Control when end users and group owners are allowed to grant consent to applications, and when they will be required to request administrator review and approval. Allowing users to grant apps access to data helps them acquire useful applications and be productive but can represent a risk in some situations if it's not monitored and controlled carefully.",
+ "Checks": [
+ "entra_policy_restricts_user_consent_for_apps"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1.5",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Control when end users and group owners are allowed to grant consent to applications, and when they will be required to request administrator review and approval. Allowing users to grant apps access to data helps them acquire useful applications and be productive but can represent a risk in some situations if it's not monitored and controlled carefully.",
+ "RationaleStatement": "Attackers commonly use custom applications to trick users into granting them access to company data. Disabling future user consent operations setting mitigates this risk and helps to reduce the threat-surface. If user consent is disabled previous consent grants will still be honored but all future consent operations must be performed by an administrator.",
+ "ImpactStatement": "If user consent is disabled, previous consent grants will still be honored but all future consent operations must be performed by an administrator. Tenant-wide admin consent can be requested by users through an integrated administrator consent request workflow or through organizational support processes.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Applications` select `Enterprise applications`.3. Under `Security` select `Consent and permissions` > `User consent settings`.4. Under `User consent for applications` select `Do not allow user consent`.5. Click the `Save` option at the top of the window.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Applications` select `Enterprise applications`.3. Under `Security` select `Consent and permissions` > `User consent settings`.4. Verify `User consent for applications` is set to `Do not allow user consent`.**To audit using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.Read.All\"`2. Run the following command:```(Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Select-Object -ExpandProperty PermissionGrantPoliciesAssigned```3. Ensure `ManagePermissionGrantsForSelf.microsoft-user-default-low` is not present OR that nothing is returned.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-user-consent?pivots=portal",
+ "DefaultValue": "UI - `Allow user consent for apps`"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.5.2",
+ "Description": "The admin consent workflow gives admins a secure way to grant access to applications that require admin approval. When a user tries to access an application but is unable to provide consent, they can send a request for admin approval. The request is sent via email to admins who have been designated as reviewers. A reviewer takes action on the request, and the user is notified of the action.",
+ "Checks": [
+ "entra_admin_consent_workflow_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1.5",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "The admin consent workflow gives admins a secure way to grant access to applications that require admin approval. When a user tries to access an application but is unable to provide consent, they can send a request for admin approval. The request is sent via email to admins who have been designated as reviewers. A reviewer takes action on the request, and the user is notified of the action.",
+ "RationaleStatement": "The admin consent workflow (Preview) gives admins a secure way to grant access to applications that require admin approval. When a user tries to access an application but is unable to provide consent, they can send a request for admin approval. The request is sent via email to admins who have been designated as reviewers. A reviewer acts on the request, and the user is notified of the action.",
+ "ImpactStatement": "To approve requests, a reviewer must be a global administrator, cloud application administrator, or application administrator. The reviewer must already have one of these admin roles assigned; simply designating them as a reviewer doesn't elevate their privileges.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Applications` select `Enterprise applications`.3. Under Security select `Consent and permissions`.4. Under Manage select `Admin consent settings`.5. Set `Users can request admin consent to apps they are unable to consent to",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Applications` select `Enterprise applications`.3. Under Security select `Consent and permissions`.4. Under Manage select `Admin consent settings`.5. Verify that `Users can request admin consent to apps they are unable to consent to",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-admin-consent-workflow",
+ "DefaultValue": "'- `Users can request admin consent to apps they are unable to consent to`: `No`- `Selected users to review admin consent requests`: `None`- `Selected users will receive email notifications for requests`: `Yes`- `Selected users will receive request expiration reminders`: `Yes`- `Consent request expires after (days)`: `30`"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.6.1",
+ "Description": "B2B collaboration is a feature within Microsoft Entra External ID that allows for guest invitations to an organization.Ensure users can only send invitations to `specified domains`.**Note:** This list works independently from OneDrive for Business and SharePoint Online allow/block lists. To restrict individual file sharing in SharePoint Online, set up an allow or blocklist for OneDrive for Business and SharePoint Online. For instance, in SharePoint or OneDrive users can still share with external users from prohibited domains by using Anyone links if they haven't been disabled.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.1.6",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "B2B collaboration is a feature within Microsoft Entra External ID that allows for guest invitations to an organization.Ensure users can only send invitations to `specified domains`.**Note:** This list works independently from OneDrive for Business and SharePoint Online allow/block lists. To restrict individual file sharing in SharePoint Online, set up an allow or blocklist for OneDrive for Business and SharePoint Online. For instance, in SharePoint or OneDrive users can still share with external users from prohibited domains by using Anyone links if they haven't been disabled.",
+ "RationaleStatement": "By specifying allowed domains for collaborations, external user's companies are explicitly identified. Also, this prevents internal users from inviting unknown external users such as personal accounts and granting them access to resources.",
+ "ImpactStatement": "This could make harder collaboration if the setting is not quickly updated when a new domain is identified as \"allowed\".",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `External Identities` select `External collaboration settings`.3. Under **Collaboration restrictions**, select `Allow invitations only to the specified domains (most restrictive)` is selected. Then specify the allowed domains under `Target domains`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `External Identities` select `External collaboration settings`.3. Under **Collaboration restrictions**, verify that `Allow invitations only to the specified domains (most restrictive)` is selected. Then verify allowed domains are specified under `Target domains`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/external-id/allow-deny-list:https://learn.microsoft.com/en-us/entra/external-id/what-is-b2b",
+ "DefaultValue": "Allow invitations to be sent to any domain (most inclusive)"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.6.2",
+ "Description": "Microsoft Entra ID, part of Microsoft Entra, allows you to restrict what external guest users can see in their organization in Microsoft Entra ID. Guest users are set to a limited permission level by default in Microsoft Entra ID, while the default for member users is the full set of user permissions. These directory level permissions are enforced across Microsoft Entra services including Microsoft Graph, PowerShell v2, the Azure portal, and My Apps portal. Microsoft 365 services leveraging Microsoft 365 groups for collaboration scenarios are also affected, specifically Outlook, Microsoft Teams, and SharePoint. They do not override the SharePoint or Microsoft Teams guest settings.The recommended state is at least `Guest users have limited access to properties and memberships of directory objects` or more restrictive.",
+ "Checks": [
+ "entra_policy_guest_users_access_restrictions"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1.6",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Microsoft Entra ID, part of Microsoft Entra, allows you to restrict what external guest users can see in their organization in Microsoft Entra ID. Guest users are set to a limited permission level by default in Microsoft Entra ID, while the default for member users is the full set of user permissions. These directory level permissions are enforced across Microsoft Entra services including Microsoft Graph, PowerShell v2, the Azure portal, and My Apps portal. Microsoft 365 services leveraging Microsoft 365 groups for collaboration scenarios are also affected, specifically Outlook, Microsoft Teams, and SharePoint. They do not override the SharePoint or Microsoft Teams guest settings.The recommended state is at least `Guest users have limited access to properties and memberships of directory objects` or more restrictive.",
+ "RationaleStatement": "By limiting guest access to the _most restrictive_ state this helps prevent malicious group and user object enumeration in the Microsoft 365 environment. This first step, known as _reconnaissance_ in The Cyber Kill Chain, is often conducted by attackers prior to more advanced targeted attacks.",
+ "ImpactStatement": "The default is `Guest users have limited access to properties and memberships of directory objects`. When using the 'most restrictive' setting, guests will only be able to access their own profiles and will not be allowed to see other users' profiles, groups, or group memberships.There are some known issues with Yammer that will prevent guests that are signed in from leaving the group.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `External Identities` select `External collaboration settings`.3. Under **Guest user access** set `Guest user access restrictions` to one of the following: - State: `Guest users have limited access to properties and memberships of directory objects` - State: `Guest user access is restricted to properties and memberships of their own directory objects (most restrictive)`**To remediate using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.ReadWrite.Authorization\"`2. Run the following command to set the guest user access restrictions to default:```# Guest users have limited access to properties and memberships of directory objectsUpdate-MgPolicyAuthorizationPolicy -GuestUserRoleId '10dae51f-b6af-4016-8d66-8c2a99b929b3'```3. Or, run the following command to set it to the \"most restrictive\":```# Guest user access is restricted to properties and memberships of their own directory objects (most restrictive)Update-MgPolicyAuthorizationPolicy -GuestUserRoleId '2af84b1e-32c8-42b7-82bc-daa82404023b'```**Note:** Either setting allows for a passing state.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `External Identities` select `External collaboration settings`.3. Under **Guest user access** verify that `Guest user access restrictions` is set to one of the following: - State: `Guest users have limited access to properties and memberships of directory objects` - State: `Guest user access is restricted to properties and memberships of their own directory objects (most restrictive)`**To audit using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.Read.All\"`2. Run the following command:```Get-MgPolicyAuthorizationPolicy | fl GuestUserRoleId```3. Ensure the value returned is `10dae51f-b6af-4016-8d66-8c2a99b929b3` or `2af84b1e-32c8-42b7-82bc-daa82404023b` (most restrictive)**Note:** Either setting allows for a passing state.**Note 2:** The value of `a0b1b346-4d3e-4e8b-98f8-753987be4970` is equal to `Guest users have the same access as members (most inclusive)` and should not be used.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/users/users-restrict-guest-permissions:https://www.lockheedmartin.com/en-us/capabilities/cyber/cyber-kill-chain.html",
+ "DefaultValue": "'- UI: `Guest users have limited access to properties and memberships of directory objects` - PowerShell: `10dae51f-b6af-4016-8d66-8c2a99b929b3`"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.6.3",
+ "Description": "By default, all users in the organization, including B2B collaboration guest users, can invite external users to B2B collaboration. The ability to send invitations can be limited by turning it on or off for everyone, or by restricting invitations to certain roles.The recommended state for guest invite restrictions is `Only users assigned to specific admin roles can invite guest users`.",
+ "Checks": [
+ "entra_policy_guest_invite_only_for_admin_roles"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1.6",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "By default, all users in the organization, including B2B collaboration guest users, can invite external users to B2B collaboration. The ability to send invitations can be limited by turning it on or off for everyone, or by restricting invitations to certain roles.The recommended state for guest invite restrictions is `Only users assigned to specific admin roles can invite guest users`.",
+ "RationaleStatement": "Restricting who can invite guests limits the exposure the organization might face from unauthorized accounts.",
+ "ImpactStatement": "This introduces an obstacle to collaboration by restricting who can invite guest users to the organization. Designated Guest Inviters must be assigned, and an approval process established and clearly communicated to all users.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `External Identities` select `External collaboration settings`.3. Under **Guest invite settings** set `Guest invite restrictions` to `Only users assigned to specific admin roles can invite guest users`.**To remediate using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.ReadWrite.Authorization\"`2. Run the following command:```Update-MgPolicyAuthorizationPolicy -AllowInvitesFrom 'adminsAndGuestInviters'```**Note:** The more restrictive position of the value will also pass audit, it is however not required.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `External Identities` select `External collaboration settings`.3. Under **Guest invite settings** verify that `Guest invite restrictions` is set to `Only users assigned to specific admin roles can invite guest users` or more restrictive.**To audit using PowerShell:**1. Connect to Microsoft Graph using `Connect-MgGraph -Scopes \"Policy.Read.All\"`2. Run the following command:```Get-MgPolicyAuthorizationPolicy | fl AllowInvitesFrom```3. Ensure the value returned is `adminsAndGuestInviters` or more restrictive.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/external-id/external-collaboration-settings-configure:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#guest-inviter",
+ "DefaultValue": "'- UI: `Anyone in the organization can invite guest users including guests and non-admins (most inclusive)` - PowerShell: `everyone`"
+ }
+ ]
+ },
+ {
+ "Id": "5.1.8.1",
+ "Description": "Password hash synchronization is one of the sign-in methods used to accomplish hybrid identity synchronization. Microsoft Entra Connect synchronizes a hash, of the hash, of a user's password from an on-premises Active Directory instance to a cloud-based Entra ID instance.**Note:** Audit and remediation procedures in this recommendation only apply to Microsoft 365 tenants operating in a hybrid configuration using Entra Connect sync, and does not apply to federated domains.",
+ "Checks": [
+ "entra_password_hash_sync_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.1.8",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Password hash synchronization is one of the sign-in methods used to accomplish hybrid identity synchronization. Microsoft Entra Connect synchronizes a hash, of the hash, of a user's password from an on-premises Active Directory instance to a cloud-based Entra ID instance.**Note:** Audit and remediation procedures in this recommendation only apply to Microsoft 365 tenants operating in a hybrid configuration using Entra Connect sync, and does not apply to federated domains.",
+ "RationaleStatement": "Password hash synchronization helps by reducing the number of passwords your users need to maintain to just one and enables leaked credential detection for your hybrid accounts. Leaked credential protection is leveraged through Entra ID Protection and is a subset of that feature which can help identify if an organization's user account passwords have appeared on the dark web or public spaces.Using other options for your directory synchronization may be less resilient as Microsoft can still process sign-ins to 365 with Hash Sync even if a network connection to your on-premises environment is not available.",
+ "ImpactStatement": "Compliance or regulatory restrictions may exist, depending on the organization's business sector, that preclude hashed versions of passwords from being securely transmitted to cloud data centers.",
+ "RemediationProcedure": "**To remediate using the on-prem Microsoft Entra Connect tool:**1. Log in to the on premises server that hosts the Microsoft Entra Connect tool2. Double-click the `Azure AD Connect` icon that was created on the desktop3. Click `Configure`.4. On the `Additional tasks` page, select `Customize synchronization options` and click `Next`.5. Enter the username and password for your global administrator. 6. On the `Connect your directories` screen, click `Next`.7. On the `Domain and OU filtering` screen, click `Next`.8. On the `Optional features` screen, check `Password hash synchronization` and click `Next`. 9. On the `Ready to configure` screen click `Configure`.10. Once the configuration completes, click `Exit`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity` > `Hybrid management` > `Microsoft Entra Connect`.3. Select `Connect Sync`4. Under **Microsoft Entra Connect sync**, verify Password Hash Sync is `Enabled`.**To audit for the on-prem tool:**1. Log in to the server that hosts the Microsoft Entra Connect tool.2. Run `Azure AD Connect`, and then click `Configure` and `View or export current configuration`.3. Determine whether `PASSWORD HASH SYNCHRONIZATION` is enabled on your tenant.**This information is also available via the Microsoft Graph Security API:** ```GET https://graph.microsoft.com/beta/security/secureScores```**To audit using PowerShell:**1. Connect to the Microsoft Graph service using `Connect-MgGraph -Scopes \"Organization.Read.All\"`.2. Run the following Microsoft Graph PowerShell command:```Get-MgOrganization | ft OnPremisesSyncEnabled```3. If nothing returns then password sync is not enabled for the on premises AD.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/whatis-phs:https://www.microsoft.com/en-us/download/details.aspx?id=47594",
+ "DefaultValue": "'- Microsoft Entra Connect sync `disabled` by default - Password Hash Sync is Microsoft's recommended setting for new deployments"
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.1",
+ "Description": "Multifactor authentication is a process that requires an additional form of identification during the sign-in process, such as a code from a mobile device or a fingerprint scan, to enhance security.Ensure users in administrator roles have MFA capabilities enabled.",
+ "Checks": [
+ "entra_admin_users_mfa_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Multifactor authentication is a process that requires an additional form of identification during the sign-in process, such as a code from a mobile device or a fingerprint scan, to enhance security.Ensure users in administrator roles have MFA capabilities enabled.",
+ "RationaleStatement": "Multifactor authentication requires an individual to present a minimum of two separate forms of authentication before access is granted. Multifactor authentication provides additional assurance that the individual attempting to gain access is who they claim to be. With multifactor authentication, an attacker would need to compromise at least two different authentication mechanisms, increasing the difficulty of compromise and thus reducing the risk.",
+ "ImpactStatement": "Implementation of multifactor authentication for all users in administrative roles will necessitate a change to user routine. All users in administrative roles will be required to enroll in multifactor authentication using phone, SMS, or an authentication application. After enrollment, use of multifactor authentication will be required for future access to the environment.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Click `New policy`. - Under `Users` include `Select users and groups` and check `Directory roles`. - At a minimum, include the directory roles listed below in this section of the document. - Under `Target resources` include `All cloud apps` and do not create any exclusions. - Under `Grant` select `Grant Access` and check `Require multifactor authentication`. - Click `Select` at the bottom of the pane.4. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.5. Click `Create`.**At minimum these directory roles should be included for MFA:**- Application administrator- Authentication administrator- Billing administrator- Cloud application administrator- Conditional Access administrator- Exchange administrator- Global administrator- Global reader- Helpdesk administrator- Password administrator- Privileged authentication administrator- Privileged role administrator- Security administrator- SharePoint administrator- User administrator**Note:** Report-only is an acceptable first stage when introducing any CA policy. The control, however, is not complete until the policy is on.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click to expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `Directory roles` specific to administrators are included. - Under `Target resources` verify `All cloud apps` is selected with no exclusions. - Under `Grant` verify `Grant Access` and `Require multifactor authentication` checked.4. Ensure `Enable policy` is set to `On`.**To audit using SecureScore:** 1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Select `Secure score`.3. Select `Recommended actions`.4. Click on `Ensure multifactor authentication is enabled for all users in administrative roles`. 5. Review the number of Admin users who do not have MFA configured. **This information is also available via the Microsoft Graph Security API:**```GET https://graph.microsoft.com/beta/security/secureScores```**Note:** A list of required `Directory roles` can be found in the Remediation section.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/howto-conditional-access-policy-admin-mfa",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.2",
+ "Description": "Enable multifactor authentication for all users in the Microsoft 365 tenant. Users will be prompted to authenticate with a second factor upon logging in to Microsoft 365 services. The second factor is most commonly a text message to a registered mobile phone number where they type in an authorization code, or with a mobile application like Microsoft Authenticator.",
+ "Checks": [
+ "entra_users_mfa_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Enable multifactor authentication for all users in the Microsoft 365 tenant. Users will be prompted to authenticate with a second factor upon logging in to Microsoft 365 services. The second factor is most commonly a text message to a registered mobile phone number where they type in an authorization code, or with a mobile application like Microsoft Authenticator.",
+ "RationaleStatement": "Multifactor authentication requires an individual to present a minimum of two separate forms of authentication before access is granted. Multifactor authentication provides additional assurance that the individual attempting to gain access is who they claim to be. With multifactor authentication, an attacker would need to compromise at least two different authentication mechanisms, increasing the difficulty of compromise and thus reducing the risk.",
+ "ImpactStatement": "Implementation of multifactor authentication for all users will necessitate a change to user routine. All users will be required to enroll in multifactor authentication using phone, SMS, or an authentication application. After enrollment, use of multifactor authentication will be required for future authentication to the environment.**Note:** Organizations that have difficulty enforcing MFA globally due lack of the budget to provide company owned mobile devices to every user, or equally are unable to force end users to use their personal devices due to regulations, unions, or policy have another option. FIDO2 Security keys may be used as a stand in for this recommendation. They are more secure, phishing resistant, and are affordable for an organization to issue to every end user.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Click `New policy`. - Under `Users` include `All users` (and do not exclude any user). - Under `Target resources` include `All cloud apps` and do not create any exclusions. - Under `Grant` select `Grant Access` and check `Require multifactor authentication`. - Click `Select` at the bottom of the pane.4. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.5. Click `Create`.**Note:** Report-only is an acceptable first stage when introducing any CA policy. The control, however, is not complete until the policy is on.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `All users` is included. - Under `Target resources` verify `All cloud apps` is selected with no exclusions. - Under `Grant` verify `Grant Access` and `Require multifactor authentication` checked.4. Ensure `Enable policy` is set to `On`.**To audit using SecureScore:** 1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com.2. Select `Secure score`.3. Select `Recommended actions`.4. Click on `Ensure multifactor authentication is enabled for all users`. 5. Review the list of users who do not have MFA configured.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/howto-conditional-access-policy-all-users-mfa",
+ "DefaultValue": "Disabled"
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.3",
+ "Description": "Entra ID supports the most widely used authentication and authorization protocols including legacy authentication. This authentication pattern includes basic authentication, a widely used industry-standard method for collecting username and password information.The following messaging protocols support legacy authentication:- Authenticated SMTP - Used to send authenticated email messages.- Autodiscover - Used by Outlook and EAS clients to find and connect to mailboxes in Exchange Online.- Exchange ActiveSync (EAS) - Used to connect to mailboxes in Exchange Online.- Exchange Online PowerShell - Used to connect to Exchange Online with remote PowerShell. If you block Basic authentication for Exchange Online PowerShell, you need to use the Exchange Online PowerShell Module to connect. For instructions, see Connect to Exchange Online PowerShell using multifactor authentication.- Exchange Web Services (EWS) - A programming interface that's used by Outlook, Outlook for Mac, and third-party apps.- IMAP4 - Used by IMAP email clients.- MAPI over HTTP (MAPI/HTTP) - Primary mailbox access protocol used by Outlook 2010 SP2 and later.- Offline Address Book (OAB) - A copy of address list collections that are downloaded and used by Outlook.- Outlook Anywhere (RPC over HTTP) - Legacy mailbox access protocol supported by all current Outlook versions.- POP3 - Used by POP email clients.- Reporting Web Services - Used to retrieve report data in Exchange Online.- Universal Outlook - Used by the Mail and Calendar app for Windows 10.- Other clients - Other protocols identified as utilizing legacy authentication.",
+ "Checks": [
+ "entra_legacy_authentication_blocked"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Entra ID supports the most widely used authentication and authorization protocols including legacy authentication. This authentication pattern includes basic authentication, a widely used industry-standard method for collecting username and password information.The following messaging protocols support legacy authentication:- Authenticated SMTP - Used to send authenticated email messages.- Autodiscover - Used by Outlook and EAS clients to find and connect to mailboxes in Exchange Online.- Exchange ActiveSync (EAS) - Used to connect to mailboxes in Exchange Online.- Exchange Online PowerShell - Used to connect to Exchange Online with remote PowerShell. If you block Basic authentication for Exchange Online PowerShell, you need to use the Exchange Online PowerShell Module to connect. For instructions, see Connect to Exchange Online PowerShell using multifactor authentication.- Exchange Web Services (EWS) - A programming interface that's used by Outlook, Outlook for Mac, and third-party apps.- IMAP4 - Used by IMAP email clients.- MAPI over HTTP (MAPI/HTTP) - Primary mailbox access protocol used by Outlook 2010 SP2 and later.- Offline Address Book (OAB) - A copy of address list collections that are downloaded and used by Outlook.- Outlook Anywhere (RPC over HTTP) - Legacy mailbox access protocol supported by all current Outlook versions.- POP3 - Used by POP email clients.- Reporting Web Services - Used to retrieve report data in Exchange Online.- Universal Outlook - Used by the Mail and Calendar app for Windows 10.- Other clients - Other protocols identified as utilizing legacy authentication.",
+ "RationaleStatement": "Legacy authentication protocols do not support multi-factor authentication. These protocols are often used by attackers because of this deficiency. Blocking legacy authentication makes it harder for attackers to gain access.**Note:** Basic authentication is now disabled in all tenants. Before December 31 2022, you could re-enable the affected protocols if users and apps in your tenant couldn't connect. Now no one (you or Microsoft support) can re-enable Basic authentication in your tenant.",
+ "ImpactStatement": "Enabling this setting will prevent users from connecting with older versions of Office, ActiveSync or using protocols like IMAP, POP or SMTP and may require upgrades to older versions of Office, and use of mobile mail clients that support modern authentication.This will also cause multifunction devices such as printers from using scan to e-mail function if they are using a legacy authentication method. Microsoft has mail flow best practices in the link below which can be used to configure a MFP to work with modern authentication:https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Create a new policy by selecting `New policy`. - Under `Users` include `All users`. - Under `Target resources` include `All cloud apps` and do not create any exclusions. - Under `Conditions` select `Client apps` and check the boxes for `Exchange ActiveSync clients` and `Other clients`. - Under `Grant` select `Block Access`. - Click `Select`.4. Set the policy `On` and click `Create`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `All users` is included and that there are only valid exclusions. - Under `Target resources` verify `All cloud apps` is selected with no exclusions. - Under `Conditions` select `Client apps` then verify `Exchange ActiveSync clients` and `Other clients` is checked. - Under `Grant` verify `Block access` is selected.4. Ensure `Enable policy` is set to `On`.This information is also available via the Microsoft Graph Security API: ```GET https://graph.microsoft.com/beta/security/secureScores```",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/disable-basic-authentication-in-exchange-online:https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365:https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online",
+ "DefaultValue": "Basic authentication is disabled by default as of January 2023."
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.4",
+ "Description": "In complex deployments, organizations might have a need to restrict authentication sessions. Conditional Access policies allow for the targeting of specific user accounts. Some scenarios might include:- Resource access from an unmanaged or shared device- Access to sensitive information from an external network- High-privileged users- Business-critical applicationsEnsure Sign-in frequency periodic reauthentication does not exceed `4 hours` for E3 tenants, or `24 hours` for E5 tenants using Privileged Identity Management.Ensure `Persistent browser session` is set to `Never persistent`**Note:** This CA policy can be added to the previous CA policy in this benchmark \"Ensure multifactor authentication is enabled for all users in administrative roles\"",
+ "Checks": [
+ "entra_admin_users_sign_in_frequency_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "In complex deployments, organizations might have a need to restrict authentication sessions. Conditional Access policies allow for the targeting of specific user accounts. Some scenarios might include:- Resource access from an unmanaged or shared device- Access to sensitive information from an external network- High-privileged users- Business-critical applicationsEnsure Sign-in frequency periodic reauthentication does not exceed `4 hours` for E3 tenants, or `24 hours` for E5 tenants using Privileged Identity Management.Ensure `Persistent browser session` is set to `Never persistent`**Note:** This CA policy can be added to the previous CA policy in this benchmark \"Ensure multifactor authentication is enabled for all users in administrative roles\"",
+ "RationaleStatement": "Forcing a time out for MFA will help ensure that sessions are not kept alive for an indefinite period of time, ensuring that browser sessions are not persistent will help in prevention of drive-by attacks in web browsers, this also prevents creation and saving of session cookies leaving nothing for an attacker to take.",
+ "ImpactStatement": "Users with Administrative roles will be prompted at the frequency set for MFA.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` > `Conditional Access` Select `Policies`.3. Click `New policy`. - Under `Users` include `Select users and groups` and check `Directory roles`. - At a minimum, include the directory roles listed below in this section of the document. - Under `Target resources` include `All cloud apps` and do not create any exclusions. - Under `Grant` select `Grant Access` and check `Require multifactor authentication`. - Under `Session` select `Sign-in frequency` select `Periodic reauthentication` and set it to `4` `hours` for E3 tenants. E5 tenants with PIM can be set to a maximum value of `24` `hours`. - Check `Persistent browser session` then select `Never persistent` in the drop-down menu.4. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.**At minimum these directory roles should be included in the policy:**- Application administrator- Authentication administrator- Billing administrator- Cloud application administrator- Conditional Access administrator- Exchange administrator- Global administrator- Global reader- Helpdesk administrator- Password administrator- Privileged authentication administrator- Privileged role administrator- Security administrator- SharePoint administrator- User administrator",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` > `Conditional Access` Select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `Directory roles` specific to administrators are included. - Under `Session` verify `Sign-in frequency` is checked and set to `Periodic reauthentication`. - Verify the timeframe is set to the time determined by the organization. - Ensure `Periodic reauthentication` does not exceed `4` `hours` for E3 tenants. E5 tenants using PIM may be set to a maximum of `24` `hours`. - Verify `Persistent browser session` is set to `Never persistent`.4. Ensure `Enable policy` is set to `On`**Note:** A list of directory roles applying to Administrators can be found in the remediation section.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/howto-conditional-access-session-lifetime",
+ "DefaultValue": "The default configuration for user sign-in frequency is a rolling window of 90 days."
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.5",
+ "Description": "Authentication strength is a Conditional Access control that allows administrators to specify which combination of authentication methods can be used to access a resource. For example, they can make only phishing-resistant authentication methods available to access a sensitive resource. But to access a non-sensitive resource, they can allow less secure multifactor authentication (MFA) combinations, such as password + SMS.Microsoft has 3 built-in authentication strengths. MFA strength, Passwordless MFA strength, and Phishing-resistant MFA strength. Ensure administrator roles are using a CA policy with `Phishing-resistant MFA strength`.Administrators can then enroll using one of 3 methods:- FIDO2 Security Key- Windows Hello for Business- Certificate-based authentication (Multi-Factor)**Note:** Additional steps to configure methods such as FIDO2 keys are not covered here but can be found in related MS articles in the references section. The Conditional Access policy only ensures 1 of the 3 methods is used.**Warning:** Administrators should be pre-registered for a strong authentication mechanism before this Conditional Access Policy is enforced. Additionally, as stated elsewhere in the CIS Benchmark a break-glass administrator account should be excluded from this policy to ensure unfettered access in the case of an emergency.",
+ "Checks": [
+ "entra_admin_users_phishing_resistant_mfa_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Authentication strength is a Conditional Access control that allows administrators to specify which combination of authentication methods can be used to access a resource. For example, they can make only phishing-resistant authentication methods available to access a sensitive resource. But to access a non-sensitive resource, they can allow less secure multifactor authentication (MFA) combinations, such as password + SMS.Microsoft has 3 built-in authentication strengths. MFA strength, Passwordless MFA strength, and Phishing-resistant MFA strength. Ensure administrator roles are using a CA policy with `Phishing-resistant MFA strength`.Administrators can then enroll using one of 3 methods:- FIDO2 Security Key- Windows Hello for Business- Certificate-based authentication (Multi-Factor)**Note:** Additional steps to configure methods such as FIDO2 keys are not covered here but can be found in related MS articles in the references section. The Conditional Access policy only ensures 1 of the 3 methods is used.**Warning:** Administrators should be pre-registered for a strong authentication mechanism before this Conditional Access Policy is enforced. Additionally, as stated elsewhere in the CIS Benchmark a break-glass administrator account should be excluded from this policy to ensure unfettered access in the case of an emergency.",
+ "RationaleStatement": "Sophisticated attacks targeting MFA are more prevalent as the use of it becomes more widespread. These 3 methods are considered phishing-resistant as they remove passwords from the login workflow. It also ensures that public/private key exchange can only happen between the devices and a registered provider which prevents login to fake or phishing websites.",
+ "ImpactStatement": "If administrators aren't pre-registered for a strong authentication method prior to a conditional access policy being created, then a condition could occur where a user can't register for strong authentication because they don't meet the conditional access policy requirements and therefore are prevented from signing in.Additionally, Internet Explorer based credential prompts in PowerShell do not support prompting for a security key. Implementing phishing-resistant MFA with a security key may prevent admins from running their existing sets of PowerShell scripts. Device Authorization Grant Flow can be used as a workaround in some instances.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Click `New policy`. - Under `Users` include `Select users and groups` and check `Directory roles`. - At a minimum, include the directory roles listed below in this section of the document. - Under `Target resources` include `All cloud apps` and do not create any exclusions. - Under `Grant` select `Grant Access` and check `Require authentication strength` and set `Phishing-resistant MFA` in the dropdown box. - Click `Select`.4. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.5. Click `Create`.**At minimum these directory roles should be included for the policy:**- Application administrator- Authentication administrator- Billing administrator- Cloud application administrator- Conditional Access administrator- Exchange administrator- Global administrator- Global reader- Helpdesk administrator- Password administrator- Privileged authentication administrator- Privileged role administrator- Security administrator- SharePoint administrator- User administrator**Warning:** Ensure administrators are pre-registered with strong authentication before enforcing the policy. After which the policy must be set to `On`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `Directory roles` specific to administrators are included. - Directory Roles should include at minimum the roles listed in the remediation section. - Under `Target resources` verify `All cloud apps` is selected with no exclusions. - Under `Grant` verify `Grant Access` is selected and `Require authentication strength` is checked with `Phishing-resistant MFA` set as the value.4. Ensure `Enable policy` is set to `On`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-passwordless#fido2-security-keys:https://learn.microsoft.com/en-us/entra/identity/authentication/how-to-enable-passkey-fido2:https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-strengths:https://learn.microsoft.com/en-us/entra/id-protection/howto-identity-protection-configure-mfa-policy",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.6",
+ "Description": "Microsoft Entra ID Protection user risk policies detect the probability that a user account has been compromised. **Note:** While Identity Protection also provides two risk policies with limited conditions, Microsoft highly recommends setting up risk-based policies in Conditional Access as opposed to the \"legacy method\" for the following benefits:- Enhanced diagnostic data- Report-only mode integration- Graph API support- Use more Conditional Access attributes like sign-in frequency in the policy",
+ "Checks": [
+ "entra_identity_protection_user_risk_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft Entra ID Protection user risk policies detect the probability that a user account has been compromised. **Note:** While Identity Protection also provides two risk policies with limited conditions, Microsoft highly recommends setting up risk-based policies in Conditional Access as opposed to the \"legacy method\" for the following benefits:- Enhanced diagnostic data- Report-only mode integration- Graph API support- Use more Conditional Access attributes like sign-in frequency in the policy",
+ "RationaleStatement": "With the user risk policy turned on, Entra ID protection detects the probability that a user account has been compromised. Administrators can configure a user risk conditional access policy to automatically respond to a specific user risk level.",
+ "ImpactStatement": "Upon policy activation, account access will be either blocked or the user will be required to use multi-factor authentication (MFA) and change their password. Users without registered MFA will be denied access, necessitating an admin to recover the account. To avoid inconvenience, it is advised to configure the MFA registration policy for all users under the User Risk policy. Additionally, users identified in the Risky Users section will be affected by this policy. To gain a better understanding of the impact on the organization's environment, the list of Risky Users should be reviewed before enforcing the policy.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Create a new policy by selecting `New policy`.4. Set the following conditions within the policy: - Under `Users or workload identities` choose `All users` - Under `Cloud apps or actions` choose `All cloud apps` - Under `Conditions` choose `User risk` then `Yes` and select the user risk level `High`. - Under `Access Controls` select `Grant` then in the right pane click `Grant access` then select `Require multifactor authentication` and `Require password change`. - Under `Session` ensure `Sign-in frequency` is set to `Every time`. - Click `Select`.6. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.7. Click `Create`.**Note:** for more information regarding risk levels refer to [Microsoft's Identity Protection & Risk Doc](https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks)",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users or workload identities` choose `All users` - Under `Cloud apps or actions` choose `All cloud apps` - Under `Conditions` choose `User risk` then `Yes` is set to `High`. - Under `Access Controls` select `Grant` then in the right pane click `Grant access`, then select `Require multifactor authentication` and `Require password change`. - Under `Session` ensure `Sign-in frequency` is set to `Every time`.4. Ensure `Enable policy` is set to `On`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/id-protection/howto-identity-protection-risk-feedback:https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.7",
+ "Description": "Microsoft Entra ID Protection sign-in risk detects risks in real-time and offline. A risky sign-in is an indicator for a sign-in attempt that might not have been performed by the legitimate owner of a user account.**Note:** While Identity Protection also provides two risk policies with limited conditions, Microsoft highly recommends setting up risk-based policies in Conditional Access as opposed to the \"legacy method\" for the following benefits:- Enhanced diagnostic data- Report-only mode integration- Graph API support- Use more Conditional Access attributes like sign-in frequency in the policy",
+ "Checks": [
+ "entra_identity_protection_sign_in_risk_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft Entra ID Protection sign-in risk detects risks in real-time and offline. A risky sign-in is an indicator for a sign-in attempt that might not have been performed by the legitimate owner of a user account.**Note:** While Identity Protection also provides two risk policies with limited conditions, Microsoft highly recommends setting up risk-based policies in Conditional Access as opposed to the \"legacy method\" for the following benefits:- Enhanced diagnostic data- Report-only mode integration- Graph API support- Use more Conditional Access attributes like sign-in frequency in the policy",
+ "RationaleStatement": "Turning on the sign-in risk policy ensures that suspicious sign-ins are challenged for multi-factor authentication.",
+ "ImpactStatement": "When the policy triggers, the user will need MFA to access the account. In the case of a user who hasn't registered MFA on their account, they would be blocked from accessing their account. It is therefore recommended that the MFA registration policy be configured for all users who are a part of the Sign-in Risk policy.",
+ "RemediationProcedure": "**To configure a Sign-In risk policy, use the following steps:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Create a new policy by selecting `New policy`.4. Set the following conditions within the policy. - Under `Users or workload identities` choose `All users`. - Under `Cloud apps or actions` choose `All cloud apps`. - Under `Conditions` choose `Sign-in risk` then `Yes` and check the risk level boxes `High` and `Medium`. - Under `Access Controls` select `Grant` then in the right pane click `Grant access` then select `Require multifactor authentication`. - Under `Session` select `Sign-in Frequency` and set to `Every time`. - Click `Select`.5. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.6. Click `Create`.**Note:** For more information regarding risk levels refer to [Microsoft's Identity Protection & Risk Doc](https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks)",
+ "AuditProcedure": "**To ensure Sign-In a risk policy is enabled:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users or workload identities` choose `All users` - Under `Cloud apps or actions` choose `All cloud apps` - Under `Conditions` choose `Sign-in risk` then `Yes` ensuring `High` and `Medium` are selected. - Under `Access Controls` select `Grant` then in the right pane click `Grant access` then select `Require multifactor authentication`. - Under `Session` select `Sign-in Frequency` is set to `Every time`.4. Ensure `Enable policy` is set to `On`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/id-protection/howto-identity-protection-risk-feedback:https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.8",
+ "Description": "When a Conditional Access policy targets the Microsoft Admin Portals cloud app, the policy is enforced for tokens issued to application IDs of the following Microsoft administrative portals:- Azure portal- Exchange admin center- Microsoft 365 admin center- Microsoft 365 Defender portal- Microsoft Entra admin center- Microsoft Intune admin center- Microsoft Purview compliance portal- Power Platform admin center- SharePoint admin center- Microsoft Teams admin center`Microsoft Admin Portals` should be restricted to specific pre-determined administrative roles.",
+ "Checks": [
+ "entra_admin_portals_role_limited_access"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "When a Conditional Access policy targets the Microsoft Admin Portals cloud app, the policy is enforced for tokens issued to application IDs of the following Microsoft administrative portals:- Azure portal- Exchange admin center- Microsoft 365 admin center- Microsoft 365 Defender portal- Microsoft Entra admin center- Microsoft Intune admin center- Microsoft Purview compliance portal- Power Platform admin center- SharePoint admin center- Microsoft Teams admin center`Microsoft Admin Portals` should be restricted to specific pre-determined administrative roles.",
+ "RationaleStatement": "Conditional Access (CA) policies are not enforced for other role types, including administrative unit-scoped or custom roles. By restricting access to built-in directory roles, users granted privileged permissions outside of these roles will be blocked from accessing admin centers. For example, the **Organization Management** admin role in Exchange Online has equivalent permissions to the built-in directory role **Exchange Administrator**. A user assigned only the Organization Management role would not be subject to CA policies targeting the Exchange Administrator role, or any and all Directory Roles. This could also allow a user with high privileges to be excluded from access reviews and other technical or management controls.Restricting access to `Microsoft Admin Portals` while impactful, covers a gap that is otherwise not bridged by Conditional Access.",
+ "ImpactStatement": "PIM functionality will be impacted unless non-privileged users are first assigned to a permanent group or role that is excluded from this policy. When attempting to checkout a role in the Entra ID PIM area they will receive the message \"You don't have access to this Your sign-in was successful but you don't have permission to access this resource.\"- Users included in the policy will be unable to manually installs applications when clicking on `Install Microsoft 365 apps`.- Users included in the policy will be unable to access the Quarantine in the Defender admin center at https://security.microsoft.com/quarantine",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Click `New Policy`. - Under `Users` include `All Users`. - Under `Users` select `Exclude` and check `Directory roles` and select only administrative roles and a group of PIM eligible users. - Under `Target resources` select `Cloud apps` and `Select apps` then select the `Microsoft Admin Portals` app. - Confirm by clicking `Select`. - Under `Grant` select `Block access` and click `Select`.4. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.5. Click `Create`.**Warning:** Exclude `Global Administrator` at a minimum to avoid being locked out. Report-only is a good option to use when testing any Conditional Access policy for the first time.**Note:** In order for PIM to function a group of users eligible for PIM roles must be excluded from the policy.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `All Users` is included. - Under `Users` > `Exclude` verify `Guest or external users` is checked and `Users and groups` contain only a group of PIM eligible users. - Under `Users` > `Exclude` verify `Directory Roles` contains only administrative roles. See below for details on roles. - Under `Target resources` verify `Cloud apps` is selected and includes `Microsoft Admin Portals`. - Under `Grant` verify `Block Access` is selected.4. Ensure `Enable policy` is set to `On`.**_Directory Roles and Exclusions_**In `Directory roles` > `Exclude` the role `Global Administrator` at a minimum should be selected to avoid I.T. being locked out. The organization should pre-determine roles in the exclusion list as there is not a one size fits all. Auditors and system administrators should exercise due diligence balancing operation while exercising least privilege. As the size of the organization increases so will the number of roles being utilized.A an example starting list of Administrator roles can be found under **Additional Information****Note:** In order for PIM to function a group of users eligible for PIM roles must be excluded from the policy.",
+ "AdditionalInformation": "**Below is an example list of Administrator roles that could be excluded**- Application administrator- Authentication administrator- Billing administrator- Cloud application administrator- Conditional Access administrator- Exchange administrator- Global administrator- Global reader- Helpdesk administrator- Password administrator- Privileged authentication administrator- Privileged role administrator- Security administrator- SharePoint administrator- User administrator",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-cloud-apps#microsoft-admin-portals",
+ "DefaultValue": "No - Non-administrators can access the Microsoft admin portals."
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.9",
+ "Description": "Microsoft Entra ID Protection sign-in risk detects risks in real-time and offline. A risky sign-in is an indicator for a sign-in attempt that might not have been performed by the legitimate owner of a user account.**Note:** While Identity Protection also provides two risk policies with limited conditions, Microsoft highly recommends setting up risk-based policies in Conditional Access as opposed to the \"legacy method\" for the following benefits:- Enhanced diagnostic data- Report-only mode integration- Graph API support- Use more Conditional Access attributes like sign-in frequency in the policy",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft Entra ID Protection sign-in risk detects risks in real-time and offline. A risky sign-in is an indicator for a sign-in attempt that might not have been performed by the legitimate owner of a user account.**Note:** While Identity Protection also provides two risk policies with limited conditions, Microsoft highly recommends setting up risk-based policies in Conditional Access as opposed to the \"legacy method\" for the following benefits:- Enhanced diagnostic data- Report-only mode integration- Graph API support- Use more Conditional Access attributes like sign-in frequency in the policy",
+ "RationaleStatement": "Sign-in risk is determined at the time of sign-in and includes criteria across both real-time and offline detections for risk. Blocking sign-in to accounts that have risk can prevent undesired access from potentially compromised devices or unauthorized users.",
+ "ImpactStatement": "Sign-in risk is heavily dependent on detecting risk based on atypical behaviors. Due to this it is important to run this policy in a report-only mode to better understand how the organization's environment and user activity may influence sign-in risk before turning the policy on. Once it's understood what actions may trigger a medium or high sign-in risk event I.T. can then work to create an environment to reduce false positives. For example, employees might be required to notify security personnel when they intend to travel with intent to access work resources.**Note:** Break-glass accounts should always be excluded from risk detection.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Create a new policy by selecting `New policy`.4. Set the following conditions within the policy. - Under `Users` include `All users` and only exclude valid users. - Under `Target resources` include `All cloud apps` and do not set any exclusions. - Under `Conditions` choose `Sign-in risk` values of `High` and `Medium` and click `Done`. - Under `Grant` choose `Block access` and click `Select`.5. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.6. Click `Create`.**Note:** Break-glass accounts should be excluded from sign-in risk policies.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `All users` are included and only valid users are excluded. - Under `Target resources` verify `All cloud apps` is selected with no exclusions. - Under `Conditions` verify `Sign-in risk` values of `High` and `Medium` are selected. - Under `Grant` verify `Block access` is selected.4. Ensure `Enable policy` is set to `On`.**Note:** Break-glass accounts should be excluded from sign-in risk policies",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks#risk-detections-mapped-to-riskeventtype",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.10",
+ "Description": "Conditional Access (CA) can be configured to enforce access based on the device's compliance status or whether it is Entra hybrid joined. Collectively this allows CA to classify devices as managed or unmanaged, providing more granular control over authentication policies.When using `Require device to be marked as compliant`, the device must pass checks configured in **Compliance** policies defined within Intune (Endpoint Manager). Before these checks can be applied, the device must first be enrolled in Intune MDM.By selecting `Require Microsoft Entra hybrid joined device` this means the device must first be synchronized from an on-premises Active Directory to qualify for authentication.When configured to the recommended state below only one condition needs to be met for the user to authenticate from the device. This functions as an \"OR\" operator.The recommended state is:- `Require device to be marked as compliant`- `Require Microsoft Entra hybrid joined device`- `Require one of the selected controls`",
+ "Checks": [
+ "entra_managed_device_required_for_authentication"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Conditional Access (CA) can be configured to enforce access based on the device's compliance status or whether it is Entra hybrid joined. Collectively this allows CA to classify devices as managed or unmanaged, providing more granular control over authentication policies.When using `Require device to be marked as compliant`, the device must pass checks configured in **Compliance** policies defined within Intune (Endpoint Manager). Before these checks can be applied, the device must first be enrolled in Intune MDM.By selecting `Require Microsoft Entra hybrid joined device` this means the device must first be synchronized from an on-premises Active Directory to qualify for authentication.When configured to the recommended state below only one condition needs to be met for the user to authenticate from the device. This functions as an \"OR\" operator.The recommended state is:- `Require device to be marked as compliant`- `Require Microsoft Entra hybrid joined device`- `Require one of the selected controls`",
+ "RationaleStatement": "\"Managed\" devices are considered more secure because they often have additional configuration hardening enforced through centralized management such as Intune or Group Policy. These devices are also typically equipped with MDR/EDR, managed patching and alerting systems. As a result, they provide a safer environment for users to authenticate and operate from.This policy also ensures that attackers must first gain access to a compliant or trusted device before authentication is permitted, reducing the risk posed by compromised account credentials. When combined with other distinct Conditional Access (CA) policies, such as requiring multi-factor authentication, this adds one additional factor before authentication is permitted. **Note:** Avoid combining these two settings with other `Grant` settings in the same policy. In a single policy you can only choose between `Require all the selected controls` or `Require one of the selected controls`, which limits the ability to integrate this recommendation with others in this benchmark. CA policies function as an \"AND\" operator across multiple policies. The goal here is to both (Require MFA for all users) **AND** (Require device to be marked as compliant **OR** Require Microsoft Entra hybrid joined device).",
+ "ImpactStatement": "Unmanaged devices will not be permitted as a valid authenticator. As a result this may require the organization to mature their device enrollment and management. The following devices can be considered managed:- Entra hybrid joined from Active Directory- Entra joined and enrolled in Intune, with compliance policies- Entra registered and enrolled in Intune, with compliances policies",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Create a new policy by selecting `New policy`. - Under `Users` include `All users`. - Under `Target resources` include `All cloud apps`. - Under `Grant` select `Grant access`. - Check `Require multifactor authentication` and `Require Microsoft Entra hybrid joined device`. - Choose `Require one of the selected controls` and click `Select` at the bottom.4. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.5. Click `Create`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `All users` is included. - Under `Target resources` verify `All cloud apps` is selected. - Under `Grant` verify `Require device to be marked as compliant` and `Require Microsoft Entra hybrid joined device` are checked. - Under `Grant` verify `Require one of the selected controls` is selected.4. Ensure `Enable policy` is set to `On`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-grant#require-device-to-be-marked-as-compliant:https://learn.microsoft.com/en-us/entra/identity/devices/concept-hybrid-join:https://learn.microsoft.com/en-us/mem/intune/fundamentals/deployment-guide-enrollment",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.2.11",
+ "Description": "Conditional Access (CA) can be configured to enforce access based on the device's compliance status or whether it is Entra hybrid joined. Collectively this allows CA to classify devices as managed or not, providing more granular control over whether or not a user can register MFA on a device.When using `Require device to be marked as compliant`, the device must pass checks configured in **Compliance** policies defined within Intune (Endpoint Manager). Before these checks can be applied, the device must first be enrolled in Intune MDM.By selecting `Require Microsoft Entra hybrid joined device` this means the device must first be synchronized from an on-premises Active Directory to qualify for authentication.When configured to the recommended state below only one condition needs to be met for the user to register MFA from the device. This functions as an \"OR\" operator.The recommended state is to restrict `Register security information` to a device that is marked as compliant or Entra hybrid joined.",
+ "Checks": [
+ "entra_managed_device_required_for_mfa_registration"
+ ],
+ "Attributes": [
+ {
+ "Section": "5.2.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Conditional Access (CA) can be configured to enforce access based on the device's compliance status or whether it is Entra hybrid joined. Collectively this allows CA to classify devices as managed or not, providing more granular control over whether or not a user can register MFA on a device.When using `Require device to be marked as compliant`, the device must pass checks configured in **Compliance** policies defined within Intune (Endpoint Manager). Before these checks can be applied, the device must first be enrolled in Intune MDM.By selecting `Require Microsoft Entra hybrid joined device` this means the device must first be synchronized from an on-premises Active Directory to qualify for authentication.When configured to the recommended state below only one condition needs to be met for the user to register MFA from the device. This functions as an \"OR\" operator.The recommended state is to restrict `Register security information` to a device that is marked as compliant or Entra hybrid joined.",
+ "RationaleStatement": "Requiring registration on a managed device significantly reduces the risk of bad actors using stolen credentials to register security information. Accounts that are created but never registered with an MFA method are particularly vulnerable to this type of attack. Enforcing this requirement will both reduce the attack surface for fake registrations and ensure that legitimate users register using trusted devices which typically have additional security measures in place already.",
+ "ImpactStatement": "The organization will be required to have a mature device management process. New devices provided to users will need to be pre-enrolled in Intune, auto-enrolled or be Entra hybrid joined. Otherwise, the user will be unable to complete registration, requiring additional resources from I.T. This could be more disruptive in remote worker environments where the MDM maturity is low.In these cases where the person enrolling in MFA (enrollee) doesn't have physical access to a managed device, a help desk process can be created using a Teams meeting to complete enrollment using: 1) a durable process to verify the enrollee's identity including government identification with a photograph held up to the camera, information only the enrollee should know, and verification by the enrollee's direct manager in the same meeting; 2) complete enrollment in the same Teams meeting with the enrollee being granted screen and keyboard access to the help desk person's InPrivate Edge browser session.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Create a new policy by selecting `New policy`. - Under `Users` include `All users`. - Under `Target resources` select `User actions` and check `Register security information`. - Under `Grant` select `Grant access`. - Check `Require multifactor authentication` and `Require Microsoft Entra hybrid joined device`. - Choose `Require one of the selected controls` and click `Select` at the bottom.4. Under `Enable policy` set it to `Report Only` until the organization is ready to enable it.5. Click `Create`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click expand `Protection` > `Conditional Access` select `Policies`.3. Ensure that a policy exists with the following criteria and is set to `On`: - Under `Users` verify `All users` is included. - Under `Target resources` verify `User actions` is selected with `Register security information` checked. - Under `Grant` verify `Require device to be marked as compliant` and `Require Microsoft Entra hybrid joined device` are checked. - Under `Grant` verify `Require one of the selected controls` is selected.4. Ensure `Enable policy` is set to `On`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-grant#require-device-to-be-marked-as-compliant:https://learn.microsoft.com/en-us/entra/identity/devices/concept-hybrid-join:https://learn.microsoft.com/en-us/mem/intune/fundamentals/deployment-guide-enrollment:https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-conditional-access-cloud-apps#user-actions",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.3.1",
+ "Description": "Microsoft has released additional settings to enhance the configuration of the Microsoft Authenticator application. These settings provide additional information and context to users who receive MFA passwordless and push requests, such as geographic location the request came from, the requesting application and requiring a number match.Ensure the following are `Enabled`.- `Require number matching for push notifications`- `Show application name in push and passwordless notifications`- `Show geographic location in push and passwordless notifications`**NOTE:** On February 27, 2023 Microsoft started enforcing number matching tenant-wide for all users using Microsoft Authenticator.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.2.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft has released additional settings to enhance the configuration of the Microsoft Authenticator application. These settings provide additional information and context to users who receive MFA passwordless and push requests, such as geographic location the request came from, the requesting application and requiring a number match.Ensure the following are `Enabled`.- `Require number matching for push notifications`- `Show application name in push and passwordless notifications`- `Show geographic location in push and passwordless notifications`**NOTE:** On February 27, 2023 Microsoft started enforcing number matching tenant-wide for all users using Microsoft Authenticator.",
+ "RationaleStatement": "As the use of strong authentication has become more widespread, attackers have started to exploit the tendency of users to experience \"MFA fatigue.\" This occurs when users are repeatedly asked to provide additional forms of identification, leading them to eventually approve requests without fully verifying the source. To counteract this, number matching can be employed to ensure the security of the authentication process. With this method, users are prompted to confirm a number displayed on their original device and enter it into the device being used for MFA. Additionally, other information such as geolocation and application details are displayed to enhance the end user's awareness. Among these 3 options, number matching provides the strongest net security gain.",
+ "ImpactStatement": "Additional interaction will be required by end users using number matching as opposed to simply pressing \"Approve\" for login attempts.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click to expand `Protection` > `Authentication methods` select `Policies`.3. Select `Microsoft Authenticator`4. Under `Enable and Target` ensure the setting is set to `Enable`.5. Select `Configure`6. Set the following Microsoft Authenticator settings: - `Require number matching for push notifications` Status is set to `Enabled`, Target `All users` - `Show application name in push and passwordless notifications` is set to `Enabled`, Target `All users` - `Show geographic location in push and passwordless notifications` is set to `Enabled`, Target `All users`**Note:** Valid groups such as break glass accounts can be excluded per organization policy.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to the `Microsoft Entra admin center` https://entra.microsoft.com.2. Click to expand `Protection` > `Authentication methods` select `Policies`.3. Under **Method** select `Microsoft Authenticator`.4. Under `Enable and Target` verify the setting is set to `Enable`.5. In the `Include` tab ensure `All users` is selected.6. In the `Exclude` tab ensure only valid groups are present (i.e. Break Glass accounts).7. Select `Configure`8. Verify the following Microsoft Authenticator settings: - `Require number matching for push notifications` Status is set to `Enabled`, Target `All users` - `Show application name in push and passwordless notifications` is set to `Enabled`, Target `All users` - `Show geographic location in push and passwordless notifications` is set to `Enabled`, Target `All users`9. In each setting select `Exclude` and verify only groups are present (i.e. Break Glass accounts).",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-default-enablement:https://techcommunity.microsoft.com/t5/microsoft-entra-blog/defend-your-users-from-mfa-fatigue-attacks/ba-p/2365677:https://learn.microsoft.com/en-us/entra/identity/authentication/how-to-mfa-number-match",
+ "DefaultValue": "Microsoft-managed"
+ }
+ ]
+ },
+ {
+ "Id": "5.2.3.2",
+ "Description": "With Entra Password Protection, default global banned password lists are automatically applied to all users in an Entra ID tenant. To support business and security needs, custom banned password lists can be defined. When users change or reset their passwords, these banned password lists are checked to enforce the use of strong passwords.A custom banned password list should include some of the following examples:- Brand names- Product names- Locations, such as company headquarters- Company-specific internal terms- Abbreviations that have specific company meaning",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.2.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "With Entra Password Protection, default global banned password lists are automatically applied to all users in an Entra ID tenant. To support business and security needs, custom banned password lists can be defined. When users change or reset their passwords, these banned password lists are checked to enforce the use of strong passwords.A custom banned password list should include some of the following examples:- Brand names- Product names- Locations, such as company headquarters- Company-specific internal terms- Abbreviations that have specific company meaning",
+ "RationaleStatement": "Creating a new password can be difficult regardless of one's technical background. It is common to look around one's environment for suggestions when building a password, however, this may include picking words specific to the organization as inspiration for a password. An adversary may employ what is called a 'mangler' to create permutations of these specific words in an attempt to crack passwords or hashes making it easier to reach their goal.",
+ "ImpactStatement": "If a custom banned password list includes too many common dictionary words, or short words that are part of compound words, then perfectly secure passwords may be blocked. The organization should consider a balance between security and usability when creating a list.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Protection` > `Authentication methods`3. Select `Password protection`4. Set `Enforce custom list` to `Yes`5. In `Custom banned password list` create a list using suggestions outlined in this document.6. Click `Save`**Note:** Below is a list of examples that can be used as a starting place. The references section contains more suggestions.- Brand names- Product names- Locations, such as company headquarters- Company-specific internal terms- Abbreviations that have specific company meaning",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Protection` > `Authentication methods`3. Select `Password protection`4. Verify `Enforce custom list` is set to `Yes`5. Verify `Custom banned password list` contains entries specific to the organization or matches a pre-determined list.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/authentication/concept-password-ban-bad#custom-banned-password-list:https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-configure-custom-password-protection",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.3.3",
+ "Description": "Microsoft Entra Password Protection provides a global and custom banned password list. A password change request fails if there's a match in these banned password list. To protect on-premises Active Directory Domain Services (AD DS) environment, install and configure Entra Password Protection.**Note**: This recommendation applies to Hybrid deployments only and will have no impact unless working with on-premises Active Directory.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.2.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft Entra Password Protection provides a global and custom banned password list. A password change request fails if there's a match in these banned password list. To protect on-premises Active Directory Domain Services (AD DS) environment, install and configure Entra Password Protection.**Note**: This recommendation applies to Hybrid deployments only and will have no impact unless working with on-premises Active Directory.",
+ "RationaleStatement": "This feature protects an organization by prohibiting the use of weak or leaked passwords. In addition, organizations can create custom banned password lists to prevent their users from using easily guessed passwords that are specific to their industry. Deploying this feature to Active Directory will strengthen the passwords that are used in the environment.",
+ "ImpactStatement": "The potential impact associated with implementation of this setting is dependent upon the existing password policies in place in the environment. For environments that have strong password policies in place, the impact will be minimal. For organizations that do not have strong password policies in place, implementation of Microsoft Entra Password Protection may require users to change passwords and adhere to more stringent requirements than they have been accustomed to.",
+ "RemediationProcedure": "**To remediate using the UI:**- Download and install the `Azure AD Password Proxies` and `DC Agents` from the following location: https://www.microsoft.com/download/details.aspx?id=57071 After installed follow the steps below.1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` select `Authentication methods`.3. Select `Password protection` and set `Enable password protection on Windows Server Active Directory` to `Yes` and `Mode` to `Enforced`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` select `Authentication methods`.3. Select `Password protection` and ensure that `Enable password protection on Windows Server Active Directory` is set to `Yes` and that `Mode` is set to `Enforced`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/authentication/howto-password-ban-bad-on-premises-operations",
+ "DefaultValue": "Enable - YesMode - Audit"
+ }
+ ]
+ },
+ {
+ "Id": "5.2.3.4",
+ "Description": "Microsoft defines Multifactor authentication capable as being registered and enabled for a strong authentication method. The method must also be allowed by the authentication methods policy.Ensure all member users are `MFA capable`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.2.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft defines Multifactor authentication capable as being registered and enabled for a strong authentication method. The method must also be allowed by the authentication methods policy.Ensure all member users are `MFA capable`.",
+ "RationaleStatement": "Multifactor authentication requires an individual to present a minimum of two separate forms of authentication before access is granted. Users who are not `MFA Capable` have never registered a strong authentication method for multifactor authentication that is within policy and may not be using MFA. This could be a result of having never signed in, exclusion from a Conditional Access (CA) policy requiring MFA, or a CA policy does not exist. Reviewing this list of users will help identify possible lapses in policy or procedure.",
+ "ImpactStatement": "When using the UI audit method guest users will appear in the report and unless the organization is applying MFA rules to guests then they will need to be manually filtered. Accounts that provide on-premises directory synchronization also appear in these reports.",
+ "RemediationProcedure": "Remediation steps will depend on the status of the personnel in question or configuration of Conditional Access policies and will not be covered in detail. Administrators should review each user identified on a case-by-case basis using the conditions below.**User has never signed on:**- Employment status should be reviewed, and appropriate action taken on the user account's roles, licensing and enablement.**Conditional Access policy applicability:**- Ensure a CA policy is in place requiring all users to use MFA.- Ensure the user is not excluded from the CA MFA policy.- Ensure the policy's state is set to `On`.- Use `What if` to determine applicable CA policies. (Protection > Conditional Access > Policies)- Review the user account in `Sign-in logs`. Under the `Activity Details` pane click the `Conditional Access` tab to view applied policies.**Note:** Conditional Access is covered step by step in section 5.2.2",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` select `Authentication methods`.3. Select `User registration details`.4. Set the filter option `Multifactor authentication capable` to `Not Capable`.5. Review the non-guest users in this list.6. Excluding any exceptions users found in this report may require remediation.**To audit using PowerShell:**1. Connect to Graph using `Connect-MgGraph -Scopes \"UserAuthenticationMethod.Read.All,AuditLog.Read.All\"`2. Run the following:```Get-MgReportAuthenticationMethodUserRegistrationDetail ` -Filter \"IsMfaCapable eq false and UserType eq 'Member'\" | ft UserPrincipalName,IsMfaCapable,IsAdmin```3. Ensure `IsMfaCapable` is set to `True`.4. Excluding any exceptions users found in this report may require remediation.**Note:** The CA rule must be in place for a successful deployment of Multifactor Authentication. This policy is outlined in the conditional access section 5.2.2**Note 2:** Possible exceptions include on-premises synchronization accounts.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.reports/update-mgreportauthenticationmethoduserregistrationdetail?view=graph-powershell-1.0#-ismfacapable:https://learn.microsoft.com/en-us/entra/identity/monitoring-health/how-to-view-applied-conditional-access-policies:https://learn.microsoft.com/en-us/entra/identity/conditional-access/what-if-tool:https://learn.microsoft.com/en-us/entra/identity/authentication/howto-authentication-methods-activity",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.2.3.5",
+ "Description": "Authentication methods support a wide variety of scenarios for signing in to Microsoft 365 resources. Some of these methods are inherently more secure than others but require more investment in time to get users enrolled and operational.SMS and Voice Call rely on telephony carrier communication methods to deliver the authenticating factor.The email one-time passcode feature is a way to authenticate B2B collaboration users when they can't be authenticated through other means, such as Microsoft Entra ID, Microsoft account (MSA), or social identity providers. When a B2B guest user tries to redeem your invitation or sign in to your shared resources, they can request a temporary passcode, which is sent to their email address. Then they enter this passcode to continue signing in.The recommended state is to `Disable` these methods:- SMS- Voice Call- Email OTP",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.2.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Authentication methods support a wide variety of scenarios for signing in to Microsoft 365 resources. Some of these methods are inherently more secure than others but require more investment in time to get users enrolled and operational.SMS and Voice Call rely on telephony carrier communication methods to deliver the authenticating factor.The email one-time passcode feature is a way to authenticate B2B collaboration users when they can't be authenticated through other means, such as Microsoft Entra ID, Microsoft account (MSA), or social identity providers. When a B2B guest user tries to redeem your invitation or sign in to your shared resources, they can request a temporary passcode, which is sent to their email address. Then they enter this passcode to continue signing in.The recommended state is to `Disable` these methods:- SMS- Voice Call- Email OTP",
+ "RationaleStatement": "The SMS and Voice call methods are vulnerable to SIM swapping which could allow an attacker to gain access to your Microsoft 365 account.",
+ "ImpactStatement": "Disabling Email OTP will prevent one-time pass codes from being sent to unverified guest users accessing Microsoft 365 resources on the tenant. They will be required to use a personal Microsoft account, a managed Microsoft Entra account, be part of a federation or be configured as a guest in the host tenant's Microsoft Entra ID.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` select `Authentication methods`.3. Select `Policies`.4. Inspect each method that is out of compliance and remediate: - Click on the method to open it. - Change the `Enable` toggle to the off position. - Click `Save`.**Note:** If the save button remains greyed out after toggling a method off, then first turn it back on and then change the position of the `Target` selection (all users or select groups). Turn the method off again and save. This was observed to be a bug in the UI at the time this document was published.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` select `Authentication methods`.3. Select `Policies`.4. Verify that the following methods in the `Enabled` column or set to `No`. - Method: `SMS` - Method: `Voice call` - Method: `Email OTP`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/identity/authentication/concept-authentication-methods-manage:https://learn.microsoft.com/en-us/entra/external-id/one-time-passcode:https://www.microsoft.com/en-us/microsoft-365-life-hacks/privacy-and-safety/what-is-sim-swapping",
+ "DefaultValue": "'- SMS : Disabled- Voice Call : Disabled- Email OTP : Enabled"
+ }
+ ]
+ },
+ {
+ "Id": "5.2.4.1",
+ "Description": "Enabling self-service password reset allows users to reset their own passwords in Entra ID. When users sign in to Microsoft 365, they will be prompted to enter additional contact information that will help them reset their password in the future. If combined registration is enabled additional information, outside of multi-factor, will not be needed. **Note:** Effective Oct. 1st, 2022, Microsoft will begin to enable combined registration for all users in Entra ID tenants created before August 15th, 2020. Tenants created after this date are enabled with combined registration by default.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.2.4",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Enabling self-service password reset allows users to reset their own passwords in Entra ID. When users sign in to Microsoft 365, they will be prompted to enter additional contact information that will help them reset their password in the future. If combined registration is enabled additional information, outside of multi-factor, will not be needed. **Note:** Effective Oct. 1st, 2022, Microsoft will begin to enable combined registration for all users in Entra ID tenants created before August 15th, 2020. Tenants created after this date are enabled with combined registration by default.",
+ "RationaleStatement": "Users will no longer need to engage the helpdesk for password resets, and the password reset mechanism will automatically block common, easily guessable passwords.",
+ "ImpactStatement": "Users will be required to provide additional contact information to enroll in self-service password reset. Additionally, minor user education may be required for users that are used to calling a help desk for assistance with password resets. **Note:** This is unavailable if using Entra Connect / Sync in a hybrid environment.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` > `Password reset` select `Properties`.3. Set `Self service password reset enabled` to `All`",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Protection` > `Password reset` select `Properties`.3. Ensure `Self service password reset enabled` is set to `All`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/let-users-reset-passwords?view=o365-worldwide:https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-enable-sspr:https://learn.microsoft.com/en-us/entra/identity/authentication/howto-registration-mfa-sspr-combined",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.3.1",
+ "Description": "Microsoft Entra Privileged Identity Management can be used to audit roles, allow just in time activation of roles and allow for periodic role attestation. Organizations should remove permanent members from privileged Office 365 roles and instead make them eligible, through a JIT activation workflow.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.3",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft Entra Privileged Identity Management can be used to audit roles, allow just in time activation of roles and allow for periodic role attestation. Organizations should remove permanent members from privileged Office 365 roles and instead make them eligible, through a JIT activation workflow.",
+ "RationaleStatement": "Organizations want to minimize the number of people who have access to secure information or resources, because that reduces the chance of a malicious actor getting that access, or an authorized user inadvertently impacting a sensitive resource. However, users still need to carry out privileged operations in Entra ID. Organizations can give users just-in-time (JIT) privileged access to roles. There is a need for oversight for what those users are doing with their administrator privileges. PIM helps to mitigate the risk of excessive, unnecessary, or misused access rights.",
+ "ImpactStatement": "Implementation of Just in Time privileged access is likely to necessitate changes to administrator routine. Administrators will only be granted access to administrative roles when required. When administrators request role activation, they will need to document the reason for requiring role access, anticipated time required to have the access, and to reauthenticate to enable role access.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity Governance` select `Privileged Identity Management`.3. Under **Manage** select `Microsoft Entra Roles`.4. Under **Manage** select `Roles`.5. Inspect at a minimum the following sensitive roles. For each of the members that have an `ASSIGNMENT TYPE` of `Permanent`, click on the `...` and choose `Make eligible`:- `Application Administrator`- `Authentication Administrator`- `Azure Information Protection Administrator`- `Billing Administrator`- `Cloud Application Administrator`- `Cloud Device Administrator`- `Compliance Administrator`- `Customer LockBox Access Approver`- `Exchange Administrator`- `Fabric Administrator`- `Global Administrator`- `HelpDesk Administrator`- `Intune Administrator`- `Kaizala Administrator`- `License Administrator`- `Microsoft Entra Joined Device Local Administrator`- `Password Administrator`- `Privileged Authentication Administrator`- `Privileged Role Administrator`- `Security Administrator`- `SharePoint Administrator`- `Skype for Business Administrator`- `Teams Administrator`- `User Administrator`",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity Governance` select `Privileged Identity Management`.3. Under **Manage** select `Microsoft Entra Roles`.4. Under **Manage** select `Roles`.5. Inspect at a minimum the following sensitive roles to ensure the members are `Eligible` and not `Permanent`:- `Application Administrator`- `Authentication Administrator`- `Azure Information Protection Administrator`- `Billing Administrator`- `Cloud Application Administrator`- `Cloud Device Administrator`- `Compliance Administrator`- `Customer LockBox Access Approver`- `Exchange Administrator`- `Fabric Administrator`- `Global Administrator`- `HelpDesk Administrator`- `Intune Administrator`- `Kaizala Administrator`- `License Administrator`- `Microsoft Entra Joined Device Local Administrator`- `Password Administrator`- `Privileged Authentication Administrator`- `Privileged Role Administrator`- `Security Administrator`- `SharePoint Administrator`- `Skype for Business Administrator`- `Teams Administrator`- `User Administrator`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/pim-configure",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "5.3.2",
+ "Description": "Access reviews enable administrators to establish an efficient automated process for reviewing group memberships, access to enterprise applications, and role assignments. These reviews can be scheduled to recur regularly, with flexible options for delegating the task of reviewing membership to different members of the organization.Ensure `Access reviews` for Guest Users are configured to be performed no less frequently than `monthly`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.3",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Access reviews enable administrators to establish an efficient automated process for reviewing group memberships, access to enterprise applications, and role assignments. These reviews can be scheduled to recur regularly, with flexible options for delegating the task of reviewing membership to different members of the organization.Ensure `Access reviews` for Guest Users are configured to be performed no less frequently than `monthly`.",
+ "RationaleStatement": "Access to groups and applications for guests can change over time. If a guest user's access to a particular folder goes unnoticed, they may unintentionally gain access to sensitive data if a member adds new files or data to the folder or application. Access reviews can help reduce the risks associated with outdated assignments by requiring a member of the organization to conduct the reviews. Furthermore, these reviews can enable a fail-closed mechanism to remove access to the subject if the reviewer does not respond to the review.",
+ "ImpactStatement": "Access reviews that are ignored may cause guest users to lose access to resources temporarily.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Identity Governance` and select `Access reviews`3. Click `New access review`.4. `Select what to review` choose `Teams + Groups`.5. `Review Scope` set to `All Microsoft 365 groups with guest users`, do not exclude groups.6. `Scope` set to `Guest users only` then click `Next: Reviews`.7. `Select reviewers` an appropriate user that is NOT the guest user themselves.8. `Duration (in days)` at most `3`.9. `Review recurrence` is `Monthly` or more frequent.10. `End` is set to `Never`, then click `Next: Settings`.11. Check `Auto apply results to resource`.12. Set `If reviewers don't respond` to `Remove access`.13. Check the following: `Justification required`, `E-mail notifications`, `Reminders`.14. Click `Next: Review + Create` and finally click `Create`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Identity Governance` and select `Access reviews`3. Inspect the access reviews, and ensure an access review is created with the following criteria: - `Overview`: `Scope` is set to `Guest users only` and status is `Active` - `Reviewers`: Ensure appropriate reviewer(s) are designated. - `Settings` > `General`: `Mail notifications` and `Reminders` are set to `Enable` - `Reviewers`: `Require reason on approval` is set to `Enable` - `Scheduling`: `Frequency` is `Monthly` or more frequent. - `When completed`: `Auto apply results to resource` is set to `Enable` - `When completed`: `If reviewers don't respond` is set to `Remove access`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/id-governance/access-reviews-overview:https://learn.microsoft.com/en-us/entra/id-governance/create-access-review",
+ "DefaultValue": "By default access reviews are not configured."
+ }
+ ]
+ },
+ {
+ "Id": "5.3.3",
+ "Description": "Access reviews enable administrators to establish an efficient automated process for reviewing group memberships, access to enterprise applications, and role assignments. These reviews can be scheduled to recur regularly, with flexible options for delegating the task of reviewing membership to different members of the organization.Ensure `Access reviews` for high privileged Entra ID roles are done `monthly` or more frequently. These reviews should include **at a minimum** the roles listed below:- Global Administrator- Exchange Administrator- SharePoint Administrator- Teams Administrator- Security Administrator**Note:** An access review is created for each role selected after completing the process.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.3",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Access reviews enable administrators to establish an efficient automated process for reviewing group memberships, access to enterprise applications, and role assignments. These reviews can be scheduled to recur regularly, with flexible options for delegating the task of reviewing membership to different members of the organization.Ensure `Access reviews` for high privileged Entra ID roles are done `monthly` or more frequently. These reviews should include **at a minimum** the roles listed below:- Global Administrator- Exchange Administrator- SharePoint Administrator- Teams Administrator- Security Administrator**Note:** An access review is created for each role selected after completing the process.",
+ "RationaleStatement": "Regular review of critical high privileged roles in Entra ID will help identify role drift, or potential malicious activity. This will enable the practice and application of \"separation of duties\" where even non-privileged users like security auditors can be assigned to review assigned roles in an organization. Furthermore, if configured these reviews can enable a fail-closed mechanism to remove access to the subject if the reviewer does not respond to the review.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Identity Governance` and select `Privileged Identity Management`3. Select `Microsoft Entra Roles` under Manage4. Select `Access reviews` and click `New access review`.5. Provide a name and description.6. `Frequency` set to `Monthly` or more frequently.7. `Duration (in days)` is set to at most `3`.8. `End` set to `Never`.9. `Role` select these roles: `Global Administrator`,`Exchange Administrator`,`SharePoint Administrator`,`Teams Administrator`,`Security Administrator`9. `Assignment type` set to `All active and eligible assignments`.10. `Reviewers` set to `Selected user(s) or group(s)`11. `Select reviewers` are member(s) responsible for this type of review.12. `Auto apply results to resource` set to `Enable`13. `If reviewers don't respond` is set to `No change`14. `Show recommendations` set to `Enable`15. `Require reason or approval` set to `Enable`16. `Mail notifications` set to `Enable`17. `Reminders` set to `Enable`18. Click `Start` to save the review.**Note:** Reviewers will have the ability to revoke roles should be trusted individuals who understand the impact of the access reviews. The principle of separation of duties should be considered so that no one administrator is reviewing their own access levels.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/2. Click to expand `Identity Governance` and select `Privileged Identity Management`3. Select `Microsoft Entra Roles` under Manage4. Select `Access reviews`5. Ensure there are access reviews configured for each high privileged roles and each meets the criteria laid out below: - `Scope` - `Everyone` - `Status` - `Active` - `Reviewers` - Role reviewers should be designated personnel. Preferably not a self-review. - `Mail notifications` - `Enable` - `Reminders` - `Enable` - `Require reason on approval` - `Enable` - `Frequency` - `Monthly` or more frequently. - `Duration (in days)` - `4` at most - `Auto apply results to resource` - `Enable` - `If reviewers don't respond` - `No change`Any remaining settings are discretionary.**Note:** Reviewers will have the ability to revoke roles should be trusted individuals who understand the impact of the access reviews. The principle of separation of duties should be considered so that no one administrator is reviewing their own access levels.**Note2:** The setting `If reviewers don't respond` is recommended to be set to `Remove access` due to the potential of all Global Administrators being unassigned if the review is not addressed.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/pim-create-roles-and-resource-roles-review:https://learn.microsoft.com/en-us/entra/id-governance/access-reviews-overview",
+ "DefaultValue": "By default access reviews are not configured."
+ }
+ ]
+ },
+ {
+ "Id": "5.3.4",
+ "Description": "Microsoft Entra Privileged Identity Management can be used to audit roles, allow just in time activation of roles and allow for periodic role attestation. Requiring approval before activation allows one of the selected approvers to first review and then approve the activation prior to PIM granted the role. The approver doesn't have to be a group member or owner.The recommended state is `Require approval to activate` for the Global Administrator role.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "5.3",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Microsoft Entra Privileged Identity Management can be used to audit roles, allow just in time activation of roles and allow for periodic role attestation. Requiring approval before activation allows one of the selected approvers to first review and then approve the activation prior to PIM granted the role. The approver doesn't have to be a group member or owner.The recommended state is `Require approval to activate` for the Global Administrator role.",
+ "RationaleStatement": "Requiring approval for Global Administrator role activation enhances visibility and accountability every time this highly privileged role is used. This process reduces the risk of an attacker elevating a compromised account to the highest privilege level, as any activation must first be reviewed and approved by a trusted party.**Note:** This only acts as protection for eligible users that are activating a role. Directly assigning a role does require an approval workflow so therefore it is important to implement and use PIM correctly.",
+ "ImpactStatement": "Approvers do not need to be assigned the same role or be members of the same group. It's important to have at least two approvers and an emergency access (break-glass) account to prevent a scenario where no Global Administrators are available. For example, if the last active Global Administrator leaves the organization, and only eligible but inactive Global Administrators remain, a trusted approver without the Global Administrator role or an emergency access account would be essential to avoid delays in critical administrative tasks.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity Governance` select `Privileged Identity Management`.3. Under **Manage** select `Microsoft Entra Roles`.4. Under **Manage** select `Roles`.5. Select `Global Administrator` in the list.6. Select `Role settings` and click `Edit`.7. Check the `Require approval to activate` box.8. Add at least two approvers.9. Click `Update`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Entra admin center` https://entra.microsoft.com/.2. Click to expand `Identity Governance` select `Privileged Identity Management`.3. Under **Manage** select `Microsoft Entra Roles`.4. Under **Manage** select `Roles`.5. Select `Global Administrator` in the list.6. Select `Role settings` and click `Edit`.7. Verify `Require approval to activate` is set.8. Verify there are at least two approvers selected.9. Click `Update`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/pim-configure:https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/groups-role-settings#require-approval-to-activate",
+ "DefaultValue": "`Require approval to activate` is unchecked."
+ }
+ ]
+ },
+ {
+ "Id": "6.1.1",
+ "Description": "The value False indicates that mailbox auditing on by default is turned on for the organization. Mailbox auditing on by default in the organization overrides the mailbox auditing settings on individual mailboxes. For example, if mailbox auditing is turned off for a mailbox (the AuditEnabled property on the mailbox is False), the default mailbox actions are still audited for the mailbox, because mailbox auditing on by default is turned on for the organization.Turning off mailbox auditing on by default ($true) has the following results:- Mailbox auditing is turned off for your organization.- From the time you turn off mailbox auditing on by default, no mailbox actions are audited, even if mailbox auditing is enabled on a mailbox (the AuditEnabled property on the mailbox is True).- Mailbox auditing isn't turned on for new mailboxes and setting the AuditEnabled property on a new or existing mailbox to True is ignored.- Any mailbox audit bypass association settings (configured by using the Set-MailboxAuditBypassAssociation cmdlet) are ignored.- Existing mailbox audit records are retained until the audit log age limit for the record expires.The recommended state for this setting is `False` at the organization level. This will enable auditing and enforce the default.",
+ "Checks": [
+ "exchange_organization_mailbox_auditing_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "The value False indicates that mailbox auditing on by default is turned on for the organization. Mailbox auditing on by default in the organization overrides the mailbox auditing settings on individual mailboxes. For example, if mailbox auditing is turned off for a mailbox (the AuditEnabled property on the mailbox is False), the default mailbox actions are still audited for the mailbox, because mailbox auditing on by default is turned on for the organization.Turning off mailbox auditing on by default ($true) has the following results:- Mailbox auditing is turned off for your organization.- From the time you turn off mailbox auditing on by default, no mailbox actions are audited, even if mailbox auditing is enabled on a mailbox (the AuditEnabled property on the mailbox is True).- Mailbox auditing isn't turned on for new mailboxes and setting the AuditEnabled property on a new or existing mailbox to True is ignored.- Any mailbox audit bypass association settings (configured by using the Set-MailboxAuditBypassAssociation cmdlet) are ignored.- Existing mailbox audit records are retained until the audit log age limit for the record expires.The recommended state for this setting is `False` at the organization level. This will enable auditing and enforce the default.",
+ "RationaleStatement": "Enforcing the default ensures auditing was not turned off intentionally or accidentally. Auditing mailbox actions will allow forensics and IR teams to trace various malicious activities that can generate TTPs caused by inbox access and tampering.**Note:** Without advanced auditing (E5 function) the logs are limited to 90 days.",
+ "ImpactStatement": "None - this is the default behavior as of 2019.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-OrganizationConfig -AuditDisabled $false```",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-OrganizationConfig | Format-List AuditDisabled```3. Ensure `AuditDisabled` is set to `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/purview/audit-mailboxes?view=o365-worldwide:https://learn.microsoft.com/en-us/powershell/module/exchange/set-organizationconfig?view=exchange-ps#-auditdisabled",
+ "DefaultValue": "False"
+ }
+ ]
+ },
+ {
+ "Id": "6.1.2",
+ "Description": "Mailbox audit logging is turned on by default in all organizations. This effort started in January 2019, and means that certain actions performed by mailbox owners, delegates, and admins are automatically logged. The corresponding mailbox audit records are available for admins to search in the mailbox audit log. Mailboxes and shared mailboxes have actions assigned to them individually in order to audit the data the organization determines valuable at the mailbox level.The recommended state is `AuditEnabled` to `True` on all user mailboxes along with additional audit actions beyond the Microsoft defaults.**Note:** Due to some differences in defaults for audit actions this recommendation is specific to users assigned an E3 license only.",
+ "Checks": [
+ "exchange_user_mailbox_auditing_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Mailbox audit logging is turned on by default in all organizations. This effort started in January 2019, and means that certain actions performed by mailbox owners, delegates, and admins are automatically logged. The corresponding mailbox audit records are available for admins to search in the mailbox audit log. Mailboxes and shared mailboxes have actions assigned to them individually in order to audit the data the organization determines valuable at the mailbox level.The recommended state is `AuditEnabled` to `True` on all user mailboxes along with additional audit actions beyond the Microsoft defaults.**Note:** Due to some differences in defaults for audit actions this recommendation is specific to users assigned an E3 license only.",
+ "RationaleStatement": "Whether it is for regulatory compliance or for tracking unauthorized configuration changes in Microsoft 365, enabling mailbox auditing, and ensuring the proper mailbox actions are accounted for allows for Microsoft 365 teams to run security operations, forensics or general investigations on mailbox activities. The following mailbox types ignore the organizational default and must have `AuditEnabled` set to `True` at the mailbox level in order to capture relevant audit data.- Resource Mailboxes- Public Folder Mailboxes- DiscoverySearch Mailbox **Note:** Without advanced auditing (E5 function) the logs are limited to 90 days.",
+ "ImpactStatement": "None - this is the default behavior.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell script:```$AuditAdmin = @( \"ApplyRecord\", \"Copy\", \"Create\", \"FolderBind\", \"HardDelete\", \"Move\", \"MoveToDeletedItems\", \"SendAs\", \"SendOnBehalf\", \"SoftDelete\", \"Update\", \"UpdateCalendarDelegation\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")$AuditDelegate = @( \"ApplyRecord\", \"Create\", \"FolderBind\", \"HardDelete\", \"Move\", \"MoveToDeletedItems\", \"SendAs\", \"SendOnBehalf\", \"SoftDelete\", \"Update\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")$AuditOwner = @( \"ApplyRecord\", \"Create\", \"HardDelete\", \"MailboxLogin\", \"Move\", \"MoveToDeletedItems\", \"SoftDelete\", \"Update\", \"UpdateCalendarDelegation\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")$MBX = Get-EXOMailbox -ResultSize Unlimited | Where-Object { $_.RecipientTypeDetails -eq \"UserMailbox\" }$MBX | Set-Mailbox -AuditEnabled $true `-AuditLogAgeLimit 90 -AuditAdmin $AuditAdmin -AuditDelegate $AuditDelegate `-AuditOwner $AuditOwner```",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell script:```$MailAudit = Get-EXOMailbox -PropertySets Audit -ResultSize Unlimited | Select-Object UserPrincipalName, AuditEnabled, AuditAdmin, AuditDelegate, AuditOwner$MailAudit | Export-Csv -Path C:\\CIS\\AuditSettings.csv -NoTypeInformation```3. Analyze the output and verify `AuditEnabled` is set to `True` and all audit actions are included in what is defined in the script in the remediation section.**Optionally, this more comprehensive script can assess each user mailbox:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following script:```$AdminActions = @( \"ApplyRecord\", \"Copy\", \"Create\", \"FolderBind\", \"HardDelete\", \"Move\", \"MoveToDeletedItems\", \"SendAs\", \"SendOnBehalf\", \"SoftDelete\", \"Update\", \"UpdateCalendarDelegation\", \"UpdateFolderPermissions\", \"UpdateInboxRules\" )$DelegateActions = @( \"ApplyRecord\", \"Create\", \"FolderBind\", \"HardDelete\", \"Move\", \"MoveToDeletedItems\", \"SendAs\", \"SendOnBehalf\", \"SoftDelete\", \"Update\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")$OwnerActions = @( \"ApplyRecord\", \"Create\", \"HardDelete\", \"MailboxLogin\", \"Move\", \"MoveToDeletedItems\", \"SoftDelete\", \"Update\", \"UpdateCalendarDelegation\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")function VerifyActions { param ( [string]$type, [array]$actions, [array]$auditProperty, [string]$mailboxName ) $missingActions = @() $actionCount = 0 foreach ($action in $actions) { if ($auditProperty -notcontains $action) { $missingActions += \" Failure: Audit action '$action' missing from $type\" $actionCount++ } } if ($actionCount -eq 0) { Write-Host \"[$mailboxName]: $type actions are verified.\" -ForegroundColor Green } else { Write-Host \"[$mailboxName]: $type actions are not all verified.\" -ForegroundColor Red foreach ($missingAction in $missingActions) { Write-Host \" $missingAction\" -ForegroundColor Red } }}$mailboxes = Get-EXOMailbox -PropertySets Audit,Minimum -ResultSize Unlimited | Where-Object { $_.RecipientTypeDetails -eq \"UserMailbox\" }foreach ($mailbox in $mailboxes) { Write-Host \"--- Now assessing [$($mailbox.UserPrincipalName)] ---\" if ($mailbox.AuditEnabled) { Write-Host \"[$($mailbox.UserPrincipalName)]: AuditEnabled is true\" -ForegroundColor Green } else { Write-Host \"[$($mailbox.UserPrincipalName)]: AuditEnabled is false\" -ForegroundColor Red } VerifyActions -type \"AuditAdmin\" -actions $AdminActions -auditProperty $mailbox.AuditAdmin ` -mailboxName $mailbox.UserPrincipalName VerifyActions -type \"AuditDelegate\" -actions $DelegateActions -auditProperty $mailbox.AuditDelegate ` -mailboxName $mailbox.UserPrincipalName VerifyActions -type \"AuditOwner\" -actions $OwnerActions -auditProperty $mailbox.AuditOwner ` -mailboxName $mailbox.UserPrincipalName Write-Host}```",
+ "AdditionalInformation": "Additional mailbox actions outside of the scope of this recommendations that can be audited for with an E5 license include: - MailItemsAccessed- SearchQueryInitiated- Send",
+ "References": "https://learn.microsoft.com/en-us/purview/audit-mailboxes?view=o365-worldwide",
+ "DefaultValue": "`AuditEnabled`: `True` for all mailboxes except below:- Resource Mailboxes- Public Folder Mailboxes- DiscoverySearch Mailbox**AuditAdmin:** ApplyRecord, Create, HardDelete, MoveToDeletedItems, SendAs, SendOnBehalf, SoftDelete, Update, UpdateCalendarDelegation, UpdateFolderPermissions, UpdateInboxRules**AuditDelegate:** ApplyRecord, Create, HardDelete, MoveToDeletedItems, SendAs, SendOnBehalf, SoftDelete, Update, UpdateFolderPermissions, UpdateInboxRules**AuditOwner:** ApplyRecord, HardDelete, MoveToDeletedItems, SoftDelete, Update, UpdateCalendarDelegation, UpdateFolderPermissions, UpdateInboxRules"
+ }
+ ]
+ },
+ {
+ "Id": "6.1.3",
+ "Description": "Mailbox audit logging is turned on by default in all organizations. This effort started in January 2019, and means that certain actions performed by mailbox owners, delegates, and admins are automatically logged. The corresponding mailbox audit records are available for admins to search in the mailbox audit log. Mailboxes and shared mailboxes have actions assigned to them individually in order to audit the data the organization determines valuable at the mailbox level.The recommended state is `AuditEnabled` to `True` on all user mailboxes along with additional audit actions beyond the Microsoft defaults.Note: Due to some differences in defaults for audit actions this recommendation is specific to users assigned an E5 license, or auditing addon license, only.",
+ "Checks": [
+ "exchange_user_mailbox_auditing_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.1",
+ "Profile": "E5 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Mailbox audit logging is turned on by default in all organizations. This effort started in January 2019, and means that certain actions performed by mailbox owners, delegates, and admins are automatically logged. The corresponding mailbox audit records are available for admins to search in the mailbox audit log. Mailboxes and shared mailboxes have actions assigned to them individually in order to audit the data the organization determines valuable at the mailbox level.The recommended state is `AuditEnabled` to `True` on all user mailboxes along with additional audit actions beyond the Microsoft defaults.Note: Due to some differences in defaults for audit actions this recommendation is specific to users assigned an E5 license, or auditing addon license, only.",
+ "RationaleStatement": "Whether it is for regulatory compliance or for tracking unauthorized configuration changes in Microsoft 365, enabling mailbox auditing and ensuring the proper mailbox actions are accounted for allows for Microsoft 365 teams to run security operations, forensics or general investigations on mailbox activities. The following mailbox types ignore the organizational default and must have `AuditEnabled` set to `True` at the mailbox level in order to capture relevant audit data.- Resource Mailboxes- Public Folder Mailboxes- DiscoverySearch Mailbox **NOTE:** Without advanced auditing (E5 function) the logs are limited to 90 days.",
+ "ImpactStatement": "None - this is the default behavior.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell script:```$AuditAdmin = @( \"ApplyRecord\", \"Copy\", \"Create\", \"FolderBind\", \"HardDelete\", \"MailItemsAccessed\", \"Move\", \"MoveToDeletedItems\", \"SendAs\", \"SendOnBehalf\", \"Send\", \"SoftDelete\", \"Update\", \"UpdateCalendarDelegation\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")$AuditDelegate = @( \"ApplyRecord\", \"Create\", \"FolderBind\", \"HardDelete\", \"Move\", \"MailItemsAccessed\", \"MoveToDeletedItems\", \"SendAs\", \"SendOnBehalf\", \"SoftDelete\", \"Update\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")$AuditOwner = @( \"ApplyRecord\", \"Create\", \"HardDelete\", \"MailboxLogin\", \"Move\", \"MailItemsAccessed\", \"MoveToDeletedItems\", \"Send\", \"SoftDelete\", \"Update\", \"UpdateCalendarDelegation\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")$MBX = Get-EXOMailbox -ResultSize Unlimited | Where-Object { $_.RecipientTypeDetails -eq \"UserMailbox\" }$MBX | Set-Mailbox -AuditEnabled $true `-AuditLogAgeLimit 180 -AuditAdmin $AuditAdmin -AuditDelegate $AuditDelegate `-AuditOwner $AuditOwner```**Note:** When running this script mailboxes without an E5 or Azure Audit Premium license applied will generate an error as they are not licensed for the additional actions which come default with E5.",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell script:```$MailAudit = Get-EXOMailbox -PropertySets Audit -ResultSize Unlimited | Select-Object UserPrincipalName, AuditEnabled, AuditAdmin, AuditDelegate, AuditOwner$MailAudit | Export-Csv -Path C:\\CIS\\AuditSettings.csv -NoTypeInformation```3. Analyze the output and verify `AuditEnabled` is set to `True` and all audit actions are included in what is defined in the script in the remediation section.**Optionally, this more comprehensive script can assess each user mailbox:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following script:```$AdminActions = @( \"ApplyRecord\", \"Copy\", \"Create\", \"FolderBind\", \"HardDelete\", \"MailItemsAccessed\", \"Move\", \"MoveToDeletedItems\", \"SendAs\", \"SendOnBehalf\", \"Send\", \"SoftDelete\", \"Update\", \"UpdateCalendarDelegation\", \"UpdateFolderPermissions\", \"UpdateInboxRules\" )$DelegateActions = @( \"ApplyRecord\", \"Create\", \"FolderBind\", \"HardDelete\", \"Move\", \"MailItemsAccessed\", \"MoveToDeletedItems\", \"SendAs\", \"SendOnBehalf\", \"SoftDelete\", \"Update\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")$OwnerActions = @( \"ApplyRecord\", \"Create\", \"HardDelete\", \"MailboxLogin\", \"Move\", \"MailItemsAccessed\", \"MoveToDeletedItems\", \"Send\", \"SoftDelete\", \"Update\", \"UpdateCalendarDelegation\", \"UpdateFolderPermissions\", \"UpdateInboxRules\")function VerifyActions { param ( [string]$type, [array]$actions, [array]$auditProperty, [string]$mailboxName ) $missingActions = @() $actionCount = 0 foreach ($action in $actions) { if ($auditProperty -notcontains $action) { $missingActions += \" Failure: Audit action '$action' missing from $type\" $actionCount++ } } if ($actionCount -eq 0) { Write-Host \"[$mailboxName]: $type actions are verified.\" -ForegroundColor Green } else { Write-Host \"[$mailboxName]: $type actions are not all verified.\" -ForegroundColor Red foreach ($missingAction in $missingActions) { Write-Host \" $missingAction\" -ForegroundColor Red } }}$mailboxes = Get-EXOMailbox -PropertySets Audit,Minimum -ResultSize Unlimited | Where-Object { $_.RecipientTypeDetails -eq \"UserMailbox\" }foreach ($mailbox in $mailboxes) { Write-Host \"--- Now assessing [$($mailbox.UserPrincipalName)] ---\" if ($mailbox.AuditEnabled) { Write-Host \"[$($mailbox.UserPrincipalName)]: AuditEnabled is true\" -ForegroundColor Green } else { Write-Host \"[$($mailbox.UserPrincipalName)]: AuditEnabled is false\" -ForegroundColor Red } VerifyActions -type \"AuditAdmin\" -actions $AdminActions -auditProperty $mailbox.AuditAdmin ` -mailboxName $mailbox.UserPrincipalName VerifyActions -type \"AuditDelegate\" -actions $DelegateActions -auditProperty $mailbox.AuditDelegate ` -mailboxName $mailbox.UserPrincipalName VerifyActions -type \"AuditOwner\" -actions $OwnerActions -auditProperty $mailbox.AuditOwner ` -mailboxName $mailbox.UserPrincipalName Write-Host}```**Note:** In order for a mailbox to pass the above it must have an E5 or Microsoft Purview Audit Premium addon license assigned to it. For the purposes of this recommendation shared mailboxes are ignored.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/purview/audit-mailboxes?view=o365-worldwide",
+ "DefaultValue": "`AuditEnabled`: `True` for all mailboxes except below:- Resource Mailboxes- Public Folder Mailboxes- DiscoverySearch Mailbox**AuditAdmin:** ApplyRecord, Create, HardDelete, MailItemsAccessed, MoveToDeletedItems, Send, SendAs, SendOnBehalf, SoftDelete, Update, UpdateCalendarDelegation, UpdateFolderPermissions, UpdateInboxRules**AuditDelegate:** ApplyRecord, Create, HardDelete, MailItemsAccessed, MoveToDeletedItems, SendAs, SendOnBehalf, SoftDelete, Update, UpdateFolderPermissions, UpdateInboxRules**AuditOwner:** ApplyRecord, HardDelete, MailItemsAccessed, MoveToDeletedItems, Send, SoftDelete, Update, UpdateCalendarDelegation, UpdateFolderPermissions, UpdateInboxRules"
+ }
+ ]
+ },
+ {
+ "Id": "6.1.4",
+ "Description": "When configuring a user or computer account to bypass mailbox audit logging, the system will not record any access, or actions performed by the said user or computer account on any mailbox. Administratively this was introduced to reduce the volume of entries in the mailbox audit logs on trusted user or computer accounts.Ensure `AuditBypassEnabled` is not enabled on accounts without a written exception.",
+ "Checks": [
+ "exchange_mailbox_audit_bypass_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "When configuring a user or computer account to bypass mailbox audit logging, the system will not record any access, or actions performed by the said user or computer account on any mailbox. Administratively this was introduced to reduce the volume of entries in the mailbox audit logs on trusted user or computer accounts.Ensure `AuditBypassEnabled` is not enabled on accounts without a written exception.",
+ "RationaleStatement": "If a mailbox audit bypass association is added for an account, the account can access any mailbox in the organization to which it has been assigned access permissions, without generating any mailbox audit logging entries for such access or recording any actions taken, such as message deletions.Enabling this parameter, whether intentionally or unintentionally, could allow insiders or malicious actors to conceal their activity on specific mailboxes. Ensuring proper logging of user actions and mailbox operations in the audit log will enable comprehensive incident response and forensics.",
+ "ImpactStatement": "None - this is the default behavior.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. The following example PowerShell script will disable AuditBypass for all mailboxes which currently have it enabled:```# Get mailboxes with AuditBypassEnabled set to $true$MBXAudit = Get-MailboxAuditBypassAssociation -ResultSize unlimited | Where-Object { $_.AuditBypassEnabled -eq $true }foreach ($mailbox in $MBXAudit) { $mailboxName = $mailbox.Name Set-MailboxAuditBypassAssociation -Identity $mailboxName -AuditBypassEnabled $false Write-Host \"Audit Bypass disabled for mailbox Identity: $mailboxName\" -ForegroundColor Green}```",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```$MBX = Get-MailboxAuditBypassAssociation -ResultSize unlimited$MBX | where {$_.AuditBypassEnabled -eq $true} | Format-Table Name,AuditBypassEnabled```3. If nothing is returned, then there are no accounts with Audit Bypass enabled.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/exchange/get-mailboxauditbypassassociation?view=exchange-ps",
+ "DefaultValue": "AuditBypassEnabled `False`"
+ }
+ ]
+ },
+ {
+ "Id": "6.2.1",
+ "Description": "Exchange Online offers several methods of managing the flow of email messages. These are Remote domain, Transport Rules, and Anti-spam outbound policies. These methods work together to provide comprehensive coverage for potential automatic forwarding channels:- Outlook forwarding using inbox rules.- Outlook forwarding configured using OOF rule.- OWA forwarding setting (ForwardingSmtpAddress).- Forwarding set by the admin using EAC (ForwardingAddress).- Forwarding using Power Automate / Flow.Ensure a `Transport rule` and `Anti-spam outbound policy` are used to block mail forwarding.**NOTE:** Any exclusions should be implemented based on organizational policy.",
+ "Checks": [
+ "defender_antispam_outbound_policy_forwarding_disabled",
+ "exchange_transport_rules_mail_forwarding_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Exchange Online offers several methods of managing the flow of email messages. These are Remote domain, Transport Rules, and Anti-spam outbound policies. These methods work together to provide comprehensive coverage for potential automatic forwarding channels:- Outlook forwarding using inbox rules.- Outlook forwarding configured using OOF rule.- OWA forwarding setting (ForwardingSmtpAddress).- Forwarding set by the admin using EAC (ForwardingAddress).- Forwarding using Power Automate / Flow.Ensure a `Transport rule` and `Anti-spam outbound policy` are used to block mail forwarding.**NOTE:** Any exclusions should be implemented based on organizational policy.",
+ "RationaleStatement": "Attackers often create these rules to exfiltrate data from your tenancy, this could be accomplished via access to an end-user account or otherwise. An insider could also use one of these methods as a secondary channel to exfiltrate sensitive data.",
+ "ImpactStatement": "Care should be taken before implementation to ensure there is no business need for case-by-case auto-forwarding. Disabling auto-forwarding to remote domains will affect all users and in an organization. Any exclusions should be implemented based on organizational policy.",
+ "RemediationProcedure": "**Note:** _Remediation is a two step procedure as follows:_**STEP 1: Transport rules****To remediate using the UI:** 1. Select `Exchange` to open the Exchange admin center.2. Select `Mail Flow` then `Rules`.3. For each rule that redirects email to external domains, select the rule and click the 'Delete' icon.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Remove-TransportRule {RuleName}```**STEP 2: Anti-spam outbound policy****To remediate using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Expand `E-mail & collaboration` then select `Policies & rules`.3. Select `Threat policies` > `Anti-spam`.4. Select `Anti-spam outbound policy (default)` 5. Click `Edit protection settings`6. Set `Automatic forwarding rules` dropdown to `Off - Forwarding is disabled` and click `Save`7. Repeat steps 4-6 for any additional higher priority, custom policies.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-HostedOutboundSpamFilterPolicy -Identity {policyName} -AutoForwardingMode Off```3. To remove AutoForwarding from all outbound policies you can also run:```Get-HostedOutboundSpamFilterPolicy | Set-HostedOutboundSpamFilterPolicy -AutoForwardingMode Off```",
+ "AuditProcedure": "**Note:** _Audit is a two step procedure as follows:_**STEP 1: Transport rules****To audit using the UI:** 1. Select `Exchange` to open the Exchange admin center.2. Select `Mail Flow` then `Rules`.3. Review the rules and verify that none of them are forwards or redirects e-mail to external domains.**To audit using PowerShell:**1. Connect to Exchange online using `Connect-ExchangeOnline`.2. Run the following PowerShell command to review the Transport Rules that are redirecting email:```Get-TransportRule | Where-Object {$_.RedirectMessageTo -ne $null} | ft Name,RedirectMessageTo```3. Verify that none of the addresses listed belong to external domains outside of the organization. If nothing returns then there are no transport rules set to redirect messages.**STEP 2: Anti-spam outbound policy****To audit using the UI:**1. Navigate to `Microsoft 365 Defender` https://security.microsoft.com/2. Expand `E-mail & collaboration` then select `Policies & rules`.3. Select `Threat policies` > `Anti-spam`.4. Inspect `Anti-spam outbound policy (default)` and ensure `Automatic forwarding` is set to `Off - Forwarding is disabled`5. Inspect any additional custom outbound policies and ensure `Automatic forwarding` is set to `Off - Forwarding is disabled`, in accordance with the organization's exclusion policies.**To audit using PowerShell:**1. Connect to Exchange online using `Connect-ExchangeOnline`.2. Run the following PowerShell cmdlet:```Get-HostedOutboundSpamFilterPolicy | ft Name, AutoForwardingMode```3. In each outbound policy verify `AutoForwardingMode` is `Off`.**Note:** According to Microsoft if a recipient is defined in multiple policies of the same type (anti-spam, anti-phishing, etc.), only the policy with the highest priority is applied to the recipient. Any remaining policies of that type are not evaluated for the recipient (including the default policy). However, it is our recommendation to audit the default policy as well in the case a higher priority custom policy is removed. This will keep the organization's security posture strong.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules:https://techcommunity.microsoft.com/t5/exchange-team-blog/all-you-need-to-know-about-automatic-email-forwarding-in/ba-p/2074888#:~:text=%20%20%20Automatic%20forwarding%20option%20%20,%:https://learn.microsoft.com/en-us/defender-office-365/outbound-spam-policies-external-email-forwarding?view=o365-worldwide",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "6.2.2",
+ "Description": "Mail flow rules (transport rules) in Exchange Online are used to identify and take action on messages that flow through the organization.",
+ "Checks": [
+ "exchange_transport_rules_whitelist_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Mail flow rules (transport rules) in Exchange Online are used to identify and take action on messages that flow through the organization.",
+ "RationaleStatement": "Whitelisting domains in transport rules bypasses regular malware and phishing scanning, which can enable an attacker to launch attacks against your users from a safe haven domain.",
+ "ImpactStatement": "Care should be taken before implementation to ensure there is no business need for case-by-case whitelisting. Removing all whitelisted domains could affect incoming mail flow to an organization although modern systems sending legitimate mail should have no issue with this.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Exchange admin center` https://admin.exchange.microsoft.com..2. Click to expand `Mail Flow` and then select `Rules`.3. For each rule that whitelists specific domains, select the rule and click the 'Delete' icon.**To remediate using PowerShell:**1. Connect to Exchange online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Remove-TransportRule {RuleName}```3. Verify the rules no longer exists.```Get-TransportRule | Where-Object {($_.setscl -eq -1 -and $_.SenderDomainIs -ne $null)} | ft Name,SenderDomainIs```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Exchange admin center` https://admin.exchange.microsoft.com..2. Click to expand `Mail Flow` and then select `Rules`.3. Review the rules and verify that none of them whitelist any specific domains.**To audit using PowerShell:**1. Connect to Exchange online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-TransportRule | Where-Object {($_.setscl -eq -1 -and $_.SenderDomainIs -ne $null)} | ft Name,SenderDomainIs```",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/configuration-best-practices:https://learn.microsoft.com/en-us/exchange/security-and-compliance/mail-flow-rules/mail-flow-rules",
+ "DefaultValue": ""
+ }
+ ]
+ },
+ {
+ "Id": "6.2.3",
+ "Description": "External callouts provide a native experience to identify emails from senders outside the organization. This is achieved by presenting a new tag on emails called \"External\" (the string is localized based on the client language setting) and exposing related user interface at the top of the message reading view to see and verify the real sender's email address.Once this feature is enabled via PowerShell, it might take 24-48 hours for users to start seeing the External sender tag in email messages received from external sources (outside of your organization), providing their Outlook version supports it.The recommended state is `ExternalInOutlook` set to `Enabled` `True`**Note:** Mail flow rules are often used by Exchange administrators to accomplish the External email tagging by appending a tag to the front of a subject line. There are limitations to this outlined [here.](https://techcommunity.microsoft.com/t5/exchange-team-blog/native-external-sender-callouts-on-email-in-outlook/ba-p/2250098) The preferred method in the CIS Benchmark is to use the native experience.",
+ "Checks": [
+ "exchange_external_email_tagging_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "External callouts provide a native experience to identify emails from senders outside the organization. This is achieved by presenting a new tag on emails called \"External\" (the string is localized based on the client language setting) and exposing related user interface at the top of the message reading view to see and verify the real sender's email address.Once this feature is enabled via PowerShell, it might take 24-48 hours for users to start seeing the External sender tag in email messages received from external sources (outside of your organization), providing their Outlook version supports it.The recommended state is `ExternalInOutlook` set to `Enabled` `True`**Note:** Mail flow rules are often used by Exchange administrators to accomplish the External email tagging by appending a tag to the front of a subject line. There are limitations to this outlined [here.](https://techcommunity.microsoft.com/t5/exchange-team-blog/native-external-sender-callouts-on-email-in-outlook/ba-p/2250098) The preferred method in the CIS Benchmark is to use the native experience.",
+ "RationaleStatement": "Tagging emails from external senders helps to inform end users about the origin of the email. This can allow them to proceed with more caution and make informed decisions when it comes to identifying spam or phishing emails.**Note:** Existing emails in a user's inbox from external senders are not tagged retroactively.",
+ "ImpactStatement": "Mail flow rules using external tagging will need to be disabled before enabling this to avoid duplicate [External] tags. The Outlook desktop client is the last to receive this update and the feature is only available for certain versions see below:Outlook for Windows: **Update 4/26/23:** _External Tag view in Outlook for Windows (matching other clients) released to production for Current Channel and Monthly Enterprise Channel in Version 2211 for builds 15831.20190 and higher. We anticipate the External tag to reach Semi-Annual Preview Channel with Version 2308 on the September 12th 2023 public update and reach Semi-Annual Enterprise Channel with Version 2308 with the January 9th 2024 public update._",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to Exchange online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-ExternalInOutlook -Enabled $true```",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to Exchange online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-ExternalInOutlook```3. For each identity verify `Enabled` is set to `True` and the `AllowList` only contains email addresses the organization has permitted to bypass external tagging.",
+ "AdditionalInformation": "",
+ "References": "https://techcommunity.microsoft.com/t5/exchange-team-blog/native-external-sender-callouts-on-email-in-outlook/ba-p/2250098:https://learn.microsoft.com/en-us/powershell/module/exchange/set-externalinoutlook?view=exchange-ps",
+ "DefaultValue": "Disabled (False)"
+ }
+ ]
+ },
+ {
+ "Id": "6.3.1",
+ "Description": "Specify the administrators and users who can install and manage add-ins for Outlook in Exchange OnlineBy default, users can install add-ins in their Microsoft Outlook Desktop client, allowing data access within the client application.",
+ "Checks": [
+ "exchange_roles_assignment_policy_addins_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.3",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Specify the administrators and users who can install and manage add-ins for Outlook in Exchange OnlineBy default, users can install add-ins in their Microsoft Outlook Desktop client, allowing data access within the client application.",
+ "RationaleStatement": "Attackers exploit vulnerable or custom add-ins to access user data. Disabling user-installed add-ins in Microsoft Outlook reduces this threat surface.",
+ "ImpactStatement": "Implementing this change will impact both end users and administrators. End users will be unable to integrate third-party applications they desire, and administrators may receive requests to grant permission for necessary third-party apps.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Exchange admin center` https://admin.exchange.microsoft.com.2. Click to expand `Roles` select `User roles`.3. Select `Default Role Assignment Policy`.4. In the properties pane on the right click on `Manage permissions`.5. Under _Other roles_ uncheck `My Custom Apps`, `My Marketplace Apps` and `My ReadWriteMailboxApps`.6. Click `Save changes`.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following command:```$policy = \"Role Assignment Policy - Prevent Add-ins\"$roles = \"MyTextMessaging\", \"MyDistributionGroups\", ` \"MyMailSubscriptions\", \"MyBaseOptions\", \"MyVoiceMail\", ` \"MyProfileInformation\", \"MyContactInformation\", \"MyRetentionPolicies\", ` \"MyDistributionGroupMembership\"New-RoleAssignmentPolicy -Name $policy -Roles $rolesSet-RoleAssignmentPolicy -id $policy -IsDefault# Assign new policy to all mailboxesGet-EXOMailbox -ResultSize Unlimited | Set-Mailbox -RoleAssignmentPolicy $policy``` **If you have other Role Assignment Policies modify the last line to filter out your custom policies**",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Exchange admin center` https://admin.exchange.microsoft.com.2. Click to expand `Roles` select `User roles`.3. Select `Default Role Assignment Policy`.4. In the properties pane on the right click on `Manage permissions`.5. Under _Other roles_ verify `My Custom Apps`, `My Marketplace Apps` and `My ReadWriteMailboxApps` are **unchecked**.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following command:```Get-EXOMailbox | Select-Object -Unique RoleAssignmentPolicy | ForEach-Object { Get-RoleAssignmentPolicy -Identity $_.RoleAssignmentPolicy | Where-Object {$_.AssignedRoles -like \"*Apps*\"}} | Select-Object Identity, @{Name=\"AssignedRoles\"; Expression={ Get-Mailbox | Select-Object -Unique RoleAssignmentPolicy | ForEach-Object { Get-RoleAssignmentPolicy -Identity $_.RoleAssignmentPolicy | Select-Object -ExpandProperty AssignedRoles | Where-Object {$_ -like \"*Apps*\"} }}}```3. Verify `My Custom Apps`, `My Marketplace Apps` and `My ReadWriteMailboxApps` are not present.**Note:** As of the current release the manage permissions link no longer displays anything when a user assigned the Global Reader role clicks on it. Global Readers as an alternative can inspect the Roles column or use the PowerShell method to perform the audit.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/add-ins-for-outlook/specify-who-can-install-and-manage-add-ins?source=recommendations:https://learn.microsoft.com/en-us/exchange/permissions-exo/role-assignment-policies",
+ "DefaultValue": "UI - `My Custom Apps`, `My Marketplace Apps`, and `My ReadWriteMailboxApps` are checkedPowerShell - `My Custom Apps` `My Marketplace Apps` and `My ReadWriteMailboxApps` are assigned"
+ }
+ ]
+ },
+ {
+ "Id": "6.5.1",
+ "Description": "Modern authentication in Microsoft 365 enables authentication features like multifactor authentication (MFA) using smart cards, certificate-based authentication (CBA), and third-party SAML identity providers. When you enable modern authentication in Exchange Online, Outlook 2016 and Outlook 2013 use modern authentication to log in to Microsoft 365 mailboxes. When you disable modern authentication in Exchange Online, Outlook 2016 and Outlook 2013 use basic authentication to log in to Microsoft 365 mailboxes.When users initially configure certain email clients, like Outlook 2013 and Outlook 2016, they may be required to authenticate using enhanced authentication mechanisms, such as multifactor authentication. Other Outlook clients that are available in Microsoft 365 (for example, Outlook Mobile and Outlook for Mac 2016) always use modern authentication to log in to Microsoft 365 mailboxes.",
+ "Checks": [
+ "exchange_organization_modern_authentication_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.5",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Modern authentication in Microsoft 365 enables authentication features like multifactor authentication (MFA) using smart cards, certificate-based authentication (CBA), and third-party SAML identity providers. When you enable modern authentication in Exchange Online, Outlook 2016 and Outlook 2013 use modern authentication to log in to Microsoft 365 mailboxes. When you disable modern authentication in Exchange Online, Outlook 2016 and Outlook 2013 use basic authentication to log in to Microsoft 365 mailboxes.When users initially configure certain email clients, like Outlook 2013 and Outlook 2016, they may be required to authenticate using enhanced authentication mechanisms, such as multifactor authentication. Other Outlook clients that are available in Microsoft 365 (for example, Outlook Mobile and Outlook for Mac 2016) always use modern authentication to log in to Microsoft 365 mailboxes.",
+ "RationaleStatement": "Strong authentication controls, such as the use of multifactor authentication, may be circumvented if basic authentication is used by Exchange Online email clients such as Outlook 2016 and Outlook 2013. Enabling modern authentication for Exchange Online ensures strong authentication mechanisms are used when establishing sessions between email clients and Exchange Online.",
+ "ImpactStatement": "Users of older email clients, such as Outlook 2013 and Outlook 2016, will no longer be able to authenticate to Exchange using Basic Authentication, which will necessitate migration to modern authentication practices.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Run the Microsoft Exchange Online PowerShell Module.2. Connect to Exchange Online using `Connect-ExchangeOnline`.3. Run the following PowerShell command:```Set-OrganizationConfig -OAuth2ClientProfileEnabled $True```",
+ "AuditProcedure": "**To audit using PowerShell:**1. Run the Microsoft Exchange Online PowerShell Module.2. Connect to Exchange Online using `Connect-ExchangeOnline`.3. Run the following PowerShell command:```Get-OrganizationConfig | Format-Table -Auto Name, OAuth*```4. Verify `OAuth2ClientProfileEnabled` is `True`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/enable-or-disable-modern-authentication-in-exchange-online",
+ "DefaultValue": "True"
+ }
+ ]
+ },
+ {
+ "Id": "6.5.2",
+ "Description": "MailTips are informative messages displayed to users while they're composing a message. While a new message is open and being composed, Exchange analyzes the message (including recipients). If a potential problem is detected, the user is notified with a MailTip prior to sending the message. Using the information in the MailTip, the user can adjust the message to avoid undesirable situations or non-delivery reports (also known as NDRs or bounce messages).",
+ "Checks": [
+ "exchange_organization_mailtips_enabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.5",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "MailTips are informative messages displayed to users while they're composing a message. While a new message is open and being composed, Exchange analyzes the message (including recipients). If a potential problem is detected, the user is notified with a MailTip prior to sending the message. Using the information in the MailTip, the user can adjust the message to avoid undesirable situations or non-delivery reports (also known as NDRs or bounce messages).",
+ "RationaleStatement": "Setting up MailTips gives a visual aid to users when they send emails to large groups of recipients or send emails to recipients not within the tenant.",
+ "ImpactStatement": "Not applicable.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```$TipsParams = @{ MailTipsAllTipsEnabled = $true MailTipsExternalRecipientsTipsEnabled = $true MailTipsGroupMetricsEnabled = $true MailTipsLargeAudienceThreshold = '25'}Set-OrganizationConfig @TipsParams```",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-OrganizationConfig | fl MailTips*```3. Verify the values for `MailTipsAllTipsEnabled`, `MailTipsExternalRecipientsTipsEnabled`, and `MailTipsGroupMetricsEnabled` are set to `True` and `MailTipsLargeAudienceThreshold` is set to an acceptable value; `25` is the default value.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/mailtips/mailtips:https://learn.microsoft.com/en-us/powershell/module/exchange/set-organizationconfig?view=exchange-ps",
+ "DefaultValue": "MailTipsAllTipsEnabled: TrueMailTipsExternalRecipientsTipsEnabled: FalseMailTipsGroupMetricsEnabled: TrueMailTipsLargeAudienceThreshold: 25"
+ }
+ ]
+ },
+ {
+ "Id": "6.5.3",
+ "Description": "This setting allows users to open certain external files while working in Outlook on the web. If allowed, keep in mind that ",
+ "Checks": [
+ "exchange_mailbox_policy_additional_storage_restricted"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.5",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting allows users to open certain external files while working in Outlook on the web. If allowed, keep in mind that ",
+ "RationaleStatement": "By default, additional storage providers are allowed in Office on the Web (such as Box, Dropbox, Facebook, Google Drive, OneDrive Personal, etc.). This could lead to information leakage and additional risk of infection from organizational non-trusted storage providers. Restricting this will inherently reduce risk as it will narrow opportunities for infection and data leakage.",
+ "ImpactStatement": "The impact associated with this change is highly dependent upon current practices in the tenant. If users do not use other storage providers, then minimal impact is likely. However, if users do regularly utilize providers outside of the tenant this will affect their ability to continue to do so.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-OwaMailboxPolicy -Identity OwaMailboxPolicy-Default -AdditionalStorageProvidersAvailable $false```",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-OwaMailboxPolicy | Format-Table Name, AdditionalStorageProvidersAvailable```3. Verify that the value returned is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/exchange/set-owamailboxpolicy?view=exchange-ps:https://support.microsoft.com/en-us/topic/3rd-party-cloud-storage-services-supported-by-office-apps-fce12782-eccc-4cf5-8f4b-d1ebec513f72",
+ "DefaultValue": "`Additional Storage Providers` - `True`"
+ }
+ ]
+ },
+ {
+ "Id": "6.5.4",
+ "Description": "This setting enables or disables authenticated client SMTP submission (SMTP AUTH) at an organization level in Exchange Online. The recommended state is `Turn off SMTP AUTH protocol for your organization` (checked).",
+ "Checks": [
+ "exchange_transport_config_smtp_auth_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "6.5",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting enables or disables authenticated client SMTP submission (SMTP AUTH) at an organization level in Exchange Online. The recommended state is `Turn off SMTP AUTH protocol for your organization` (checked).",
+ "RationaleStatement": "SMTP AUTH is a legacy protocol. Disabling it at the organization level supports the principle of least functionality and serves to further back additional controls that block legacy protocols, such as in Conditional Access. Virtually all modern email clients that connect to Exchange Online mailboxes in Microsoft 365 can do so without using SMTP AUTH.",
+ "ImpactStatement": "This enforces the default behavior, so no impact is expected unless the organization is using it globally. A per-mailbox setting exists that overrides the tenant-wide setting, allowing an individual mailbox SMTP AUTH capability for special cases.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Exchange admin center` https://admin.exchange.microsoft.com.2. Select `Settings` > `Mail flow`.3. Uncheck `Turn off SMTP AUTH protocol for your organization`.**To remediate using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Set-TransportConfig -SmtpClientAuthenticationDisabled $true```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Exchange admin center` https://admin.exchange.microsoft.com.2. Select `Settings` > `Mail flow`.3. Ensure `Turn off SMTP AUTH protocol for your organization` is checked.**To audit using PowerShell:**1. Connect to Exchange Online using `Connect-ExchangeOnline`.2. Run the following PowerShell command:```Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled```3. Verify that the value returned is `True`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission",
+ "DefaultValue": "SmtpClientAuthenticationDisabled : True"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.1",
+ "Description": "Modern authentication in Microsoft 365 enables authentication features like multifactor authentication (MFA) using smart cards, certificate-based authentication (CBA), and third-party SAML identity providers.",
+ "Checks": [
+ "sharepoint_modern_authentication_required"
+ ],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Modern authentication in Microsoft 365 enables authentication features like multifactor authentication (MFA) using smart cards, certificate-based authentication (CBA), and third-party SAML identity providers.",
+ "RationaleStatement": "Strong authentication controls, such as the use of multifactor authentication, may be circumvented if basic authentication is used by SharePoint applications. Requiring modern authentication for SharePoint applications ensures strong authentication mechanisms are used when establishing sessions between these applications, SharePoint, and connecting users.",
+ "ImpactStatement": "Implementation of modern authentication for SharePoint will require users to authenticate to SharePoint using modern authentication. This may cause a minor impact to typical user behavior.This may also prevent third-party apps from accessing SharePoint Online resources. Also, this will also block apps using the SharePointOnlineCredentials class to access SharePoint Online resources.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint.2. Click to expand `Policies` select `Access control`.3. Select `Apps that don't use modern authentication`. 4. Select the radio button for `Block access`.5. Click `Save`.**To remediate using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService -Url https://tenant-admin.sharepoint.com` replacing tenant with your value.2. Run the following SharePoint Online PowerShell command:```Set-SPOTenant -LegacyAuthProtocolsEnabled $false```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint.2. Click to expand `Policies` select `Access control`.3. Select `Apps that don't use modern authentication` and ensure that it is set to `Block access`.**To audit using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService -Url https://tenant-admin.sharepoint.com` replacing tenant with your value.2. Run the following SharePoint Online PowerShell command:```Get-SPOTenant | ft LegacyAuthProtocolsEnabled```3. Ensure the returned value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps",
+ "DefaultValue": "True (Apps that don't use modern authentication are allowed)"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.2",
+ "Description": "Entra ID B2B provides authentication and management of guests. Authentication happens via one-time passcode when they don't already have a work or school account or a Microsoft account. Integration with SharePoint and OneDrive allows for more granular control of how guest user accounts are managed in the organization's AAD, unifying a similar guest experience already deployed in other Microsoft 365 services such as Teams.**Note:** Global Reader role currently can't access SharePoint using PowerShell.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Entra ID B2B provides authentication and management of guests. Authentication happens via one-time passcode when they don't already have a work or school account or a Microsoft account. Integration with SharePoint and OneDrive allows for more granular control of how guest user accounts are managed in the organization's AAD, unifying a similar guest experience already deployed in other Microsoft 365 services such as Teams.**Note:** Global Reader role currently can't access SharePoint using PowerShell.",
+ "RationaleStatement": "External users assigned guest accounts will be subject to Entra ID access policies, such as multi-factor authentication. This provides a way to manage guest identities and control access to SharePoint and OneDrive resources. Without this integration, files can be shared without account registration, making it more challenging to audit and manage who has access to the organization's data.",
+ "ImpactStatement": "B2B collaboration is used with other Entra services so should not be new or unusual. Microsoft also has made the experience seamless when turning on integration on SharePoint sites that already have active files shared with guest users. The referenced Microsoft article on the subject has more details on this.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`2. Run the following command:```Set-SPOTenant -EnableAzureADB2BIntegration $true```",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`2. Run the following command:```Get-SPOTenant | ft EnableAzureADB2BIntegration```3. Ensure the returned value is `True`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/sharepoint-azureb2b-integration#enabling-the-integration:https://learn.microsoft.com/en-us/entra/external-id/what-is-b2b:https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps",
+ "DefaultValue": "False"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.3",
+ "Description": "The external sharing settings govern sharing for the organization overall. Each site has its own sharing setting that can be set independently, though it must be at the same or more restrictive setting as the organization. The new and existing guests option requires people who have received invitations to sign in with their work or school account (if their organization uses Microsoft 365) or a Microsoft account, or to provide a code to verify their identity. Users can share with guests already in your organization's directory, and they can send invitations to people who will be added to the directory if they sign in.The recommended state is `New and existing guests` or less permissive.",
+ "Checks": [
+ "sharepoint_external_sharing_restricted"
+ ],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "The external sharing settings govern sharing for the organization overall. Each site has its own sharing setting that can be set independently, though it must be at the same or more restrictive setting as the organization. The new and existing guests option requires people who have received invitations to sign in with their work or school account (if their organization uses Microsoft 365) or a Microsoft account, or to provide a code to verify their identity. Users can share with guests already in your organization's directory, and they can send invitations to people who will be added to the directory if they sign in.The recommended state is `New and existing guests` or less permissive.",
+ "RationaleStatement": "Forcing guest authentication on the organization's tenant enables the implementation of controls and oversight over external file sharing. When a guest is registered with the organization, they now have an identity which can be accounted for. This identity can also have other restrictions applied to it through group membership and conditional access rules.",
+ "ImpactStatement": "When using B2B integration, Entra ID external collaboration settings, such as guest invite settings and collaboration restrictions apply.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Locate the `External sharing section`.4. Under SharePoint, move the slider bar to `New and existing guests` or a less permissive level. - OneDrive will also be moved to the same level and can never be more permissive than SharePoint.**To remediate using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet to establish the minimum recommended state:```Set-SPOTenant -SharingCapability ExternalUserSharingOnly```**Note:** Other acceptable values for this parameter that are more restrictive include: `Disabled` and `ExistingExternalUserSharingOnly`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Locate the `External sharing section`.4. Under SharePoint, ensure the slider bar is set to `New and existing guests` or a less permissive level.**To audit using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Get-SPOTenant | fl SharingCapability```3. Ensure `SharingCapability` is set to one of the following values: - Value1: `ExternalUserSharingOnly` - Value2: `ExistingExternalUserSharingOnly` - Value3: `Disabled`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off:https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps",
+ "DefaultValue": "Anyone (ExternalUserAndGuestSharing)"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.4",
+ "Description": "This setting governs the global permissiveness of OneDrive content sharing in the organization. OneDrive content sharing can be restricted independent of SharePoint but can never be more permissive than the level established with SharePoint.The recommended state is `Only people in your organization`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting governs the global permissiveness of OneDrive content sharing in the organization. OneDrive content sharing can be restricted independent of SharePoint but can never be more permissive than the level established with SharePoint.The recommended state is `Only people in your organization`.",
+ "RationaleStatement": "OneDrive, designed for end-user cloud storage, inherently provides less oversight and control compared to SharePoint, which often involves additional content overseers or site administrators. This autonomy can lead to potential risks such as inadvertent sharing of privileged information by end users. Restricting external OneDrive sharing will require users to transfer content to SharePoint folders first which have those tighter controls.",
+ "ImpactStatement": "Users will be required to take additional steps to share OneDrive content or use other official channels.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Locate the `External sharing section`.4. Under OneDrive, set the slider bar to `Only people in your organization`.**To remediate using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Set-SPOTenant -OneDriveSharingCapability Disabled```**Alternative remediation method using PowerShell:**1. Connect to SharePoint Online.2. Run one of the following:```# Replace [tenant] with your tenant idSet-SPOSite -Identity https://[tenant]-my.sharepoint.com/ -SharingCapability Disabled# Or run this to filter to the specific site without supplying the tenant name.$OneDriveSite = Get-SPOSite -Filter { Url -like \"*-my.sharepoint.com/\" }Set-SPOSite -Identity $OneDriveSite -SharingCapability Disabled```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Locate the `External sharing section`.4. Under OneDrive, ensure the slider bar is set to `Only people in your organization`.**To audit using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Get-SPOTenant | fl OneDriveSharingCapability```3. Ensure the returned value is `Disabled`.**Alternative audit method using PowerShell:**1. Connect to SharePoint Online.2. Use one of the following methods:```# Replace [tenant] with your tenant idGet-SPOSite -Identity https://[tenant]-my.sharepoint.com/ | fl Url,SharingCapability# Or run this to filter to the specific site without supplying the tenant name.$OneDriveSite = Get-SPOSite -Filter { Url -like \"*-my.sharepoint.com/\" }Get-SPOSite -Identity $OneDriveSite | fl Url,SharingCapability```2. Ensure the returned value for `SharingCapability` is `Disabled`**Note:** As of March 2024, using `Get-SPOSite` with Where-Object or filtering against the entire site and then returning the `SharingCapability` parameter can result in a different value as opposed to running the cmdlet specifically against the OneDrive specific site using the -Identity switch as shown in the example.**Note 2:** The parameter `OneDriveSharingCapability` may not be yet fully available in all tenants. It is demonstrated in official Microsoft documentation as linked in the references section but not in the Set-SPOTenant cmdlet itself. If the parameter is unavailable, then either use the UI method or alternative PowerShell audit method.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps#-onedrivesharingcapability",
+ "DefaultValue": "Anyone (ExternalUserAndGuestSharing)"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.5",
+ "Description": "SharePoint gives users the ability to share files, folders, and site collections. Internal users can share with external collaborators, and with the right permissions could share to other external parties.",
+ "Checks": [
+ "sharepoint_guest_sharing_restricted"
+ ],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "SharePoint gives users the ability to share files, folders, and site collections. Internal users can share with external collaborators, and with the right permissions could share to other external parties.",
+ "RationaleStatement": "Sharing and collaboration are key; however, file, folder, or site collection owners should have the authority over what external users get shared with to prevent unauthorized disclosures of information.",
+ "ImpactStatement": "The impact associated with this change is highly dependent upon current practices. If users do not regularly share with external parties, then minimal impact is likely. However, if users do regularly share with guests/externally, minimum impacts could occur as those external users will be unable to 're-share' content.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` then select `Sharing`.3. Expand `More external sharing settings`, uncheck `Allow guests to share items they don't own`.4. Click `Save`.**To remediate using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following SharePoint Online PowerShell command:```Set-SPOTenant -PreventExternalUsersFromResharing $True```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` then select `Sharing`.3. Expand `More external sharing settings`, verify that `Allow guests to share items they don't own` is unchecked.**To audit using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following SharePoint Online PowerShell command:```Get-SPOTenant | ft PreventExternalUsersFromResharing```3. Ensure the returned value is `True`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off:https://learn.microsoft.com/en-us/sharepoint/external-sharing-overview",
+ "DefaultValue": "Checked (False)"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.6",
+ "Description": "Control sharing of documents to external domains by either blocking domains or only allowing sharing with specific named domains.",
+ "Checks": [
+ "sharepoint_external_sharing_managed"
+ ],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Control sharing of documents to external domains by either blocking domains or only allowing sharing with specific named domains.",
+ "RationaleStatement": "Attackers will often attempt to expose sensitive information to external entities through sharing, and restricting the domains that users can share documents with will reduce that surface area.",
+ "ImpactStatement": "Enabling this feature will prevent users from sharing documents with domains outside of the organization unless allowed.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint.2. Expand `Policies` then click `Sharing`.3. Expand `More external sharing settings` and check `Limit external sharing by domain`.4. Select `Add domains` to add a list of approved domains.5. Click `Save` at the bottom of the page.**To remediate using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`.2. Run the following PowerShell command:```Set-SPOTenant -SharingDomainRestrictionMode AllowList -SharingAllowedDomainList \"domain1.com domain2.com\"```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Expand `Policies` then click `Sharing`.3. Expand `More external sharing settings` and confirm that `Limit external sharing by domain` is checked.4. Verify that an accurate list of allowed domains is listed.**To audit using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`.2. Run the following PowerShell command:```Get-SPOTenant | fl SharingDomainRestrictionMode,SharingAllowedDomainList```3. Ensure that `SharingDomainRestrictionMode` is set to `AllowList` and `SharingAllowedDomainList` contains domains trusted by the organization for external sharing.",
+ "AdditionalInformation": "",
+ "References": "",
+ "DefaultValue": "Limit external sharing by domain is uncheckedSharingDomainRestrictionMode: `None`SharingDomainRestrictionMode: "
+ }
+ ]
+ },
+ {
+ "Id": "7.2.7",
+ "Description": "This setting sets the default link type that a user will see when sharing content in OneDrive or SharePoint. It does not restrict or exclude any other options.The recommended state is `Specific people (only the people the user specifies)`",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting sets the default link type that a user will see when sharing content in OneDrive or SharePoint. It does not restrict or exclude any other options.The recommended state is `Specific people (only the people the user specifies)`",
+ "RationaleStatement": "By defaulting to specific people, the user will first need to consider whether or not the content being shared should be accessible by the entire organization versus select individuals. This aids in reinforcing the concept of least privilege.",
+ "ImpactStatement": "",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to `File and folder links`.4. Set `Choose the type of link that's selected by default when users share files and folders in SharePoint and OneDrive` to `Specific people (only the people the user specifies)`**To remediate using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`.2. Run the following PowerShell command:```Set-SPOTenant -DefaultSharingLinkType Direct```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to `File and folder links`.4. Ensure that the setting `Choose the type of link that's selected by default when users share files and folders in SharePoint and OneDrive` is set to `Specific people (only the people the user specifies)`**To audit using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`.2. Run the following PowerShell command:```Get-SPOTenant | fl DefaultSharingLinkType```3. Ensure the returned value is `Direct`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps",
+ "DefaultValue": "Only people in your organization (Internal)"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.8",
+ "Description": "External sharing of content can be restricted to specific security groups. This setting is global, applies to sharing in both SharePoint and OneDrive and cannot be set at the site level in SharePoint.The recommended state is `Enabled` or `Checked`.**Note:** Users in these security groups must be allowed to invite guests in the guest invite settings in Microsoft Entra. Identity > External Identities > External collaboration settings",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "External sharing of content can be restricted to specific security groups. This setting is global, applies to sharing in both SharePoint and OneDrive and cannot be set at the site level in SharePoint.The recommended state is `Enabled` or `Checked`.**Note:** Users in these security groups must be allowed to invite guests in the guest invite settings in Microsoft Entra. Identity > External Identities > External collaboration settings",
+ "RationaleStatement": "Organizations wishing to create tighter security controls for external sharing can set this to enforce role-based access control by using security groups already defined in Microsoft Entra.",
+ "ImpactStatement": "OneDrive will also be governed by this and there is no granular control at the SharePoint site level.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to and expand `More external sharing settings`.4. Set the following: - Check `Allow only users in specific security groups to share externally` - Define `Manage security groups` in accordance with company procedure.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to and expand `More external sharing settings`.4. Ensure the following: - Verify `Allow only users in specific security groups to share externally` is checked - Verify `Manage security groups` is defined and accordance with company procedure.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/manage-security-groups",
+ "DefaultValue": "Unchecked/Undefined"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.9",
+ "Description": "This policy setting configures the expiration time for each guest that is invited to the SharePoint site or with whom users share individual files and folders with.The recommended state is `30` or less.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting configures the expiration time for each guest that is invited to the SharePoint site or with whom users share individual files and folders with.The recommended state is `30` or less.",
+ "RationaleStatement": "This setting ensures that guests who no longer need access to the site or link no longer have access after a set period of time. Allowing guest access for an indefinite amount of time could lead to loss of data confidentiality and oversight. **Note:** Guest membership applies at the Microsoft 365 group level. Guests who have permission to view a SharePoint site or use a sharing link may also have access to a Microsoft Teams team or security group.",
+ "ImpactStatement": "Site collection administrators will have to renew access to guests who still need access after 30 days. They will receive an e-mail notification once per week about guest access that is about to expire. **Note:** The guest expiration policy only applies to guests who use sharing links or guests who have direct permissions to a SharePoint site after the guest policy is enabled. The guest policy does not apply to guest users that have pre-existing permissions or access through a sharing link before the guest expiration policy is applied.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to and expand `More external sharing settings`.4. Set `Guest access to a site or OneDrive will expire automatically after this many days` to `30`**To remediate using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Set-SPOTenant -ExternalUserExpireInDays 30 -ExternalUserExpirationRequired $True```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to and expand `More external sharing settings`.4. Ensure `Guest access to a site or OneDrive will expire automatically after this many days` is checked and set to `30` or less.**To audit using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Get-SPOTenant | fl ExternalUserExpirationRequired,ExternalUserExpireInDays```3. Ensure the following values are returned: - ExternalUserExpirationRequired is `True`. - ExternalUserExpireInDays is `30` or less.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off#change-the-organization-level-external-sharing-setting:https://learn.microsoft.com/en-us/microsoft-365/community/sharepoint-security-a-team-effort",
+ "DefaultValue": "ExternalUserExpirationRequired `$false`ExternalUserExpireInDays `60` days"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.10",
+ "Description": "This setting configures if guests who use a verification code to access the site or links are required to reauthenticate after a set number of days.The recommended state is `15` or less.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting configures if guests who use a verification code to access the site or links are required to reauthenticate after a set number of days.The recommended state is `15` or less.",
+ "RationaleStatement": "By increasing the frequency of times guests need to reauthenticate this ensures guest user access to data is not prolonged beyond an acceptable amount of time.",
+ "ImpactStatement": "Guests who use Microsoft 365 in their organization can sign in using their work or school account to access the site or document. After the one-time passcode for verification has been entered for the first time, guests will authenticate with their work or school account and have a guest account created in the host's organization.**Note:** If OneDrive and SharePoint integration with Entra ID B2B is enabled as per the CIS Benchmark the one-time-passcode experience will be replaced. Please visit [Secure external sharing in SharePoint - SharePoint in Microsoft 365 | Microsoft Learn](https://learn.microsoft.com/en-US/sharepoint/what-s-new-in-sharing-in-targeted-release?WT.mc_id=365AdminCSH_spo) for more information.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to and expand `More external sharing settings`.4. Set `People who use a verification code must reauthenticate after this many days` to `15` or less.**To remediate using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Set-SPOTenant -EmailAttestationRequired $true -EmailAttestationReAuthDays 15```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to and expand `More external sharing settings`.4. Ensure `People who use a verification code must reauthenticate after this many days` is set to `15` or less.**To audit using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Get-SPOTenant | fl EmailAttestationRequired,EmailAttestationReAuthDays```3. Ensure the following values are returned: - EmailAttestationRequired `True` - EmailAttestationReAuthDays `15` or less days.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/what-s-new-in-sharing-in-targeted-release:https://learn.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off#change-the-organization-level-external-sharing-setting:https://learn.microsoft.com/en-us/entra/external-id/one-time-passcode",
+ "DefaultValue": "EmailAttestationRequired : `False`EmailAttestationReAuthDays : `30`"
+ }
+ ]
+ },
+ {
+ "Id": "7.2.11",
+ "Description": "This setting configures the permission that is selected by default for sharing link from a SharePoint site.The recommended state is `View`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting configures the permission that is selected by default for sharing link from a SharePoint site.The recommended state is `View`.",
+ "RationaleStatement": "Setting the view permission as the default ensures that users must deliberately select the edit permission when sharing a link. This approach reduces the risk of unintentionally granting edit privileges to a resource that only requires read access, supporting the principle of least privilege.",
+ "ImpactStatement": "Not applicable.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to **File and folder links**.4. Set `Choose the permission that's selected by default for sharing links` to `View`.**To remediate using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Set-SPOTenant -DefaultLinkPermission View```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click to expand `Policies` > `Sharing`.3. Scroll to **File and folder links**.4. Ensure `Choose the permission that's selected by default for sharing links` is set to `View`.**To audit using PowerShell:**1. Connect to SharePoint Online service using `Connect-SPOService`.2. Run the following cmdlet:```Get-SPOTenant | fl DefaultLinkPermission```3. Ensure the returned value is `View`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/turn-external-sharing-on-or-off#file-and-folder-links",
+ "DefaultValue": "DefaultLinkPermission : Edit"
+ }
+ ]
+ },
+ {
+ "Id": "7.3.1",
+ "Description": "By default, SharePoint online allows files that Defender for Office 365 has detected as infected to be downloaded.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.3",
+ "Profile": "E5 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "By default, SharePoint online allows files that Defender for Office 365 has detected as infected to be downloaded.",
+ "RationaleStatement": "Defender for Office 365 for SharePoint, OneDrive, and Microsoft Teams protects your organization from inadvertently sharing malicious files. When an infected file is detected that file is blocked so that no one can open, copy, move, or share it until further actions are taken by the organization's security team.",
+ "ImpactStatement": "The only potential impact associated with implementation of this setting is potential inconvenience associated with the small percentage of false positive detections that may occur.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService -Url https://tenant-admin.sharepoint.com`, replacing \"tenant\" with the appropriate value.2. Run the following PowerShell command to set the recommended value:```Set-SPOTenant –DisallowInfectedFileDownload $true```**Note:** The Global Reader role cannot access SharePoint using PowerShell according to Microsoft. See the reference section for more information.",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService -Url https://tenant-admin.sharepoint.com`, replacing \"tenant\" with the appropriate value.2. Run the following PowerShell command:```Get-SPOTenant | Select-Object DisallowInfectedFileDownload```3. Ensure the value for `DisallowInfectedFileDownload` is set to `True`.**Note:** According to Microsoft, SharePoint cannot be accessed through PowerShell by users with the Global Reader role. For further information, please refer to the reference section.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/safe-attachments-for-spo-odfb-teams-configure?view=o365-worldwide:https://learn.microsoft.com/en-us/defender-office-365/anti-malware-protection-for-spo-odfb-teams-about?view=o365-worldwide:https://learn.microsoft.com/en-us/entra/identity/role-based-access-control/permissions-reference#global-reader",
+ "DefaultValue": "False"
+ }
+ ]
+ },
+ {
+ "Id": "7.3.2",
+ "Description": "Microsoft OneDrive allows users to sign in their cloud tenant account and begin syncing select folders or the entire contents of OneDrive to a local computer. By default, this includes any computer with OneDrive already installed, whether it is Entra Joined , Entra Hybrid Joined or Active Directory Domain joined.The recommended state for this setting is `Allow syncing only on computers joined to specific domains` `Enabled: Specify the AD domain GUID(s)`",
+ "Checks": [
+ "sharepoint_onedrive_sync_restricted_unmanaged_devices"
+ ],
+ "Attributes": [
+ {
+ "Section": "7.3",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Microsoft OneDrive allows users to sign in their cloud tenant account and begin syncing select folders or the entire contents of OneDrive to a local computer. By default, this includes any computer with OneDrive already installed, whether it is Entra Joined , Entra Hybrid Joined or Active Directory Domain joined.The recommended state for this setting is `Allow syncing only on computers joined to specific domains` `Enabled: Specify the AD domain GUID(s)`",
+ "RationaleStatement": "Unmanaged devices pose a risk, since their security cannot be verified through existing security policies, brokers or endpoint protection. Allowing users to sync data to these devices takes that data out of the control of the organization. This increases the risk of the data either being intentionally or accidentally leaked.**Note:** This setting is only applicable to **Active Directory domains** when operating in a hybrid configuration. It does not apply to Entra domains. If there are devices which are only Entra ID joined, consider using a Conditional Access Policy instead.",
+ "ImpactStatement": "Enabling this feature will prevent users from using the OneDrive for Business Sync client on devices that are not joined to the domains that were defined.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click `Settings` then select `OneDrive - Sync`.3. Check the `Allow syncing only on computers joined to specific domains`.4. Use the `Get-ADDomain` PowerShell command on the on-premises server to obtain the GUID for each on-premises domain.5. Click `Save`.**To remediate using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`2. Run the following PowerShell command and provide the DomainGuids from the Get-AADomain command:```Set-SPOTenantSyncClientRestriction -Enable -DomainGuids \"786548DD-877B-4760-A749-6B1EFBC1190A; 877564FF-877B-4760-A749-6B1EFBC1190A\"```**Note:** Utilize the `-BlockMacSync:$true` parameter if you are not using conditional access to ensure Macs cannot sync.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Click `Settings` followed by `OneDrive - Sync`3. Verify that `Allow syncing only on computers joined to specific domains` is checked.4. Verify that the Active Directory domain GUIDS are listed in the box. - Use the `Get-ADDomain` PowerShell command on the on-premises server to obtain the GUID for each on-premises domain.**To audit using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService -Url https://tenant-admin.sharepoint.com`, replacing \"tenant\" with the appropriate value.2. Run the following PowerShell command:```Get-SPOTenantSyncClientRestriction | fl TenantRestrictionEnabled,AllowedDomainList```3. Ensure `TenantRestrictionEnabled` is set to `True` and `AllowedDomainList` contains the trusted domains GUIDs from the on premises environment.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/allow-syncing-only-on-specific-domains:https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenantsyncclientrestriction?view=sharepoint-ps",
+ "DefaultValue": "By default there are no restrictions applied to the syncing of OneDrive.TenantRestrictionEnabled : `False`AllowedDomainList : `{}`"
+ }
+ ]
+ },
+ {
+ "Id": "7.3.3",
+ "Description": "This setting controls custom script execution on self-service created sites.Custom scripts can allow users to change the look, feel and behavior of sites and pages. Every script that runs in a SharePoint page (whether it's an HTML page in a document library or a JavaScript in a Script Editor Web Part) always runs in the context of the user visiting the page and the SharePoint application. This means:- Scripts have access to everything the user has access to.- Scripts can access content across several Microsoft 365 services and even beyond with Microsoft Graph integration.The recommended state is `Prevent users from running custom script on self-service created sites`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "This setting controls custom script execution on self-service created sites.Custom scripts can allow users to change the look, feel and behavior of sites and pages. Every script that runs in a SharePoint page (whether it's an HTML page in a document library or a JavaScript in a Script Editor Web Part) always runs in the context of the user visiting the page and the SharePoint application. This means:- Scripts have access to everything the user has access to.- Scripts can access content across several Microsoft 365 services and even beyond with Microsoft Graph integration.The recommended state is `Prevent users from running custom script on self-service created sites`.",
+ "RationaleStatement": "Custom scripts could contain malicious instructions unknown to the user or administrator. When users are allowed to run custom script, the organization can no longer enforce governance, scope the capabilities of inserted code, block specific parts of code, or block all custom code that has been deployed. If scripting is allowed the following things can't be audited:- What code has been inserted- Where the code has been inserted- Who inserted the code**Note:** Microsoft recommends using the [SharePoint Framework](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview) instead of custom scripts.",
+ "ImpactStatement": "None - this is the default behavior.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Select `Settings`.3. At the bottom of the page click the `classic settings page` hyperlink.4. Scroll to locate the **Custom Script** section. On the right set the following: - Select `Prevent users from running custom script on self-service created sites`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `SharePoint admin center` https://admin.microsoft.com/sharepoint2. Select `Settings`.3. At the bottom of the page click the `classic settings page` hyperlink.4. Scroll to locate the **Custom Script** section. On the right ensure the following: - Verify `Prevent users from running custom script on self-service created sites` is set.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script:https://learn.microsoft.com/en-us/sharepoint/security-considerations-of-allowing-custom-script:https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-sposite?view=sharepoint-ps",
+ "DefaultValue": "Selected `Prevent users from running custom script on self-service created sites`"
+ }
+ ]
+ },
+ {
+ "Id": "7.3.4",
+ "Description": "This setting controls custom script execution on a particular site (previously called \"site collection\").Custom scripts can allow users to change the look, feel and behavior of sites and pages. Every script that runs in a SharePoint page (whether it's an HTML page in a document library or a JavaScript in a Script Editor Web Part) always runs in the context of the user visiting the page and the SharePoint application. This means:- Scripts have access to everything the user has access to.- Scripts can access content across several Microsoft 365 services and even beyond with Microsoft Graph integration.The recommended state is `DenyAddAndCustomizePages` set to `$true`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "7.3",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting controls custom script execution on a particular site (previously called \"site collection\").Custom scripts can allow users to change the look, feel and behavior of sites and pages. Every script that runs in a SharePoint page (whether it's an HTML page in a document library or a JavaScript in a Script Editor Web Part) always runs in the context of the user visiting the page and the SharePoint application. This means:- Scripts have access to everything the user has access to.- Scripts can access content across several Microsoft 365 services and even beyond with Microsoft Graph integration.The recommended state is `DenyAddAndCustomizePages` set to `$true`.",
+ "RationaleStatement": "Custom scripts could contain malicious instructions unknown to the user or administrator. When users are allowed to run custom script, the organization can no longer enforce governance, scope the capabilities of inserted code, block specific parts of code, or block all custom code that has been deployed. If scripting is allowed the following things can't be audited:- What code has been inserted- Where the code has been inserted- Who inserted the code**Note:** Microsoft recommends using the [SharePoint Framework](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview) instead of custom scripts.",
+ "ImpactStatement": "None - this is the default behavior.",
+ "RemediationProcedure": "**To remediate using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`.2. Edit the below and run for each site as needed:```Set-SPOSite -Identity -DenyAddAndCustomizePages $true```**Note:** The property `DenyAddAndCustomizePages` cannot be set on the MySite host, which is displayed with a URL like https://`tenant id`-my.sharepoint.com/",
+ "AuditProcedure": "**To audit using PowerShell:**1. Connect to SharePoint Online using `Connect-SPOService`.2. Run the following PowerShell command to show non-compliant results:```Get-SPOSite | Where-Object { $_.DenyAddAndCustomizePages -eq \"Disabled\" ` -and $_.Url -notlike \"*-my.sharepoint.com/\" } | ft Title, Url, DenyAddAndCustomizePages```3. Ensure the returned value is for `DenyAddAndCustomizePages` is `Enabled` for each site.**Note:** The property `DenyAddAndCustomizePages` cannot be set on the MySite host, which is displayed with a URL like https://`tenant id`-my.sharepoint.com/",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script:https://learn.microsoft.com/en-us/sharepoint/security-considerations-of-allowing-custom-script:https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-sposite?view=sharepoint-ps",
+ "DefaultValue": "DenyAddAndCustomizePages `$true` or `Enabled`"
+ }
+ ]
+ },
+ {
+ "Id": "8.1.1",
+ "Description": "Microsoft Teams enables collaboration via file sharing. This file sharing is conducted within Teams, using SharePoint Online, by default; however, third-party cloud services are allowed as well.**Note:** Skype for business is deprecated as of July 31, 2021 although these settings may still be valid for a period of time. See the link in the references section for more information.",
+ "Checks": [
+ "teams_external_file_sharing_restricted"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.1",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "Microsoft Teams enables collaboration via file sharing. This file sharing is conducted within Teams, using SharePoint Online, by default; however, third-party cloud services are allowed as well.**Note:** Skype for business is deprecated as of July 31, 2021 although these settings may still be valid for a period of time. See the link in the references section for more information.",
+ "RationaleStatement": "Ensuring that only authorized cloud storage providers are accessible from Teams will help to dissuade the use of non-approved storage providers.",
+ "ImpactStatement": "The impact associated with this change is highly dependent upon current practices in the tenant. If users do not use other storage providers, then minimal impact is likely. However, if users do regularly utilize providers outside of the tenant this will affect their ability to continue to do so.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Teams` select `Teams settings`.3. Set any unauthorized providers to `Off`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following PowerShell command to disable external providers that are not authorized. (the example disables Citrix Files, DropBox, Box, Google Drive and Egnyte)```$storageParams = @{ AllowGoogleDrive = $false AllowShareFile = $false AllowBox = $false AllowDropBox = $false AllowEgnyte = $false}Set-CsTeamsClientConfiguration @storageParams```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Teams` select `Teams settings`.3. Under files verify that only authorized cloud storage options are set to `On` and all others `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following to verify the recommended state:```Get-CsTeamsClientConfiguration | fl AllowDropbox,AllowBox,AllowGoogleDrive,AllowShareFile,AllowEgnyte```3. Verify that only authorized providers are set to `True` and all others `False.`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/enterprise/manage-skype-for-business-online-with-microsoft-365-powershell?view=o365-worldwide",
+ "DefaultValue": "AllowDropBox : `True`AllowBox : `True`AllowGoogleDrive : `True`AllowShareFile : `True`AllowEgnyte : `True`"
+ }
+ ]
+ },
+ {
+ "Id": "8.1.2",
+ "Description": "Teams channel email addresses are an optional feature that allows users to email the Teams channel directly.",
+ "Checks": [
+ "teams_email_sending_to_channel_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "Teams channel email addresses are an optional feature that allows users to email the Teams channel directly.",
+ "RationaleStatement": "Channel email addresses are not under the tenant’s domain and organizations do not have control over the security settings for this email address. An attacker could email channels directly if they discover the channel email address.",
+ "ImpactStatement": "Users will not be able to email the channel directly.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Teams` select `Teams settings`.3. Under email integration set `Users can send emails to a channel email address` to `Off`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsClientConfiguration -Identity Global -AllowEmailIntoChannel $false```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Teams` select `Teams settings`.3. Under email integration verify that `Users can send emails to a channel email address` is `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsClientConfiguration -Identity Global | fl AllowEmailIntoChannel```3. Ensure the returned value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/step-by-step-guides/reducing-attack-surface-in-microsoft-teams?view=o365-worldwide#restricting-channel-email-messages-to-approved-domains:https://learn.microsoft.com/en-us/powershell/module/skype/set-csteamsclientconfiguration?view=skype-ps:https://support.microsoft.com/en-us/office/send-an-email-to-a-channel-in-microsoft-teams-d91db004-d9d7-4a47-82e6-fb1b16dfd51e",
+ "DefaultValue": "On (True)"
+ }
+ ]
+ },
+ {
+ "Id": "8.2.1",
+ "Description": "This policy controls whether external domains are allowed, blocked or permitted based on an allowlist or denylist. When external domains are allowed, users in your organization can chat, add users to meetings, and use audio video conferencing with users in external organizations.The recommended state is `Allow only specific external domains` or `Block all external domains`.",
+ "Checks": [
+ "teams_external_domains_restricted"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.2",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy controls whether external domains are allowed, blocked or permitted based on an allowlist or denylist. When external domains are allowed, users in your organization can chat, add users to meetings, and use audio video conferencing with users in external organizations.The recommended state is `Allow only specific external domains` or `Block all external domains`.",
+ "RationaleStatement": "Allowlisting external domains that an organization is collaborating with allows for stringent controls over who an organization's users are allowed to make contact with.Some real-world attacks and exploits delivered via Teams over external access channels include:- DarkGate malware- Social engineering / Phishing attacks by \"Midnight Blizzard\"- GIFShell- Username enumeration",
+ "ImpactStatement": "The impact in terms of the type of collaboration users are allowed to participate in and the I.T. resources expended to manage an allowlist will increase. If a user attempts to join the inviting organization's meeting they will be prevented from joining unless they were created as a guest in EntraID or their domain was added to the allowed external domains list.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com/.2. Click to expand `Users` select `External access`.3. Under **Teams and Skype for Business users in external organizations** set `Choose which external domains your users have access to` to one of the following: - `Allow only specific external domains` - `Block all external domains` 4. Click `Save`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run one of the following commands:- To allow only specific external domains run these commands replacing the example domains with approved domains:```$list = New-Object Collections.Generic.List[String]$list.add(\"contoso.com\")$list.add(\"fabrikam.com\")Set-CsTenantFederationConfiguration -AllowFederatedUsers $true -AllowedDomainsAsAList $list```- To block all external domains:```Set-CsTenantFederationConfiguration -AllowFederatedUsers $false```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com/.2. Click to expand `Users` select `External access`.3. Under **Teams and Skype for Business users in external organization** ensure `Choose which external domains your users have access to` is set to one of the following: - `Allow only specific external domains` - `Block all external domains` **To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following command:```Get-CsTenantFederationConfiguration | fl AllowFederatedUsers,AllowedDomains```Ensure the following conditions:- State: `AllowFederatedUsers` is set to `False` **OR**, - If: `AllowFederatedUsers` is `True` then ensure `AllowedDomains` contains authorized domain names and is _not_ set to `AllowAllKnownDomains`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/trusted-organizations-external-meetings-chat?tabs=organization-settings:https://cybersecurity.att.com/blogs/security-essentials/darkgate-malware-delivered-via-microsoft-teams-detection-and-response:https://www.microsoft.com/en-us/security/blog/2023/08/02/midnight-blizzard-conducts-targeted-social-engineering-over-microsoft-teams/:https://www.bitdefender.com/blog/hotforsecurity/gifshell-attack-lets-hackers-create-reverse-shell-through-microsoft-teams-gifs/",
+ "DefaultValue": "'- AllowFederatedUsers : `True`- AllowedDomains : `AllowAllKnownDomains`"
+ }
+ ]
+ },
+ {
+ "Id": "8.2.2",
+ "Description": "This policy setting controls chats and meetings with external unmanaged Teams users (those not managed by an organization, such as Microsoft Teams (free)). The recommended state is: `People in my organization can communicate with Teams users whose accounts aren't managed by an organization` set to `Off`.",
+ "Checks": [
+ "teams_unmanaged_communication_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting controls chats and meetings with external unmanaged Teams users (those not managed by an organization, such as Microsoft Teams (free)). The recommended state is: `People in my organization can communicate with Teams users whose accounts aren't managed by an organization` set to `Off`.",
+ "RationaleStatement": "Allowing users to communicate with unmanaged Teams users presents a potential security threat as little effort is required by threat actors to gain access to a trial or free Microsoft Teams account.Some real-world attacks and exploits delivered via Teams over external access channels include:- DarkGate malware- Social engineering / Phishing attacks by \"Midnight Blizzard\"- GIFShell- Username enumeration",
+ "ImpactStatement": "Users will be unable to communicate with Teams users who are not managed by an organization.**Note:** The settings that govern chats and meetings with external unmanaged Teams users aren't available in GCC, GCC High, or DOD deployments, or in private cloud environments.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com/.2. Click to expand `Users` select `External access`.3. Scroll to **Teams accounts not managed by an organization** 4. Set `People in my organization can communicate with Teams users whose accounts aren't managed by an organization` to `Off`.5. Click `Save`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following command:```Set-CsTenantFederationConfiguration -AllowTeamsConsumer $false```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com/.2. Click to expand `Users` select `External access`.3. Scroll to **Teams accounts not managed by an organization** 4. Ensure `People in my organization can communicate with Teams users whose accounts aren't managed by an organization` is set to `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following command:```Get-CsTenantFederationConfiguration | fl AllowTeamsConsumer```Ensure `AllowTeamsConsumer` is `False`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/trusted-organizations-external-meetings-chat?tabs=organization-settings:https://cybersecurity.att.com/blogs/security-essentials/darkgate-malware-delivered-via-microsoft-teams-detection-and-response:https://www.microsoft.com/en-us/security/blog/2023/08/02/midnight-blizzard-conducts-targeted-social-engineering-over-microsoft-teams/:https://www.bitdefender.com/blog/hotforsecurity/gifshell-attack-lets-hackers-create-reverse-shell-through-microsoft-teams-gifs/",
+ "DefaultValue": "'- AllowTeamsConsumer : `True`"
+ }
+ ]
+ },
+ {
+ "Id": "8.2.3",
+ "Description": "This setting prevents external users who are not managed by an organization from initiating contact with users in the protected organization.The recommended state is to uncheck `External users with Teams accounts not managed by an organization can contact users in my organization`.**Note:** Disabling this setting is used as an additional stop gap for the previous setting which disables communication with unmanaged Teams users entirely. If an organization chooses to have an exception to **(L1) Ensure communication with unmanaged Teams users is disabled** they can do so while also disabling the ability for the same group of users to initiate contact. Disabling communication entirely will also disable the ability for unmanaged users to initiate contact.",
+ "Checks": [
+ "teams_external_users_cannot_start_conversations"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting prevents external users who are not managed by an organization from initiating contact with users in the protected organization.The recommended state is to uncheck `External users with Teams accounts not managed by an organization can contact users in my organization`.**Note:** Disabling this setting is used as an additional stop gap for the previous setting which disables communication with unmanaged Teams users entirely. If an organization chooses to have an exception to **(L1) Ensure communication with unmanaged Teams users is disabled** they can do so while also disabling the ability for the same group of users to initiate contact. Disabling communication entirely will also disable the ability for unmanaged users to initiate contact.",
+ "RationaleStatement": "Allowing users to communicate with unmanaged Teams users presents a potential security threat as little effort is required by threat actors to gain access to a trial or free Microsoft Teams account.Some real-world attacks and exploits delivered via Teams over external access channels include:- DarkGate malware- Social engineering / Phishing attacks by \"Midnight Blizzard\"- GIFShell- Username enumeration",
+ "ImpactStatement": "The impact of disabling this is very low.**Note:** Chats and meetings with external unmanaged Teams users isn't available in GCC, GCC High, or DOD deployments, or in private cloud environments.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com/.2. Click to expand `Users` select `External access`.3. Scroll to **Teams accounts not managed by an organization** 4. Uncheck `External users with Teams accounts not managed by an organization can contact users in my organization`.5. Click `Save`.**Note:** If `People in my organization can communicate with Teams users whose accounts aren't managed by an organization` is already set to `Off` then this setting will not be visible and can be considered to be in a passing state.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following command:```Set-CsTenantFederationConfiguration -AllowTeamsConsumerInbound $false```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com/.2. Click to expand `Users` select `External access`.3. Scroll to **Teams accounts not managed by an organization** 4. Ensure `External users with Teams accounts not managed by an organization can contact users in my organization` is set to `Unchecked`.**Note:** If `People in my organization can communicate with Teams users whose accounts aren't managed by an organization` is already set to `Off` then this setting will not be visible and can be considered to be in a passing state.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following command:```Get-CsTenantFederationConfiguration | fl AllowTeamsConsumerInbound```Ensure `AllowTeamsConsumerInbound` is `False`**Note:** If the previous setting `AllowTeamsConsumer` is already false then this setting is ignored and can be considered to be in a passing state.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/trusted-organizations-external-meetings-chat?tabs=organization-settings:https://cybersecurity.att.com/blogs/security-essentials/darkgate-malware-delivered-via-microsoft-teams-detection-and-response:https://www.microsoft.com/en-us/security/blog/2023/08/02/midnight-blizzard-conducts-targeted-social-engineering-over-microsoft-teams/:https://www.bitdefender.com/blog/hotforsecurity/gifshell-attack-lets-hackers-create-reverse-shell-through-microsoft-teams-gifs/",
+ "DefaultValue": "'- AllowTeamsConsumerInbound : `True`"
+ }
+ ]
+ },
+ {
+ "Id": "8.2.4",
+ "Description": "This policy setting controls chat with external unmanaged Skype users.**Note:** Skype for business is deprecated as of July 31, 2021, although these settings may still be valid for a period of time. See the link in the reference section for more information.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "8.2",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting controls chat with external unmanaged Skype users.**Note:** Skype for business is deprecated as of July 31, 2021, although these settings may still be valid for a period of time. See the link in the reference section for more information.",
+ "RationaleStatement": "Skype was deprecated July 31, 2021. Disabling communication with skype users reduces the attack surface of the organization. If a partner organization or satellite office wishes to collaborate and has not yet moved off of Skype, then a valid exception will need to be considered for this recommendation.",
+ "ImpactStatement": "Teams users will be unable to communicate with Skype users that are not in the same organization.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com/.2. Click to expand `Users` select `External access`.3. Locate **Skype users**4. Set `Allow users in my organization to communicate with Skype users` to `Off`.5. Click `Save`.**To remediate using PowerShell:**- Connect to Teams PowerShell using `Connect-MicrosoftTeams`- Run the following command:```Set-CsTenantFederationConfiguration -AllowPublicUsers $false```",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com/.2. Click to expand `Users` select `External access`.3. Locate **Skype users**4. Ensure `Allow users in my organization to communicate with Skype users` is `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following command:```Get-CsTenantFederationConfiguration | fl AllowPublicUsers```Ensure `AllowPublicUsers` is `False`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/trusted-organizations-external-meetings-chat:https://learn.microsoft.com/en-US/microsoftteams/manage-external-access?WT.mc_id=TeamsAdminCenterCSH",
+ "DefaultValue": "'- AllowPublicUsers : `True`"
+ }
+ ]
+ },
+ {
+ "Id": "8.4.1",
+ "Description": "This policy setting controls which class of apps are available for users to install.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "8.4",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "This policy setting controls which class of apps are available for users to install.",
+ "RationaleStatement": "Allowing users to install third-party or unverified apps poses a potential risk of introducing malicious software to the environment.",
+ "ImpactStatement": "Users will only be able to install approved classes of apps.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Teams apps` select `Manage apps`.3. In the upper right click `Actions` > `Org-wide app settings`.4. For `Microsoft apps` set `Let users install and use available apps by default` to `On` or less permissive.5. For `Third-party apps` set `Let users install and use available apps by default` to `Off`.6. For `Custom apps` set `Let users install and use available apps by default` to `Off`.7. For `Custom apps` set `Upload custom apps for personal use` to `Off`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Teams apps` select `Manage apps`.3. In the upper right click `Actions` > `Org-wide app settings`.4. For `Microsoft apps` verify that `Let users install and use available apps by default` is `On` or less permissive.5. For `Third-party apps` verify `Let users install and use available apps by default` is `Off`.6. For `Custom apps` verify `Let users install and use available apps by default` is `Off`.7. For `Custom apps` verify `Upload custom apps for personal use` is `Off`.**Note:** The _Global Reader_ role is not able to view the `Teams apps` blade, _Teams Administrator_ or higher is required.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/app-centric-management:https://learn.microsoft.com/en-us/defender-office-365/step-by-step-guides/reducing-attack-surface-in-microsoft-teams?view=o365-worldwide#disabling-third-party--custom-apps",
+ "DefaultValue": "Microsoft apps: OnThird-party apps: OnCustom apps: On"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.1",
+ "Description": "This policy setting can prevent anyone other than invited attendees (people directly invited by the organizer, or to whom an invitation was forwarded) from bypassing the lobby and entering the meeting.For more information on how to setup a sensitive meeting, please visit **Configure Teams meetings with protection for sensitive data - Microsoft Teams:** https://learn.microsoft.com/en-us/MicrosoftTeams/configure-meetings-sensitive-protection",
+ "Checks": [
+ "teams_meeting_anonymous_user_join_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting can prevent anyone other than invited attendees (people directly invited by the organizer, or to whom an invitation was forwarded) from bypassing the lobby and entering the meeting.For more information on how to setup a sensitive meeting, please visit **Configure Teams meetings with protection for sensitive data - Microsoft Teams:** https://learn.microsoft.com/en-us/MicrosoftTeams/configure-meetings-sensitive-protection",
+ "RationaleStatement": "For meetings that could contain sensitive information, it is best to allow the meeting organizer to vet anyone not directly sent an invite before admitting them to the meeting. This will also prevent the anonymous user from using the meeting link to have meetings at unscheduled times.**Note:** Those companies that don't normally operate at a Level 2 environment, but do deal with sensitive information, may want to consider this policy setting.",
+ "ImpactStatement": "Individuals who were not sent or forwarded a meeting invite will not be able to join the meeting automatically.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`3. Under meeting join & lobby set `Anonymous users can join a meeting` to `Off`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -AllowAnonymousUsersToJoinMeeting $false```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting join & lobby verify that `Anonymous users can join a meeting` is set to `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl AllowAnonymousUsersToJoinMeeting```3. Ensure the returned value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/MicrosoftTeams/configure-meetings-sensitive-protection",
+ "DefaultValue": "On (True)"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.2",
+ "Description": "This policy setting controls if an anonymous participant can start a Microsoft Teams meeting without someone in attendance. Anonymous users and dial-in callers must wait in the lobby until the meeting is started by someone in the organization or an external user from a trusted organization.Anonymous participants are classified as:- Participants who are not logged in to Teams with a work or school account.- Participants from non-trusted organizations (as configured in external access).- Participants from organizations where there is not mutual trust.**Note:** This setting only applies when `Who can bypass the lobby` is set to `Everyone`. If the `anonymous users can join a meeting` organization-level setting or meeting policy is `Off`, this setting only applies to dial-in callers.",
+ "Checks": [
+ "teams_meeting_anonymous_user_start_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting controls if an anonymous participant can start a Microsoft Teams meeting without someone in attendance. Anonymous users and dial-in callers must wait in the lobby until the meeting is started by someone in the organization or an external user from a trusted organization.Anonymous participants are classified as:- Participants who are not logged in to Teams with a work or school account.- Participants from non-trusted organizations (as configured in external access).- Participants from organizations where there is not mutual trust.**Note:** This setting only applies when `Who can bypass the lobby` is set to `Everyone`. If the `anonymous users can join a meeting` organization-level setting or meeting policy is `Off`, this setting only applies to dial-in callers.",
+ "RationaleStatement": "Not allowing anonymous participants to automatically join a meeting reduces the risk of meeting spamming.",
+ "ImpactStatement": "Anonymous participants will not be able to start a Microsoft Teams meeting.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting join & lobby set `Anonymous users and dial-in callers can start a meeting` to `Off`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -AllowAnonymousUsersToStartMeeting $false```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting join & lobby verify that `Anonymous users and dial-in callers can start a meeting` is set to `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl AllowAnonymousUsersToStartMeeting```3. Ensure the returned value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/anonymous-users-in-meetings:https://learn.microsoft.com/en-us/microsoftteams/who-can-bypass-meeting-lobby#overview-of-lobby-settings-and-policies",
+ "DefaultValue": "Off (False)"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.3",
+ "Description": "This policy setting controls who can join a meeting directly and who must wait in the lobby until they're admitted by an organizer, co-organizer, or presenter of the meeting.",
+ "Checks": [
+ "teams_meeting_external_lobby_bypass_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting controls who can join a meeting directly and who must wait in the lobby until they're admitted by an organizer, co-organizer, or presenter of the meeting.",
+ "RationaleStatement": "For meetings that could contain sensitive information, it is best to allow the meeting organizer to vet anyone not directly sent an invite before admitting them to the meeting. This will also prevent the anonymous user from using the meeting link to have meetings at unscheduled times.",
+ "ImpactStatement": "Individuals who are not part of the organization will have to wait in the lobby until they're admitted by an organizer, co-organizer, or presenter of the meeting. Any individual who dials into the meeting regardless of status will also have to wait in the lobby. This includes internal users who are considered unauthenticated when dialing in.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting join & lobby set `Who can bypass the lobby` to `People in my org`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -AutoAdmittedUsers \"EveryoneInCompanyExcludingGuests\"```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting join & lobby verify `Who can bypass the lobby` is set to `People in my org`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl AutoAdmittedUsers```3. Ensure the returned value is `EveryoneInCompanyExcludingGuests`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/who-can-bypass-meeting-lobby#overview-of-lobby-settings-and-policies:https://learn.microsoft.com/en-us/powershell/module/skype/set-csteamsmeetingpolicy?view=skype-ps",
+ "DefaultValue": "People in my org and guests (EveryoneInCompany)"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.4",
+ "Description": "This policy setting controls if users who dial in by phone can join the meeting directly or must wait in the lobby. Admittance to the meeting from the lobby is authorized by the meeting organizer, co-organizer, or presenter of the meeting.",
+ "Checks": [
+ "teams_meeting_dial_in_lobby_bypass_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting controls if users who dial in by phone can join the meeting directly or must wait in the lobby. Admittance to the meeting from the lobby is authorized by the meeting organizer, co-organizer, or presenter of the meeting.",
+ "RationaleStatement": "For meetings that could contain sensitive information, it is best to allow the meeting organizer to vet anyone not directly from the organization.",
+ "ImpactStatement": "Individuals who are dialing in to the meeting must wait in the lobby until a meeting organizer, co-organizer, or presenter admits them.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting join & lobby set `People dialing in can bypass the lobby` to `Off`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -AllowPSTNUsersToBypassLobby $false```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting join & lobby verify that `People dialing in can bypass the lobby` is set to `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl AllowPSTNUsersToBypassLobby```3. Ensure the value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/who-can-bypass-meeting-lobby#overview-of-lobby-settings-and-policies:https://learn.microsoft.com/en-us/powershell/module/skype/set-csteamsmeetingpolicy?view=skype-ps",
+ "DefaultValue": "Off (False)"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.5",
+ "Description": "This policy setting controls who has access to read and write chat messages during a meeting.",
+ "Checks": [
+ "teams_meeting_chat_anonymous_users_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting controls who has access to read and write chat messages during a meeting.",
+ "RationaleStatement": "Ensuring that only authorized individuals can read and write chat messages during a meeting reduces the risk that a malicious user can inadvertently show content that is not appropriate or view sensitive information.",
+ "ImpactStatement": "Only authorized individuals will be able to read and write chat messages during a meeting.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting engagement set `Meeting chat` to `On for everyone but anonymous users`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -MeetingChatEnabledType \"EnabledExceptAnonymous\"```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under meeting engagement verify that `Meeting chat` is set to `On for everyone but anonymous users`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl MeetingChatEnabledType```3. Ensure the returned value is `EnabledExceptAnonymous`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/powershell/module/skype/set-csteamsmeetingpolicy?view=skype-ps#-meetingchatenabledtype",
+ "DefaultValue": "On for everyone (Enabled)"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.6",
+ "Description": "This policy setting controls who can present in a Teams meeting. **Note:** Organizers and co-organizers can change this setting when the meeting is set up.",
+ "Checks": [
+ "teams_meeting_presenters_restricted"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting controls who can present in a Teams meeting. **Note:** Organizers and co-organizers can change this setting when the meeting is set up.",
+ "RationaleStatement": "Ensuring that only authorized individuals are able to present reduces the risk that a malicious user can inadvertently show content that is not appropriate.",
+ "ImpactStatement": "Only organizers and co-organizers will be able to present without being granted permission.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under content sharing set `Who can present` to `Only organizers and co-organizers`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -DesignatedPresenterRoleMode \"OrganizerOnlyUserOverride\"```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.3. Under content sharing verify `Who can present` is set to `Only organizers and co-organizers`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl DesignatedPresenterRoleMode```3. Ensure the returned value is `OrganizerOnlyUserOverride`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-US/microsoftteams/meeting-who-present-request-control:https://learn.microsoft.com/en-us/microsoftteams/meeting-who-present-request-control#manage-who-can-present:https://learn.microsoft.com/en-us/defender-office-365/step-by-step-guides/reducing-attack-surface-in-microsoft-teams?view=o365-worldwide#configure-meeting-settings-restrict-presenters:https://learn.microsoft.com/en-us/powershell/module/skype/set-csteamsmeetingpolicy?view=skype-ps",
+ "DefaultValue": "Everyone (EveryoneUserOverride)"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.7",
+ "Description": "This policy setting allows control of who can present in meetings and who can request control of the presentation while a meeting is underway.",
+ "Checks": [
+ "teams_meeting_external_control_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "This policy setting allows control of who can present in meetings and who can request control of the presentation while a meeting is underway.",
+ "RationaleStatement": "Ensuring that only authorized individuals and not external participants are able to present and request control reduces the risk that a malicious user can inadvertently show content that is not appropriate. External participants are categorized as follows: external users, guests, and anonymous users.",
+ "ImpactStatement": "External participants will not be able to present or request control during the meeting.**Warning:** This setting also affects webinars.**Note:** At this time, to give and take control of shared content during a meeting, both parties must be using the Teams desktop client. Control isn't supported when either party is running Teams in a browser.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.4. Under content sharing set `External participants can give or request control` to `Off`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -AllowExternalParticipantGiveRequestControl $false```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.4. Under content sharing verify that `External participants can give or request control` is `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl AllowExternalParticipantGiveRequestControl```3. Ensure the returned value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/meeting-who-present-request-control:https://learn.microsoft.com/en-us/powershell/module/skype/set-csteamsmeetingpolicy?view=skype-ps",
+ "DefaultValue": "Off (False)"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.8",
+ "Description": "This meeting policy setting controls whether users can read or write messages in external meeting chats with untrusted organizations. If an external organization is on the list of trusted organizations this setting will be ignored.",
+ "Checks": [
+ "teams_meeting_external_chat_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "This meeting policy setting controls whether users can read or write messages in external meeting chats with untrusted organizations. If an external organization is on the list of trusted organizations this setting will be ignored.",
+ "RationaleStatement": "Restricting access to chat in meetings hosted by external organizations limits the opportunity for an exploit like GIFShell or DarkGate malware from being delivered to users.",
+ "ImpactStatement": "When joining external meetings users will be unable to read or write chat messages in Teams meetings with organizations that they don't have a trust relationship with. This will completely remove the chat functionality in meetings. From an I.T. perspective both the upkeep of adding new organizations to the trusted list and the decision-making process behind whether to trust or not trust an external partner will increase time expenditure.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.4. Under meeting engagement set `External meeting chat` to `Off`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -AllowExternalNonTrustedMeetingChat $false```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.4. Under meeting engagement verify that `External meeting chat` is set to `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl AllowExternalNonTrustedMeetingChat```3. Ensure the returned value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/settings-policies-reference#meeting-engagement",
+ "DefaultValue": "On(True)"
+ }
+ ]
+ },
+ {
+ "Id": "8.5.9",
+ "Description": "This setting controls the ability for a user to initiate a recording of a meeting in progress.The recommended state is `Off` for the `Global (Org-wide default)` meeting policy.",
+ "Checks": [
+ "teams_meeting_recording_disabled"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.5",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Automated",
+ "Description": "This setting controls the ability for a user to initiate a recording of a meeting in progress.The recommended state is `Off` for the `Global (Org-wide default)` meeting policy.",
+ "RationaleStatement": "Disabling meeting recordings in the Global meeting policy ensures that only authorized users, such as organizers, co-organizers, and leads, can initiate a recording. This measure helps safeguard sensitive information by preventing unauthorized individuals from capturing and potentially sharing meeting content. Restricting recording capabilities to specific roles allows organizations to exercise greater control over what is recorded, aligning it with the meeting's confidentiality requirements.**Note:** Creating a separate policy for users or groups who are allowed to record is expected and in compliance. This control is only for the default meeting policy.",
+ "ImpactStatement": "If there are no additional policies allowing anyone to record, then recording will effectively be disabled.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.4. Under **Recording & transcription** set `Meeting recording` to `Off`.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to set the recommended state:```Set-CsTeamsMeetingPolicy -Identity Global -AllowCloudRecording $false```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Meetings` select `Meeting policies`.3. Click `Global (Org-wide default)`.4. Under **Recording & transcription** verify that `Meeting recording` is set to `Off`.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Run the following command to verify the recommended state:```Get-CsTeamsMeetingPolicy -Identity Global | fl AllowCloudRecording```3. Ensure the returned value is `False`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/microsoftteams/settings-policies-reference#recording--transcription",
+ "DefaultValue": "On (True)"
+ }
+ ]
+ },
+ {
+ "Id": "8.6.1",
+ "Description": "User reporting settings allow a user to report a message as malicious for further analysis. This recommendation is composed of 3 different settings and all be configured to pass:- **In the Teams admin center:** On by default and controls whether users are able to report messages from Teams. When this setting is turned off, users can't report messages within Teams, so the corresponding setting in the Microsoft 365 Defender portal is irrelevant.- **In the Microsoft 365 Defender portal:** On by default for new tenants. Existing tenants need to enable it. If user reporting of messages is turned on in the Teams admin center, it also needs to be turned on the Defender portal for user reported messages to show up correctly on the User reported tab on the Submissions page.- **Defender - Report message destinations:** This applies to more than just Microsoft Teams and allows for an organization to keep their reports contained. Due to how the parameters are configured on the backend it is included in this assessment as a requirement.",
+ "Checks": [
+ "teams_security_reporting_enabled",
+ "defender_chat_report_policy_configured"
+ ],
+ "Attributes": [
+ {
+ "Section": "8.6",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Automated",
+ "Description": "User reporting settings allow a user to report a message as malicious for further analysis. This recommendation is composed of 3 different settings and all be configured to pass:- **In the Teams admin center:** On by default and controls whether users are able to report messages from Teams. When this setting is turned off, users can't report messages within Teams, so the corresponding setting in the Microsoft 365 Defender portal is irrelevant.- **In the Microsoft 365 Defender portal:** On by default for new tenants. Existing tenants need to enable it. If user reporting of messages is turned on in the Teams admin center, it also needs to be turned on the Defender portal for user reported messages to show up correctly on the User reported tab on the Submissions page.- **Defender - Report message destinations:** This applies to more than just Microsoft Teams and allows for an organization to keep their reports contained. Due to how the parameters are configured on the backend it is included in this assessment as a requirement.",
+ "RationaleStatement": "Users will be able to more quickly and systematically alert administrators of suspicious malicious messages within Teams. The content of these messages may be sensitive in nature and therefore should be kept within the organization and not shared with Microsoft without first consulting company policy.**Note:** - The reported message remains visible to the user in the Teams client.- Users can report the same message multiple times.- The message sender isn't notified that messages were reported.",
+ "ImpactStatement": "Enabling message reporting has an impact beyond just addressing security concerns. When users of the platform report a message, the content could include messages that are threatening or harassing in nature, possibly stemming from colleagues.Due to this the security staff responsible for reviewing and acting on these reports should be equipped with the skills to discern and appropriately direct such messages to the relevant departments, such as Human Resources (HR).",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Messaging` select `Messaging policies`.3. Click `Global (Org-wide default)`.4. Set `Report a security concern` to `On`.5. Next, navigate to `Microsoft 365 Defender` https://security.microsoft.com/6. Click on `Settings` > `Email & collaboration` > `User reported settings`.7. Scroll to `Microsoft Teams`.8. Check `Monitor reported messages in Microsoft Teams` and `Save`.9. Set `Send reported messages to:` to `My reporting mailbox only` with reports configured to be sent to authorized staff.**To remediate using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Connect to Exchange Online PowerShell using `Connect-ExchangeOnline`.3. Run the following cmdlet:```Set-CsTeamsMessagingPolicy -Identity Global -AllowSecurityEndUserReporting $true```4. To configure the Defender reporting policies, edit and run this script:```$usersub = \"userreportedmessages@fabrikam.com\" # Change this.$params = @{ Identity = \"DefaultReportSubmissionPolicy\" EnableReportToMicrosoft = $false ReportChatMessageEnabled = $false ReportChatMessageToCustomizedAddressEnabled = $true ReportJunkToCustomizedAddress = $true ReportNotJunkToCustomizedAddress = $true ReportPhishToCustomizedAddress = $true ReportJunkAddresses = $usersub ReportNotJunkAddresses = $usersub ReportPhishAddresses = $usersub}Set-ReportSubmissionPolicy @paramsNew-ReportSubmissionRule -Name DefaultReportSubmissionRule -ReportSubmissionPolicy DefaultReportSubmissionPolicy -SentTo $usersub```",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Teams admin center` https://admin.teams.microsoft.com.2. Click to expand `Messaging` select `Messaging policies`.3. Click `Global (Org-wide default)`.4. Ensure `Report a security concern` is `On`.5. Next, navigate to `Microsoft 365 Defender` https://security.microsoft.com/6. Click on `Settings` > `Email & collaboration` > `User reported settings`.7. Scroll to `Microsoft Teams`.8. Ensure `Monitor reported messages in Microsoft Teams` is checked.9. Ensure `Send reported messages to:` is set to `My reporting mailbox only` with report email addresses defined for authorized staff.**To audit using PowerShell:**1. Connect to Teams PowerShell using `Connect-MicrosoftTeams`.2. Connect to Exchange Online PowerShell using `Connect-ExchangeOnline`.3. Run the following cmdlet for to assess Teams:```Get-CsTeamsMessagingPolicy -Identity Global | fl AllowSecurityEndUserReporting```4. Ensure the value returned is `True`.5. Run this cmdlet to assess Defender:```Get-ReportSubmissionPolicy | fl Report*```6. Ensure the output matches the following values with organization specific email addresses:```ReportJunkToCustomizedAddress : TrueReportNotJunkToCustomizedAddress : TrueReportPhishToCustomizedAddress : TrueReportJunkAddresses : {SOC@contoso.com}ReportNotJunkAddresses : {SOC@contoso.com}ReportPhishAddresses : {SOC@contoso.com}ReportChatMessageEnabled : FalseReportChatMessageToCustomizedAddressEnabled : True```",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/defender-office-365/submissions-teams?view=o365-worldwide",
+ "DefaultValue": "On (`True`)Report message destination: `Microsoft Only`"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.1",
+ "Description": "This setting allows business-to-business (B2B) guests access to Microsoft Fabric, and contents that they have permissions to. With the setting turned off, B2B guest users receive an error when trying to access Power BI.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "This setting allows business-to-business (B2B) guests access to Microsoft Fabric, and contents that they have permissions to. With the setting turned off, B2B guest users receive an error when trying to access Power BI.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "RationaleStatement": "Establishing and enforcing a dedicated security group prevents unauthorized access to Microsoft Fabric for guests collaborating in Azure that are new or assigned guest status from other applications. This upholds the principle of least privilege and uses role-based access control (RBAC). These security groups can also be used for tasks like conditional access, enhancing risk management and user accountability across the organization.",
+ "ImpactStatement": "Security groups will need to be more closely tended to and monitored.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Set `Guest users can access Microsoft Fabric` to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Ensure that `Guest users can access Microsoft Fabric` adheres to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-export-sharing",
+ "DefaultValue": "Enabled for Entire Organization"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.2",
+ "Description": "This setting helps organizations choose whether new external users can be invited to the organization through Power BI sharing, permissions, and subscription experiences. This setting only controls the ability to invite through Power BI.The recommended state is `Enabled for a subset of the organization` or `Disabled`.**Note:** To invite external users to the organization, the user must also have the Microsoft Entra Guest Inviter role.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "This setting helps organizations choose whether new external users can be invited to the organization through Power BI sharing, permissions, and subscription experiences. This setting only controls the ability to invite through Power BI.The recommended state is `Enabled for a subset of the organization` or `Disabled`.**Note:** To invite external users to the organization, the user must also have the Microsoft Entra Guest Inviter role.",
+ "RationaleStatement": "Establishing and enforcing a dedicated security group prevents unauthorized access to Microsoft Fabric for guests collaborating in Azure that are new or assigned guest status from other applications. This upholds the principle of least privilege and uses role-based access control (RBAC). These security groups can also be used for tasks like conditional access, enhancing risk management and user accountability across the organization.",
+ "ImpactStatement": "Guest user invitations will be limited to only specific employees.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Set `Users can invite guest users to collaborate through item sharing and permissions` to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Ensure that `Users can invite guest users to collaborate through item sharing and permissions` adheres to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-export-sharing:https://learn.microsoft.com/en-us/power-bi/enterprise/service-admin-azure-ad-b2b#invite-guest-users",
+ "DefaultValue": "Enabled for the entire organization"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.3",
+ "Description": "This setting allows Microsoft Entra B2B guest users to have full access to the browsing experience using the left-hand navigation pane in the organization. Guest users who have been assigned workspace roles or specific item permissions will continue to have those roles and/or permissions, even if this setting is disabled.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "This setting allows Microsoft Entra B2B guest users to have full access to the browsing experience using the left-hand navigation pane in the organization. Guest users who have been assigned workspace roles or specific item permissions will continue to have those roles and/or permissions, even if this setting is disabled.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "RationaleStatement": "Establishing and enforcing a dedicated security group prevents unauthorized access to Microsoft Fabric for guests collaborating in Entra that are new or assigned guest status from other applications. This upholds the principle of least privilege and uses role-based access control (RBAC). These security groups can also be used for tasks like conditional access, enhancing risk management and user accountability across the organization.",
+ "ImpactStatement": "Security groups will need to be more closely tended to and monitored.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Set `Guest users can browse and access Fabric content` to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Ensure that `Guest users can browse and access Fabric content` adheres to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-export-sharing",
+ "DefaultValue": "Disabled"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.4",
+ "Description": "Power BI enables users to share reports and materials directly on the internet from both the application's desktop version and its web user interface. This functionality generates a publicly reachable web link that doesn't necessitate authentication or the need to be an Entra ID user in order to access and view it.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Power BI enables users to share reports and materials directly on the internet from both the application's desktop version and its web user interface. This functionality generates a publicly reachable web link that doesn't necessitate authentication or the need to be an Entra ID user in order to access and view it.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "RationaleStatement": "When using Publish to Web anyone on the Internet can view a published report or visual. Viewing requires no authentication. It includes viewing detail-level data that your reports aggregate. By disabling the feature, restricting access to certain users and allowing existing embed codes organizations can mitigate the exposure of confidential or proprietary information.",
+ "ImpactStatement": "Depending on the organization's utilization administrators may experience more overhead managing embed codes, and requests.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Set `Publish to web` to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Choose how embed codes work` set to `Only allow existing codes` **AND** `Specific security groups` selected and defined**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Ensure that `Publish to web` adheres to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Choose how embed codes work` set to `Only allow existing codes` **AND** `Specific security groups` selected and defined**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-publish-to-web:https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-export-sharing#publish-to-web",
+ "DefaultValue": "Enabled for the entire organizationOnly allow existing codes"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.5",
+ "Description": "Power BI allows the integration of R and Python scripts directly into visuals. This feature allows data visualizations by incorporating custom calculations, statistical analyses, machine learning models, and more using R or Python scripts. Custom visuals can be created by embedding them directly into Power BI reports. Users can then interact with these visuals and see the results of the custom code within the Power BI interface.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 2",
+ "AssessmentStatus": "Manual",
+ "Description": "Power BI allows the integration of R and Python scripts directly into visuals. This feature allows data visualizations by incorporating custom calculations, statistical analyses, machine learning models, and more using R or Python scripts. Custom visuals can be created by embedding them directly into Power BI reports. Users can then interact with these visuals and see the results of the custom code within the Power BI interface.",
+ "RationaleStatement": "Disabling this feature can reduce the attack surface by preventing potential malicious code execution leading to data breaches, or unauthorized access. The potential for sensitive or confidential data being leaked to unintended users is also increased with the use of scripts.",
+ "ImpactStatement": "Use of R and Python scripting will require exceptions for developers, along with more stringent code review.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `R and Python visuals settings`.4. Set `Interact with and share R and Python visuals` to `Disabled`",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `R and Python visuals settings`.4. Ensure that `Interact with and share R and Python visuals` is `Disabled`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-r-python-visuals:https://learn.microsoft.com/en-us/power-bi/visuals/service-r-visuals:https://www.r-project.org/",
+ "DefaultValue": "Enabled"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.6",
+ "Description": "Information protection tenant settings help to protect sensitive information in the Power BI tenant. Allowing and applying sensitivity labels to content ensures that information is only seen and accessed by the appropriate users.The recommended state is `Enabled` or `Enabled for a subset of the organization`.**Note:** Sensitivity labels and protection are only applied to files exported to Excel, PowerPoint, or PDF files, that are controlled by \"Export to Excel\" and \"Export reports as PowerPoint presentation or PDF documents\" settings. All other export and sharing options do not support the application of sensitivity labels and protection.**Note 2:** There are some prerequisite steps that need to be completed in order to fully utilize labeling. See [here](https://learn.microsoft.com/en-us/power-bi/enterprise/service-security-enable-data-sensitivity-labels#licensing-and-requirements).",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Information protection tenant settings help to protect sensitive information in the Power BI tenant. Allowing and applying sensitivity labels to content ensures that information is only seen and accessed by the appropriate users.The recommended state is `Enabled` or `Enabled for a subset of the organization`.**Note:** Sensitivity labels and protection are only applied to files exported to Excel, PowerPoint, or PDF files, that are controlled by \"Export to Excel\" and \"Export reports as PowerPoint presentation or PDF documents\" settings. All other export and sharing options do not support the application of sensitivity labels and protection.**Note 2:** There are some prerequisite steps that need to be completed in order to fully utilize labeling. See [here](https://learn.microsoft.com/en-us/power-bi/enterprise/service-security-enable-data-sensitivity-labels#licensing-and-requirements).",
+ "RationaleStatement": "Establishing data classifications and affixing labels to data at creation enables organizations to discern the data's criticality, sensitivity, and value. This initial identification enables the implementation of appropriate protective measures, utilizing technologies like Data Loss Prevention (DLP) to avert inadvertent exposure and enforcing access controls to safeguard against unauthorized access.This practice can also promote user awareness and responsibility in regard to the nature of the data they interact with. Which in turn can foster awareness in other areas of data management across the organization.",
+ "ImpactStatement": "Additional license requirements like Power BI Pro are required, as outlined in the Licensed and requirements page linked in the description and references sections.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Information protection`.4. Set `Allow users to apply sensitivity labels for content` to one of these states: - State 1: `Enabled` - State 2: `Enabled` with `Specific security groups` selected and defined.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Information protection`.4. Ensure that `Allow users to apply sensitivity labels for content` adheres to one of these states: - State 1: `Enabled` - State 2: `Enabled` with `Specific security groups` selected and defined.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/power-bi/enterprise/service-security-enable-data-sensitivity-labels:https://learn.microsoft.com/en-us/fabric/governance/data-loss-prevention-overview:https://learn.microsoft.com/en-us/power-bi/enterprise/service-security-enable-data-sensitivity-labels#licensing-and-requirements",
+ "DefaultValue": "Disabled"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.7",
+ "Description": "Creating a shareable link allows a user to create a link to a report or dashboard, then add that link to an email or another messaging application. There are 3 options that can be selected when creating a shareable link:- People in your organization- People with existing access- Specific peopleThis setting solely deals with restrictions to `People in the organization`. External users by default are not included in any of these categories, and therefore cannot use any of these links regardless of the state of this setting.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Creating a shareable link allows a user to create a link to a report or dashboard, then add that link to an email or another messaging application. There are 3 options that can be selected when creating a shareable link:- People in your organization- People with existing access- Specific peopleThis setting solely deals with restrictions to `People in the organization`. External users by default are not included in any of these categories, and therefore cannot use any of these links regardless of the state of this setting.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "RationaleStatement": "While external users are unable to utilize shareable links, disabling or restricting this feature ensures that a user cannot generate a link accessible by individuals within the same organization who lack the necessary clearance to the shared data. For example, a member of Human Resources intends to share sensitive information with a particular employee or another colleague within their department. The owner would be prompted to specify either `People with existing access` or `Specific people` when generating the link requiring the person clicking the link to pass a first layer access control list. This measure along with proper file and folder permissions can help prevent unintended access and potential information leakage.",
+ "ImpactStatement": "If the setting is `Enabled` then only specific people in the organization would be allowed to create general links viewable by the entire organization.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Set `Allow shareable links to grant access to everyone in your organization` to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Ensure that `Allow shareable links to grant access to everyone in your organization` adheres to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-share-dashboards?wt.mc_id=powerbi_inproduct_sharedialog#link-settings:https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-export-sharing",
+ "DefaultValue": "Enabled for Entire Organization"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.8",
+ "Description": "Power BI admins can specify which users or user groups can share datasets externally with guests from a different tenant through the in-place mechanism. Disabling this setting prevents any user from sharing datasets externally by restricting the ability of users to turn on external sharing for datasets they own or manage.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Power BI admins can specify which users or user groups can share datasets externally with guests from a different tenant through the in-place mechanism. Disabling this setting prevents any user from sharing datasets externally by restricting the ability of users to turn on external sharing for datasets they own or manage.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "RationaleStatement": "Establishing and enforcing a dedicated security group prevents unauthorized access to Microsoft Fabric for guests collaborating in Azure that are new or from other applications. This upholds the principle of least privilege and uses role-based access control (RBAC). These security groups can also be used for tasks like conditional access, enhancing risk management and user accountability across the organization.",
+ "ImpactStatement": "Security groups will need to be more closely tended to and monitored.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Set `Allow specific users to turn on external data sharing` to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Export and Sharing settings`.4. Ensure that `Allow specific users to turn on external data sharing` adheres to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-export-sharing",
+ "DefaultValue": "Enabled for the entire organization"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.9",
+ "Description": "This setting blocks the use of resource key based authentication. The Block ResourceKey Authentication setting applies to streaming and PUSH datasets. If blocked users will not be allowed send data to streaming and PUSH datasets using the API with a resource key.The recommended state is `Enabled`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "This setting blocks the use of resource key based authentication. The Block ResourceKey Authentication setting applies to streaming and PUSH datasets. If blocked users will not be allowed send data to streaming and PUSH datasets using the API with a resource key.The recommended state is `Enabled`.",
+ "RationaleStatement": "Resource keys are a form of authentication that allows users to access Power BI resources (such as reports, dashboards, and datasets) without requiring individual user accounts. While convenient, this method bypasses the organization's centralized identity and access management controls. Enabling ensures that access to Power BI resources is tied to the organization's authentication mechanisms, providing a more secure and controlled environment.",
+ "ImpactStatement": "Developers will need to request a special exception in order to use this feature.",
+ "RemediationProcedure": "**To remediate using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Developer settings`.4. Set `Block ResourceKey Authentication` to `Enabled`",
+ "AuditProcedure": "**To audit using the UI:**1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Developer settings`.4. Ensure that `Block ResourceKey Authentication` is `Enabled`",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-developer:https://learn.microsoft.com/en-us/power-bi/connect-data/service-real-time-streaming",
+ "DefaultValue": "Disabled for the entire organization"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.10",
+ "Description": "Web apps registered in Microsoft Entra ID use an assigned service principal to access Power BI APIs without a signed-in user. This setting allows an app to use service principal authentication.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Web apps registered in Microsoft Entra ID use an assigned service principal to access Power BI APIs without a signed-in user. This setting allows an app to use service principal authentication.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "RationaleStatement": "Leaving API access unrestricted increases the attack surface in the event an adversary gains access to a Service Principal. APIs are a feature-rich method for programmatic access to many areas of Power Bi and should be guarded closely.",
+ "ImpactStatement": "Disabled is the default behavior.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Developer settings`.4. Set `Service principals can use Fabric APIs` to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Developer settings`.4. Ensure that `Service principals can use Fabric APIs` adheres to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-developer",
+ "DefaultValue": "Disabled for the entire organization"
+ }
+ ]
+ },
+ {
+ "Id": "9.1.11",
+ "Description": "Service principal profiles provide a flexible solution for apps used in a multitenancy deployment. The profiles enable customer data isolation and tighter security boundaries between customers that are utilizing the app.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "Checks": [],
+ "Attributes": [
+ {
+ "Section": "9.1",
+ "Profile": "E3 Level 1",
+ "AssessmentStatus": "Manual",
+ "Description": "Service principal profiles provide a flexible solution for apps used in a multitenancy deployment. The profiles enable customer data isolation and tighter security boundaries between customers that are utilizing the app.The recommended state is `Enabled for a subset of the organization` or `Disabled`.",
+ "RationaleStatement": "Service Principals should be restricted to a security group to limit which Service Principals can interact with profiles. This supports the principle of least privilege",
+ "ImpactStatement": "Disabled is the default behavior.",
+ "RemediationProcedure": "**To remediate using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Developer settings`.4. Set `Allow service principals to create and use profiles` to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AuditProcedure": "**To audit using the UI:** 1. Navigate to `Microsoft Fabric` https://app.powerbi.com/admin-portal2. Select `Tenant settings`.3. Scroll to `Developer settings`.4. Ensure that `Allow service principals to create and use profiles` adheres to one of these states: - State 1: `Disabled` - State 2: `Enabled` with `Specific security groups` selected and defined.**Important:** If the organization doesn't actively use this feature it is recommended to keep it `Disabled`.",
+ "AdditionalInformation": "",
+ "References": "https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-developer:https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-multi-tenancy",
+ "DefaultValue": "Disabled for the entire organization"
}
]
}
diff --git a/prowler/compliance/m365/prowler_threatscore_m365.json b/prowler/compliance/m365/prowler_threatscore_m365.json
new file mode 100644
index 0000000000..24d100064d
--- /dev/null
+++ b/prowler/compliance/m365/prowler_threatscore_m365.json
@@ -0,0 +1,1081 @@
+{
+ "Framework": "ProwlerThreatScore",
+ "Version": "1.0",
+ "Provider": "M365",
+ "Description": "Prowler ThreatScore Compliance Framework for Microsoft 365 ensures that the Microsoft 365 tenant is compliant taking into account four main pillars: Identity and Access Management, Attack Surface, Forensic Readiness and Encryption",
+ "Requirements": [
+ {
+ "Id": "1.1.1",
+ "Description": "Ensure the 'Password expiration policy' is set to 'Set passwords to never expire'",
+ "Checks": [
+ "admincenter_settings_password_never_expire"
+ ],
+ "Attributes": [
+ {
+ "Title": "Password expiration policy' is set to 'Set passwords to never expire'",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Microsoft cloud-only accounts are governed by a built-in password policy that cannot be customized. The only configurable options are the password expiration period and whether password expiration is enabled at all.",
+ "AdditionalInformation": "Modern security guidance from organizations like NIST and Microsoft recommends against forcing regular password changes unless there is a known compromise or the user has forgotten the password. Arbitrary password expiration policies can lead to weaker password practices, such as predictable patterns or reused credentials. This is especially relevant even in single-factor (password-only) scenarios. When combined with strong security measures like Multi-Factor Authentication (MFA) and Entra ID password protection, the need for periodic password changes becomes less critical. As such, it’s more effective to focus on strengthening overall authentication practices rather than enforcing frequent password resets.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "1.1.2",
+ "Description": "Ensure multifactor authentication is enabled for all users in administrative roles",
+ "Checks": [
+ "entra_admin_users_mfa_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Multifactor authentication is enabled for all users in administrative roles",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Multifactor Authentication (MFA) enhances account security by requiring users to provide at least two forms of identity verification during sign-in—such as a password and a one-time code from a mobile device, biometric scan, or authentication app. It is critical to ensure that all users in administrator roles have MFA enabled to protect privileged access.",
+ "AdditionalInformation": "MFA significantly reduces the risk of unauthorized access by requiring attackers to compromise multiple independent authentication factors. For administrative accounts—often targeted due to their elevated privileges—this additional layer of security is essential. Enforcing MFA for admins helps ensure that only authorized individuals can access sensitive systems and configurations, thereby strengthening the overall security posture of the organization.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.1.3",
+ "Description": "Ensure multifactor authentication is enabled for all users",
+ "Checks": [
+ "entra_users_mfa_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Multifactor authentication is enabled for all users",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Enable Multifactor Authentication (MFA) for all users in the Microsoft 365 tenant to strengthen identity security. Once enabled, users will be prompted to verify their identity using a second factor during sign-in. Common second factors include a one-time code sent via SMS or generated through an authentication app such as Microsoft Authenticator.",
+ "AdditionalInformation": "MFA adds a critical layer of protection by requiring users to provide two or more independent forms of authentication before access is granted. This significantly reduces the likelihood of unauthorized access, as an attacker would need to compromise both the primary credentials and the second authentication factor. Enabling MFA across all user accounts helps protect the organization from phishing, credential theft, and other identity-based threats.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.4",
+ "Description": "Enable Conditional Access policies to block legacy authentication",
+ "Checks": [
+ "entra_legacy_authentication_blocked"
+ ],
+ "Attributes": [
+ {
+ "Title": "Conditional Access policies to block legacy authentication",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Microsoft Entra ID supports a variety of authentication and authorization protocols, including legacy authentication methods. Legacy authentication typically refers to Basic Authentication, which prompts users to submit a username and password without support for modern security features like Multifactor Authentication (MFA). Several messaging and connection protocols fall under legacy authentication, including: • Authenticated SMTP – Sends authenticated email messages. • Autodiscover – Helps Outlook and Exchange ActiveSync (EAS) clients locate mailboxes. • Exchange ActiveSync (EAS) – Connects mobile devices to Exchange Online. • Exchange Online PowerShell – Requires the Exchange Online PowerShell Module when Basic Auth is blocked. • Exchange Web Services (EWS) – Used by Outlook, Outlook for Mac, and third-party applications. • IMAP4 and POP3 – Used by legacy email clients. • MAPI over HTTP (MAPI/HTTP) – Primary protocol for Outlook 2010 SP2 and newer. • Offline Address Book (OAB) – Downloads address lists for Outlook. • Outlook Anywhere (RPC over HTTP) – Legacy access method for Outlook. • Reporting Web Services – Retrieves reporting data from Exchange Online.•Universal Outlook – Used by the Windows 10 Mail and Calendar app. • Other clients – Protocols identified as using legacy authentication patterns.",
+ "AdditionalInformation": "Legacy authentication protocols do not support multifactor authentication, making them a common attack vector for credential theft and brute-force attacks. Blocking legacy authentication significantly reduces the organization’s attack surface and helps enforce modern, more secure sign-in methods that support MFA.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.5",
+ "Description": "Ensure 'Phishing-resistant MFA strength' is required for Administrators",
+ "Checks": [
+ "entra_admin_users_phishing_resistant_mfa_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Phishing-resistant MFA strength' is required for Administrators",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Authentication Strength is a Conditional Access (CA) control in Microsoft Entra ID that allows administrators to define which authentication methods are permitted for accessing specific resources. This enables a tailored approach to security—stronger methods can be enforced for sensitive assets, while less secure methods may be acceptable for lower-risk scenarios. Microsoft provides three built-in authentication strength levels: • MFA Strength • Passwordless MFA Strength • Phishing-resistant MFA Strength It is recommended that all users in administrator roles are protected by a Conditional Access policy that enforces Phishing-resistant MFA Strength. Administrators can meet this requirement by registering and using one of the following phishing-resistant authentication methods: • FIDO2 Security Key • Windows Hello for Business • Certificate-based Authentication (CBA) Note: Configuration steps for these methods (e.g., setting up FIDO2 keys) are not covered here but are available in Microsoft’s documentation. The Conditional Access policy only enforces that at least one of these methods is used. Warning: Ensure that administrators are pre-registered for one of the supported strong authentication methods before enforcing the policy. As also recommended elsewhere in the CIS Benchmark, a break-glass account should be excluded from this policy to maintain emergency access.",
+ "AdditionalInformation": "As MFA adoption increases, so does the sophistication of attacks designed to bypass it. Phishing-resistant authentication methods are more secure because they eliminate passwords from the authentication process. These methods rely on strong public/private key cryptography and ensure that authentication can only occur between trusted devices and providers—preventing login attempts from fake or phishing websites.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.1.6",
+ "Description": "Ensure a managed device is required for authentication",
+ "Checks": [
+ "entra_managed_device_required_for_authentication"
+ ],
+ "Attributes": [
+ {
+ "Title": "A managed device is required for authentication",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Conditional Access (CA) policies can be configured to enforce access controls based on whether a device is compliant or Microsoft Entra hybrid joined. These conditions allow organizations to distinguish between managed and unmanaged devices, enabling more granular enforcement of authentication policies. • The Require device to be marked as compliant control ensures that devices meet the compliance standards defined in Intune compliance policies. Devices must first be enrolled in Intune Mobile Device Management (MDM) before these policies can be evaluated. • The Require Microsoft Entra hybrid joined device control applies to devices synchronized from an on-premises Active Directory environment, marking them as trusted within the hybrid identity model. When both conditions are included in the same Conditional Access policy, the evaluation functions as an OR logic—only one of the two conditions needs to be met for the user to authenticate successfully from a device. Recommended configuration: • Require device to be marked as compliant • Require Microsoft Entra hybrid joined device • Require one of the selected controls",
+ "AdditionalInformation": "Managed devices are generally more secure due to enforced configurations such as Group Policy, mobile device compliance policies, endpoint detection and response (EDR), managed patching, and centralized alerting. Limiting access to only compliant or hybrid joined devices ensures that users are authenticating from secure environments. This policy helps mitigate the risk of compromised credentials by requiring attackers to first obtain access to a trusted device. When combined with additional CA controls—such as multi-factor authentication—it adds a further barrier to unauthorized access and strengthens the organization’s overall security posture.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.7",
+ "Description": "Ensure a managed device is required for MFA registration",
+ "Checks": [
+ "entra_managed_device_required_for_mfa_registration"
+ ],
+ "Attributes": [
+ {
+ "Title": "Managed device is required for MFA registration",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Conditional Access (CA) policies can be used to restrict the registration of multi-factor authentication (MFA) methods based on a device’s compliance status or whether it is Microsoft Entra hybrid joined. This allows organizations to enforce that only managed devices are used when users register security information.• Require device to be marked as compliant enforces that the device meets all conditions defined in Intune compliance policies. Devices must be enrolled in Intune Mobile Device Management (MDM) for this to apply. • Require Microsoft Entra hybrid joined device ensures the device has been synchronized from an on-premises Active Directory, marking it as trusted within the hybrid identity environment. When both controls are included in a Conditional Access policy for MFA registration, they operate with OR logic—only one of the conditions must be satisfied for the user to proceed. Recommended configuration: Restrict the “Register security information” operation to devices that are either compliant or Microsoft Entra hybrid joined.",
+ "AdditionalInformation": "Restricting MFA registration to trusted, managed devices significantly reduces the risk of attackers using stolen credentials to set up fraudulent authentication methods. Accounts that exist but are not yet registered for MFA are particularly vulnerable to takeover. This policy ensures that security information is registered only from secured, policy-enforced endpoints—which often include additional layers of protection such as endpoint detection, encryption, and monitoring—thereby reducing the attack surface and strengthening the organization’s identity security posture.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.8",
+ "Description": "Ensure modern authentication for SharePoint applications is required",
+ "Checks": [
+ "sharepoint_modern_authentication_required"
+ ],
+ "Attributes": [
+ {
+ "Title": "Modern authentication for SharePoint applications is required",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Modern authentication in Microsoft 365 enables advanced authentication capabilities such as multifactor authentication (MFA), smart card support, certificate-based authentication (CBA), and integration with third-party SAML identity providers. It replaces legacy authentication protocols with more secure, token-based authentication methods. It is recommended to enforce modern authentication for SharePoint applications to ensure secure access.",
+ "AdditionalInformation": "If SharePoint applications are allowed to use basic authentication, they may bypass strong authentication controls such as MFA, exposing the environment to potential compromise. Enforcing modern authentication ensures that all sessions between users, applications, and SharePoint utilize robust, policy-enforced authentication methods—significantly reducing the risk of credential theft and unauthorized access.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.9",
+ "Description": "Ensure that SharePoint guest users cannot share items they don't own",
+ "Checks": [
+ "sharepoint_guest_sharing_restricted"
+ ],
+ "Attributes": [
+ {
+ "Title": "SharePoint guest users cannot share items they don't own",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "SharePoint Online allows users to share files, folders, and entire site collections both internally and externally. With appropriate permissions, internal users can extend access to external collaborators, enabling seamless cross-organizational collaboration.",
+ "AdditionalInformation": "While external sharing supports productivity and collaboration, it’s essential that owners of files, folders, or site collections retain control over what content is shared and with whom. This helps prevent unauthorized data disclosure and ensures that sensitive information is only accessible to intended recipients. Proper sharing governance empowers data owners to make informed decisions and reinforces accountability across the organization.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "1.1.10",
+ "Description": "Ensure that 'Multi-Factor Auth Status' is 'Enabled' for all Privileged Users",
+ "Checks": [
+ "entra_admin_users_mfa_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Multi-Factor Auth Status' is 'Enabled' for all Privileged Users",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "The “Multi-Factor Authentication (MFA) Status” setting determines whether users are required to authenticate using a second factor beyond their password. For privileged users—those with administrative roles or elevated permissions—this setting should be set to “Enabled” to ensure that MFA is enforced whenever they sign in.",
+ "AdditionalInformation": "Privileged accounts have access to critical systems, sensitive data, and administrative functions that, if compromised, could lead to significant security breaches. Enforcing MFA for all privileged users greatly reduces the risk of unauthorized access by requiring attackers to compromise two or more independent authentication factors. MFA is one of the most effective defenses against phishing, credential theft, and brute-force attacks, making it a foundational control for protecting administrative accounts in any secure identity and access management strategy.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.1.11",
+ "Description": "Ensure that 'Multi-Factor Auth Status' is 'Enabled' for all Non-Privileged Users",
+ "Checks": [
+ "entra_users_mfa_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Multi-Factor Auth Status' is 'Enabled' for all Non-Privileged Users",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "The “Multi-Factor Authentication (MFA) Status” setting determines whether users must verify their identity using a second factor in addition to their password. For non-privileged users—those without administrative or elevated permissions—it is recommended that MFA is enabled across the entire user base to provide comprehensive protection against identity-based attacks.",
+ "AdditionalInformation": "While non-privileged users may not have administrative access, they still have access to email, internal systems, and potentially sensitive business data. These accounts are often targeted in phishing campaigns, credential stuffing attacks, and social engineering tactics to gain an initial foothold in the organization. Enforcing MFA for all users significantly reduces the likelihood of account compromise by requiring a second form of verification, such as a mobile app, hardware token, or one-time passcode. This broad protection is essential in a Zero Trust security model and ensures that every account—regardless of privilege—is secured against unauthorized access.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.1.12",
+ "Description": "Ensure email from external senders is identified",
+ "Checks": [
+ "exchange_external_email_tagging_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Email from external senders is identified",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "The External Callouts feature in Exchange Online introduces a native visual indicator for emails originating from outside the organization. When enabled, this feature displays a localized “External” tag within supported Outlook clients, along with additional user interface elements at the top of the message reading pane. These enhancements help users easily identify and verify the actual sender’s email address, providing critical context when evaluating incoming messages. The feature is enabled via PowerShell using the Set-ExternalInOutlook cmdlet, and typically becomes visible to end users within 24–48 hours, provided their Outlook client version supports the functionality. Note: While Exchange administrators have historically used mail flow rules to prepend “[External]” or similar text to subject lines, this method is less reliable and may not consistently apply across all message types or clients. The CIS Benchmark recommends enabling the native External tagging feature for a more consistent and secure user experience.",
+ "AdditionalInformation": "Tagging emails from external senders increases user awareness and vigilance, enabling recipients to recognize messages that originate outside the organization’s trusted environment. This visual cue acts as a simple but effective layer of defense, encouraging users to treat unexpected or suspicious emails with caution—especially those that may be phishing attempts, impersonation attacks, or social engineering lures. By clearly marking external messages, organizations enhance their users’ ability to make informed security decisions, reducing the likelihood of credential compromise, malware infection, or inadvertent data disclosure.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "1.1.13",
+ "Description": "Ensure modern authentication for Exchange Online is enabled",
+ "Checks": [
+ "exchange_organization_modern_authentication_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Modern authentication for Exchange Online is enabled",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "Modern authentication in Microsoft 365 enables advanced authentication capabilities such as multi-factor authentication (MFA), smart card-based login, certificate-based authentication (CBA), and integration with third-party SAML identity providers. When enabled for Exchange Online, clients like Outlook 2016 and Outlook 2013 utilize modern authentication protocols (such as OAuth 2.0) to securely connect to Microsoft 365 mailboxes. If modern authentication is disabled, these clients fall back to basic authentication, a legacy protocol that transmits credentials in plaintext and lacks support for MFA. Newer clients—including Outlook for Mac 2016, Outlook Mobile, and all Microsoft 365 Apps for Enterprise versions of Outlook—are built to use modern authentication by default.",
+ "AdditionalInformation": "Allowing basic authentication significantly weakens the security posture of an organization. It bypasses modern controls like multi-factor authentication, exposing user credentials to a higher risk of compromise through phishing, brute-force attacks, or session hijacking. By enabling modern authentication in Exchange Online, organizations enforce the use of strong, token-based authentication methods that are resistant to credential theft and session replay. This is critical for protecting sensitive email data and ensuring secure communication between user devices and Microsoft 365 services. Enabling modern authentication also supports compliance mandates and zero-trust principles, making it a foundational step in securing user identities and email infrastructure.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.14",
+ "Description": "Ensure anonymous users can't join a meeting",
+ "Checks": [
+ "teams_meeting_anonymous_user_join_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Anonymous users can't join a meeting",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "This policy setting in Microsoft Teams controls who is allowed to bypass the meeting lobby and directly join a meeting. When properly configured, only explicitly invited attendees—either those directly invited by the organizer or individuals to whom the invitation was intentionally forwarded—can skip the lobby and enter the meeting. All other participants, including anonymous users or those with access to the meeting link but not explicitly invited, must wait in the lobby for approval by the meeting organizer or a designated participant.",
+ "AdditionalInformation": "For meetings involving sensitive, confidential, or regulated information, it is essential to tightly control participant access. Requiring all non-invited individuals to wait in the lobby allows the organizer to review and manually admit attendees, thereby preventing unauthorized access or accidental exposure of sensitive content. Additionally, this setting prevents misuse of the meeting link by anonymous or unintended users, such as initiating unauthorized meetings outside scheduled times. Even organizations that do not regularly operate in high-security (Level 2) environments but occasionally handle sensitive data should consider enabling this policy to reinforce data protection and meeting integrity. By limiting automatic entry to only verified, intended participants, this control supports secure collaboration, reduces risk of information leakage, and enhances confidence in Microsoft Teams as a platform for sensitive communications.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.15",
+ "Description": "Ensure anonymous users and dial-in callers can't start a meeting",
+ "Checks": [
+ "teams_meeting_anonymous_user_start_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Anonymous users and dial-in callers can't start a meeting",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "This policy setting in Microsoft Teams determines whether anonymous participants can start a meeting before a verified user from the organization or a trusted external organization has joined. When this setting is enabled, anonymous users and dial-in callers must wait in the meeting lobby until the meeting is initiated by an authenticated participant. Anonymous participants are defined as: • Users not signed in with a work or school account • Participants from non-trusted organizations, based on external access configuration • Individuals from organizations without mutual trust relationships Note: This setting only applies when the “Who can bypass the lobby” policy is set to Everyone. If the broader setting “Anonymous users can join a meeting” is disabled at the organizational level, this policy applies only to dial-in callers.",
+ "AdditionalInformation": "Disallowing anonymous participants from starting meetings helps mitigate the risk of meeting abuse, such as spamming, hijacking, or unauthorized use of Teams meetings for unintended purposes. Anonymous users pose a higher risk because their identities cannot be verified, and they are not subject to organizational controls or compliance policies. Requiring an authenticated user to start the meeting ensures that someone with verified access and accountability is present before the session begins. This adds a layer of security and governance, especially in meetings that could involve sensitive discussions or are exposed to a wide range of external participants. Enforcing this policy supports a secure and controlled meeting environment and aligns with best practices for preventing unauthorized or disruptive activity in collaborative platforms.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.16",
+ "Description": "Ensure only people in my org can bypass the lobby",
+ "Checks": [
+ "teams_meeting_external_lobby_bypass_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Only people in my org can bypass the lobby",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "This policy setting in Microsoft Teams defines who can bypass the meeting lobby and join a meeting directly, versus who must wait in the lobby until admitted by a meeting organizer, co-organizer, or designated presenter. Options include allowing access to everyone, people in your organization, trusted external organizations, or only invited users.",
+ "AdditionalInformation": "Restricting direct access to meetings—particularly those that involve sensitive, confidential, or regulated information—ensures that only authorized and expected attendees can participate. Requiring participants to wait in the lobby gives meeting organizers the opportunity to vet and approve each attendee before admitting them. This policy also helps prevent unauthorized access through forwarded meeting links and reduces the risk of anonymous users joining meetings at unscheduled times, which can lead to disruptions or even security breaches. Enforcing lobby controls aligns with zero trust principles and is a best practice for maintaining the integrity and confidentiality of Teams meetings.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.1.17",
+ "Description": "Ensure users dialing in can't bypass the lobby",
+ "Checks": [
+ "teams_meeting_dial_in_lobby_bypass_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Users dialing in can't bypass the lobby",
+ "Section": "1. IAM",
+ "SubSection": "1.1 Authentication",
+ "AttributeDescription": "This policy setting in Microsoft Teams determines whether dial-in participants—users who join meetings by phone—can bypass the lobby and join directly, or if they must wait in the lobby until admitted by a meeting organizer, co-organizer, or presenter.",
+ "AdditionalInformation": "Dial-in participants typically cannot be authenticated in the same way as users joining via Teams apps or web clients, making it more difficult to verify their identity. For meetings that may involve sensitive, confidential, or regulated information, it is essential that the meeting organizer has the opportunity to manually vet and admit these participants.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.2.1",
+ "Description": "Ensure that only organizationally managed/approved public groups exist",
+ "Checks": [
+ "admincenter_groups_not_public_visibility"
+ ],
+ "Attributes": [
+ {
+ "Title": "Only organizationally managed/approved public groups exist",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "Microsoft 365 Groups serve as the foundation for collaboration across Microsoft 365, providing shared resources (e.g., Outlook inbox, SharePoint site, Teams workspace) to group members. While various group types exist, this recommendation specifically addresses Microsoft 365 Groups. By default, when a Microsoft 365 Group is created via the admin panel, its privacy setting is set to “Public”, meaning anyone in the organization can access its content unless the setting is manually changed.",
+ "AdditionalInformation": "To protect sensitive organizational data, it’s important to ensure that only authorized and managed public groups exist. Public groups expose their content to all users in the organization through several access paths: • Users can add themselves to a public group using the Azure portal. • Users can request access via the Access Panel’s Groups app—this sends a request to the group owner but still grants immediate access. • Users may discover and directly access the associated SharePoint site via a guessable or easily discoverable URL.While admins are notified when Azure Portal access is used, other methods may not generate alerts. If group privacy settings are not properly managed, sensitive data could be inadvertently exposed. For this reason, privacy settings should be reviewed and adjusted to Private by default unless a public setting is explicitly required and approved.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.2",
+ "Description": "Ensure a dynamic group for guest users is created",
+ "Checks": [
+ "entra_dynamic_group_for_guests_created"
+ ],
+ "Attributes": [
+ {
+ "Title": "Dynamic group for guest users is created",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "A dynamic group in Microsoft Entra ID automatically manages group membership based on user attributes such as userType, department, or country/region. Administrators can define rules to ensure that users meeting specific criteria are added to—or removed from—a group without manual intervention. The recommended configuration is to create a dynamic group that specifically includes guest accounts.",
+ "AdditionalInformation": "Dynamic groups streamline user management by automating group assignments. By including guest users in a dynamic group, organizations can consistently apply existing Conditional Access policies, access controls, and other security measures. This ensures that new guest accounts are governed by the same security standards as existing ones, reducing the risk of misconfiguration or oversight.",
+ "LevelOfRisk": 3
+ }
+ ]
+ },
+ {
+ "Id": "1.2.3",
+ "Description": "entra_managed_device_required_for_mfa_registration",
+ "Checks": [
+ "entra_admin_consent_workflow_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Admin consent workflow is enabled",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "The admin consent workflow provides a secure and controlled process for granting access to applications that require administrator approval. When a user attempts to access an application but lacks permission to grant consent, they can submit a request for review. This request is sent via email to designated administrators, who act as reviewers. Once a decision is made, the user is notified of the outcome.",
+ "AdditionalInformation": "The admin consent workflow (Preview) enhances security by ensuring that access to sensitive applications is reviewed and approved by authorized administrators. It prevents users from unintentionally granting permissions to potentially risky applications while maintaining a clear approval process with full visibility and accountability.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.4",
+ "Description": "Enable Identity Protection user risk policies",
+ "Checks": [
+ "entra_identity_protection_user_risk_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Identity Protection user risk policies",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "Microsoft Entra ID Protection uses user risk policies to evaluate the likelihood that a user account has been compromised. These policies assign a risk level (low, medium, or high) based on detected anomalies, such as unfamiliar sign-ins, leaked credentials, or atypical behavior. Note: While Entra ID Protection includes built-in user risk policies, Microsoft strongly recommends implementing risk-based Conditional Access (CA) policies instead of relying on the older, legacy policy model. The modern CA approach offers several key advantages:• Access to enhanced diagnostic and troubleshooting data • Integration with report-only mode for safe testing • Support for automation via Microsoft Graph API • Greater flexibility through advanced Conditional Access attributes, such as sign-in frequency and session controls",
+ "AdditionalInformation": "Enabling user risk policies through Conditional Access allows organizations to automatically respond to suspected account compromise by enforcing real-time controls—such as blocking access or requiring secure reauthentication. This proactive approach enhances the organization’s ability to detect and mitigate identity-based threats before they escalate.",
+ "LevelOfRisk": 3
+ }
+ ]
+ },
+ {
+ "Id": "1.2.5",
+ "Description": "Enable Identity Protection sign-in risk policies ",
+ "Checks": [
+ "entra_identity_protection_sign_in_risk_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Identity Protection sign-in risk policies ",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "Microsoft Entra ID Protection evaluates sign-in risk by detecting potentially suspicious sign-in attempts—both in real time and through offline analysis. A risky sign-in indicates that the attempt may not have been performed by the legitimate account owner, based on signals such as unusual location, device anomalies, or unfamiliar sign-in behavior. Note: Although Microsoft Entra ID Protection includes built-in sign-in risk policies, it is strongly recommended to implement risk-based policies using Conditional Access instead of relying on legacy risk policies. The Conditional Access method provides several key advantages: • Access to enhanced diagnostic and investigation data • Ability to test with report-only mode • Integration with Microsoft Graph API for automation and management • Use of additional CA attributes such as sign-in frequency and session controls",
+ "AdditionalInformation": "Enabling a sign-in risk Conditional Access policy allows organizations to automatically challenge suspicious sign-ins with multi-factor authentication (MFA). This reduces the likelihood of unauthorized access by requiring an additional verification step whenever unusual activity is detected, strengthening identity protection and reducing the risk of account compromise.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "1.2.6",
+ "Description": "Ensure external content sharing is restricted",
+ "Checks": [
+ "sharepoint_external_sharing_restricted"
+ ],
+ "Attributes": [
+ {
+ "Title": "External content sharing is restricted",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "External sharing settings in Microsoft 365 govern how content is shared outside the organization. While each SharePoint site can have its own sharing configuration, it must be equal to or more restrictive than the organization-wide setting. The recommended configuration is “New and existing guests” or a more restrictive option. This setting requires external users to either sign in with a Microsoft 365 work or school account, a personal Microsoft account, or verify their identity using a one-time passcode. Users can share content with existing guests in the directory or invite new guests, who will be added to the directory upon sign-in.",
+ "AdditionalInformation": "Requiring guest authentication ensures that external users are registered and identifiable within the organization’s directory. This allows administrators to apply governance controls—such as Conditional Access policies, group-based restrictions, and activity monitoring—to external identities. By enforcing authenticated sharing, organizations maintain visibility and control over externally shared resources, reducing the risk of unauthorized data access and supporting compliance with security and privacy policies.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.7",
+ "Description": "Ensure SharePoint external sharing is managed through domain whitelist/blacklists",
+ "Checks": [
+ "sharepoint_external_sharing_managed"
+ ],
+ "Attributes": [
+ {
+ "Title": "SharePoint external sharing is managed through domain whitelist/blacklists",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "Organizations can control how documents are shared externally by configuring domain-based restrictions. This can be done by either blocking specific external domains or allowing sharing only with a defined list of trusted domains. These settings apply to services like SharePoint and OneDrive to help manage external collaboration securely.",
+ "AdditionalInformation": "Restricting document sharing to approved domains reduces the risk of accidental or malicious data exposure. Attackers may attempt to exfiltrate sensitive information by sharing it with external entities. By limiting sharing to trusted domains, organizations minimize their external attack surface and maintain greater control over data flow.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.8",
+ "Description": "Ensure inbound anti-spam policies do not contain allowed domains",
+ "Checks": [
+ "defender_antispam_policy_inbound_no_allowed_domains"
+ ],
+ "Attributes": [
+ {
+ "Title": "Inbound anti-spam policies do not contain allowed domains",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "Anti-spam protection in Exchange Online leverages configurable policies to reduce the volume of unwanted emails—such as junk, bulk, and phishing messages—received by users. These policies include several configurable lists that influence how email from specific sources is treated:• Allowed Senders List • Allowed Domains List • Blocked Senders List • Blocked Domains List While these features offer flexibility, it is strongly recommended not to define any entries in the Allowed Domains List in a production environment.",
+ "AdditionalInformation": "When a sender or domain is added to the Allowed Domains List, their messages bypass key security checks—including spam filtering and authentication mechanisms like SPF, DKIM, and DMARC—unless flagged as containing malware or high-confidence phishing. This introduces a significant security risk, as attackers may exploit these exceptions to deliver malicious emails directly to users’ inboxes. The risk is especially high when common or widely used domains are allow-listed, as these are frequent targets for spoofing attempts. Moreover, Microsoft’s official guidance clearly states that allowed domains should only be used for testing purposes, not for general use in production environments. To maintain a strong email security posture, organizations should avoid defining Allowed Domains and instead rely on more controlled methods such as block lists, quarantine policies, or targeted safe sender configurations for trusted entities.",
+ "LevelOfRisk": 1
+ }
+ ]
+ },
+ {
+ "Id": "1.2.9",
+ "Description": "Ensure all forms of mail forwarding are blocked and/or disabled",
+ "Checks": [
+ "defender_antispam_outbound_policy_forwarding_disabled",
+ "exchange_transport_rules_mail_forwarding_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "All forms of mail forwarding are blocked and/or disabled",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "Exchange Online provides multiple mechanisms to manage and control the flow of outbound email messages, helping organizations prevent unauthorized data exfiltration. These mechanisms include: • Remote Domain Settings • Transport Rules • Anti-Spam Outbound Policies These tools work in tandem to control and monitor various email forwarding methods that users or attackers may exploit, such as: • Inbox rules configured in Outlook • Automatic forwarding via Out of Office (OOF) rules • Forwarding settings in Outlook Web Access (OWA) using ForwardingSmtpAddress • Admin-defined forwarding in the Exchange Admin Center (EAC) using ForwardingAddress • Automated forwarding using Power Automate / Microsoft Flow To effectively reduce the risk of unauthorized data leaks, organizations should implement both a Transport Rule and an Outbound Anti-Spam Policy to block automatic mail forwarding. Note: If any exclusions are required (e.g., for trusted third-party systems or compliance tools), they should be strictly defined and approved in accordance with organizational policy.",
+ "AdditionalInformation": "",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.10",
+ "Description": "Ensure mail transport rules do not whitelist specific domains",
+ "Checks": [
+ "exchange_transport_rules_whitelist_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Mail transport rules do not whitelist specific domains",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "Mail flow rules (also known as transport rules) in Exchange Online allow administrators to inspect, modify, or block email messages as they pass through the organization. These rules can be configured based on a wide range of conditions—such as sender, recipient, subject content, or attachment type—and can enforce actions including message redirection, header modification, or delivery rejection. While transport rules offer powerful control over email behavior, they must be implemented with caution—particularly when it comes to whitelisting domains or bypassing standard filtering mechanisms.",
+ "AdditionalInformation": "Whitelisting external domains through transport rules can disable critical security checks such as anti-malware scanning, phishing detection, and sender authentication (e.g., SPF, DKIM, DMARC). If a trusted domain is later compromised—or was malicious from the start—this bypass can allow attackers to deliver malicious content directly to user inboxes without scrutiny. By avoiding broad or permanent domain whitelisting in transport rules, organizations preserve the integrity of their email filtering and reduce the risk of successful phishing campaigns, malware delivery, or data exfiltration originating from seemingly trusted sources. Transport rules should be reviewed regularly, and any exceptions must be justified, narrowly scoped, and documented according to organizational policy.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.11",
+ "Description": "Ensure MailTips are enabled for end users",
+ "Checks": [
+ "exchange_organization_mailtips_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "MailTips are enabled for end users",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "MailTips are real-time, context-aware notifications displayed to users as they compose email messages in Outlook. These tips are generated by Exchange while a message is being drafted and are based on an analysis of the email’s content and recipient list. If Exchange detects potential issues—such as the message being sent to a large distribution group, an external recipient, or someone who is out of office—it presents the user with a MailTip alert before the message is sent.This proactive feedback helps users avoid common issues like sending sensitive information to unintended recipients, triggering non-delivery reports (NDRs), or violating communication policies.",
+ "AdditionalInformation": "Enabling MailTips provides valuable visual cues that promote user awareness and responsible communication. For example, users are warned when they are sending emails to external recipients or large distribution lists, which helps prevent data leakage, unintentional over-sharing, and excessive email traffic. MailTips serve as a lightweight but effective safeguard by nudging users to review recipients and message context before sending, reducing the risk of human error. In regulated or security-conscious environments, this feature reinforces compliance by helping users adhere to organizational communication policies in real time.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "1.2.12",
+ "Description": "Ensure users can't send emails to a channel email address",
+ "Checks": [
+ "teams_email_sending_to_channel_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Users can't send emails to a channel email address",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "Microsoft Teams channel email addresses are an optional feature that enables users to send emails directly into a Teams channel. When enabled, each channel is assigned a unique email address that users can use to forward messages, share content, or initiate discussions from outside Teams. While this can enhance collaboration by bridging email and Teams-based communication, the generated email addresses are typically not part of the organization’s primary domain, and their usage is subject to broader Microsoft 365 infrastructure settings.",
+ "AdditionalInformation": "Channel email addresses introduce potential security and governance concerns, as they are not managed under the organization’s domain and are exposed to external communication. If an attacker is able to discover or guess a channel’s email address, they could send messages directly into Teams, potentially introducing phishing links, malicious attachments, or inappropriate content into collaborative spaces. Furthermore, since organizations have limited control over the security configurations and exposure of these addresses, they may become a blind spot in security monitoring and email filtering. Disabling or restricting the use of Teams channel email addresses helps reduce the attack surface, prevent unauthorized message injection, and strengthen the overall security posture of Microsoft Teams.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.13",
+ "Description": "Ensure external domains are restricted in the Teams admin center",
+ "Checks": [
+ "teams_external_domains_restricted"
+ ],
+ "Attributes": [
+ {
+ "Title": "External domains are restricted in the Teams admin center",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "This policy governs how external access is managed in Microsoft Teams, specifically determining whether users in your organization can communicate and collaborate with individuals from external domains. Administrators can configure this setting to: • Allow communication with all external domains • Block all external domains • Allow only specific (approved) external domains using an allowlist When external access is enabled, users can chat, invite external participants to meetings, and use audio/video conferencing with users in other Microsoft 365 or federated organizations. Recommended Configuration: To reduce exposure, it is recommended to either allow only specific external domains with whom collaboration is necessary or block all external domains entirely.",
+ "AdditionalInformation": "While external collaboration can be valuable, unrestricted access to external domains introduces significant security risks. Without proper controls, users may inadvertently engage with untrusted or malicious entities, opening the door to phishing, social engineering, malware delivery, or data exfiltration. Notable threats that have leveraged Teams’ external access features include: • DarkGate malware distributed through malicious Teams messages • Phishing and impersonation campaigns by actors like Midnight Blizzard (APT29) • GIFShell, a technique for covert communication using GIFs within Teams • Username enumeration, allowing attackers to confirm the existence of user accounts By allowlisting only trusted domains, organizations retain the benefits of external collaboration while maintaining tight control over who can interact with internal users. This aligns with zero trust principles and helps ensure that external communication is both intentional and secure.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.14",
+ "Description": "Ensure communication with unmanaged Teams users is disabled",
+ "Checks": [
+ "teams_unmanaged_communication_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Communication with unmanaged Teams users is disabled",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "This policy setting in Microsoft Teams controls whether users in your organization can chat or join meetings with external Teams users who are not affiliated with a managed organization—for example, users of Microsoft Teams (free) or those without an associated Microsoft Entra ID (formerly Azure AD) tenant. These unmanaged accounts operate outside of enterprise governance and lack the administrative oversight, compliance enforcement, and security controls typically applied in organizational environments. Recommended Configuration: Set the policy to “Off” for “People in my organization can communicate with Teams users whose accounts aren’t managed by an organization” to block communication with unmanaged Teams users.",
+ "AdditionalInformation": "Allowing communication with unmanaged external Teams users introduces a significant security risk. Since anyone can register for a free Teams account, attackers can easily create unmanaged identities and attempt to initiate contact with internal users. These interactions can be used to deliver malicious content, perform social engineering, or carry out reconnaissance. Documented attacks exploiting this communication channel include: • DarkGate malware delivery via malicious messages • Phishing and impersonation campaigns attributed to Midnight Blizzard (APT29) • GIFShell, a technique allowing covert exfiltration via GIFs in Teams chats • Username enumeration, enabling attackers to identify valid users in an organization Disabling communication with unmanaged Teams users helps enforce a zero trust posture, ensuring that all external interactions occur only with verified and trusted organizations under enforceable security policies. This reduces the organization’s exposure to external threats, protects sensitive communications, and upholds compliance standards.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.2.15",
+ "Description": "Ensure external Teams users cannot initiate conversations",
+ "Checks": [
+ "teams_external_users_cannot_start_conversations"
+ ],
+ "Attributes": [
+ {
+ "Title": "External Teams users cannot initiate conversations",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "This policy setting in Microsoft Teams controls whether external users with unmanaged Teams accounts—such as those using Microsoft Teams (free)—can initiate conversations with users in your organization. These unmanaged users do not belong to a verified Microsoft Entra (Azure AD) tenant and are not subject to organizational controls or governance. Recommended Configuration: Uncheck the option “External users with Teams accounts not managed by an organization can contact users in my organization” to prevent these users from initiating communication. This setting is designed as an additional safeguard to complement the broader policy that disables communication with unmanaged Teams users entirely. In scenarios where an organization allows limited interaction with such users, this control ensures that only internal users can initiate communication, further reducing exposure to unsolicited or malicious contact attempts.",
+ "AdditionalInformation": "Enabling unmanaged Teams users to initiate contact with internal users poses a significant security risk, as anyone can easily register for a free Teams account with minimal identity verification. Threat actors can exploit this feature to deliver malicious content, impersonate legitimate contacts, or conduct reconnaissance by probing user availability and behavior. Notable real-world threats facilitated through external Teams access include:• DarkGate malware delivered via malicious chats • Social engineering and phishing campaigns by advanced threat actors such as Midnight Blizzard (APT29) • GIFShell, a covert data exfiltration method using GIFs in Teams • Username enumeration, enabling discovery of valid user accounts within an organization By preventing unmanaged external users from initiating conversations, organizations can better protect their internal users from unsolicited and potentially harmful contact attempts. This policy reinforces a defense-in-depth strategy, ensuring that even in exceptional cases where limited unmanaged communication is permitted, external contact remains tightly controlled and monitored.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.2.16",
+ "Description": "Ensure meeting chat does not allow anonymous users",
+ "Checks": [
+ "teams_meeting_chat_anonymous_users_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Meeting chat does not allow anonymous users",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "This policy setting in Microsoft Teams controls who can read and write messages in the meeting chat. It allows administrators or meeting organizers to specify whether chat is available to everyone, only specific roles (such as presenters), or is disabled entirely for participants. This setting applies to chat interactions during the meeting and helps manage the flow and visibility of information shared in the chat pane.",
+ "AdditionalInformation": "Limiting chat access to only authorized participants helps prevent the unintended disclosure of sensitive information and reduces the risk of inappropriate or disruptive content being shared during a meeting. In meetings involving confidential topics or external participants, restricting chat can safeguard against data leakage and maintain focus on the meeting agenda.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "1.2.17",
+ "Description": "Ensure only organizers and co-organizers can present",
+ "Checks": [
+ "teams_meeting_presenters_restricted"
+ ],
+ "Attributes": [
+ {
+ "Title": "Only organizers and co-organizers can present",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "This policy setting in Microsoft Teams determines who is allowed to present content during a meeting. Presenters have elevated permissions that allow them to share their screen, display files, manage participants, and control other collaborative features. This setting can be configured at the organizational or meeting level to allow only organizers, co-organizers, or a designated group of participants to present.",
+ "AdditionalInformation": "Restricting presentation privileges to authorized individuals helps ensure that only trusted participants can share content with the group. This minimizes the risk of inappropriate, disruptive, or unapproved material being displayed, whether intentionally or accidentally.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.18",
+ "Description": "Ensure external participants can't give or request control",
+ "Checks": [
+ "teams_meeting_external_control_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "External participants can't give or request control",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "This policy setting in Microsoft Teams provides control over who can present content and who can request control of shared content during a meeting. It enables administrators and meeting organizers to limit these privileges to internal, trusted participants, while restricting or blocking external participants—including guests, external users, and anonymous users—from taking control of the presentation or initiating content sharing.",
+ "AdditionalInformation": "Restricting presentation and control capabilities to authorized, internal participants significantly reduces the risk of accidental or malicious content sharing, interruptions, or abuse of meeting privileges. External participants—including guests, federated users, and anonymous joiners—may not be subject to the same identity verification or policy enforcement as users within the organization.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.2.19",
+ "Description": "Ensure meeting recording is off by default",
+ "Checks": [
+ "teams_meeting_recording_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Meeting recording is off by default",
+ "Section": "1. IAM",
+ "SubSection": "1.2 Authorization",
+ "AttributeDescription": "This policy setting in Microsoft Teams determines whether a user is allowed to initiate the recording of a meeting in progress. When enabled, participants with the appropriate permissions can start recording audio, video, and screen-sharing content during the session.",
+ "AdditionalInformation": "Restricting the ability to start a meeting recording ensures that only authorized individuals—such as organizers, co-organizers, team leads, or designated presenters—can capture meeting content. This is especially important for meetings that involve sensitive, confidential, or regulated information, where inappropriate or unauthorized recording could lead to data exposure, compliance violations, or reputational harm.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.3.1",
+ "Description": "Ensure that between two and four global admins are designated",
+ "Checks": [
+ "admincenter_users_between_two_and_four_global_admins"
+ ],
+ "Attributes": [
+ {
+ "Title": "Between two and four global admins are designated",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "Each tenant should have more than one designated Global Administrator to ensure both accountability and redundancy in case one administrator leaves the organization. However, it’s equally important to limit the total number of Global Administrators to no more than four to reduce the overall security risk. Ideally, Global Administrator accounts should not have any user licenses assigned, limiting their exposure to commonly targeted services.",
+ "AdditionalInformation": "Relying on a single Global Administrator creates a risk of unmonitored malicious activity. On the other hand, having too many Global Administrators increases the likelihood that one of their accounts could be compromised. A balanced approach supports both oversight and security.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "1.3.2",
+ "Description": "Ensure administrative accounts use licenses with a reduced application footprint",
+ "Checks": [
+ "admincenter_users_admins_reduced_license_footprint"
+ ],
+ "Attributes": [
+ {
+ "Title": "Administrative accounts use licenses with a reduced application footprint",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "Administrative accounts are privileged identities with elevated access to critical data, user management, and system settings. Assigning a license to these accounts may grant access to various applications, depending on the license type. The recommended practice is to avoid assigning licenses to privileged accounts altogether. If licensing is required—for example, to enable features such as Identity Protection, Privileged Identity Management (PIM), or Conditional Access—only Microsoft Entra ID P1 or P2 licenses should be used, as they do not include access to potentially vulnerable services like email or Teams.",
+ "AdditionalInformation": "Minimizing application access for administrative accounts significantly reduces the attack surface associated with high-privilege identities. Access to tools like mailboxes or collaboration apps increases the risk of exposure to phishing or social engineering attacks. Administrative tasks should be performed using dedicated, unlicensed accounts, while day-to-day activities should be conducted through separate, unprivileged “daily driver” accounts.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "1.3.3",
+ "Description": "Ensure third party integrated applications are not allowed",
+ "Checks": [
+ "entra_thirdparty_integrated_apps_not_allowed"
+ ],
+ "Attributes": [
+ {
+ "Title": "Third party integrated applications are not allowed",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "App registration allows users to register custom or third-party applications for use within the organization’s Microsoft Entra ID directory. These applications can request access to organizational data and integrate with various Microsoft 365 services.",
+ "AdditionalInformation": "While there are valid business cases for registering applications, this capability should be restricted to prevent unauthorized or insecure integrations. Attackers can exploit this feature by using compromised accounts to grant persistent access to third-party applications, enabling data exfiltration without needing to maintain direct control of the breached account. App registration should be disabled for standard users unless there is a clear business need and strong security controls—such as app consent policies and review workflows—are in place.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.3.4",
+ "Description": "Ensure 'Restrict non-admin users from creating tenants' is set to 'Yes'",
+ "Checks": [
+ "entra_policy_ensure_default_user_cannot_create_tenants"
+ ],
+ "Attributes": [
+ {
+ "Title": "Restrict non-admin users from creating tenants' is set to 'Yes'",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "By default, non-privileged users can create new Microsoft Entra tenants through the “Manage tenant” option in the Entra admin portal. When a user creates a tenant, the action is logged in the Audit Log under the category DirectoryManagement with the activity Create Company. The user who creates the tenant is automatically assigned the Global Administrator role for that tenant. Note that newly created tenants do not inherit any of the organization’s existing security or configuration settings.",
+ "AdditionalInformation": "Allowing unrestricted tenant creation introduces the risk of unauthorized or unmanaged environments, often referred to as shadow IT. These tenants may be mistakenly perceived as part of the organization’s secure infrastructure, leading users to adopt them for business use. This can fragment IT governance, complicate security oversight, and increase the likelihood of data exposure or policy violations. Restricting tenant creation ensures centralized control over the organization’s cloud environment and helps maintain consistent security and compliance standards.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.3.5",
+ "Description": "Ensure user consent to apps accessing company data on their behalf is not allowed",
+ "Checks": [
+ "entra_policy_restricts_user_consent_for_apps"
+ ],
+ "Attributes": [
+ {
+ "Title": "User consent to apps accessing company data on their behalf is not allowed",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "Organizations can control whether end users and group owners are allowed to grant consent to applications, or whether such requests require administrator review and approval. While allowing user consent can enhance productivity by enabling access to useful apps, it also introduces potential security risks if not properly managed.",
+ "AdditionalInformation": "Attackers often exploit application consent mechanisms by tricking users into authorizing malicious apps, thereby gaining access to sensitive company data. Disabling user consent for future app authorizations helps mitigate this risk by reducing the overall attack surface. When user consent is disabled, any existing consent remains valid, but all future consent requests must be explicitly approved by an administrator—ensuring better oversight and stronger security controls.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.3.6",
+ "Description": "Ensure that guest user access is restricted",
+ "Checks": [
+ "entra_policy_guest_users_access_restrictions"
+ ],
+ "Attributes": [
+ {
+ "Title": "Guest user access is restricted",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "Microsoft Entra ID, as part of the Microsoft Entra suite, allows organizations to control what external guest users can view and access within the directory. By default, guest users are assigned a more limited permission level than internal members, who receive the full set of user permissions. These directory-level permissions apply across Microsoft Entra services, including Microsoft Graph, PowerShell v2, the Azure portal, and the My Apps portal. They also affect Microsoft 365 services that rely on Microsoft 365 Groups for collaboration—such as Outlook, Microsoft Teams, and SharePoint—though they do not override guest-specific settings within Teams or SharePoint. The recommended configuration is to ensure that guest users have limited access to directory properties and group memberships, or an even more restrictive setting.",
+ "AdditionalInformation": "Restricting guest access helps prevent unauthorized enumeration of users and groups within the directory—a common reconnaissance tactic used by attackers during the early stages of a targeted attack (as defined in the Cyber Kill Chain framework). Limiting this visibility reduces the organization’s exposure to potential threats and supports a stronger security posture.",
+ "LevelOfRisk": 3
+ }
+ ]
+ },
+ {
+ "Id": "1.3.7",
+ "Description": "Ensure guest user invitations are limited to the Guest Inviter role",
+ "Checks": [
+ "entra_policy_guest_invite_only_for_admin_roles"
+ ],
+ "Attributes": [
+ {
+ "Title": "Guest user invitations are limited to the Guest Inviter role",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "By default, all users in the organization—including B2B collaboration guest users—can invite external users to collaborate via Microsoft Entra ID. This invitation capability can be broadly enabled or disabled, or it can be restricted to users in specific administrative roles. The recommended configuration is to limit guest invitations to only those users assigned to specific admin roles.",
+ "AdditionalInformation": "Restricting who can invite external guests reduces the risk of unauthorized or unmanaged external access. By limiting this ability to trusted administrative roles, organizations can maintain tighter control over their environment and reduce potential exposure to security threats originating from unvetted accounts.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "1.3.8",
+ "Description": "Ensure Sign-in frequency is enabled and browser sessions are not persistent for Administrative users",
+ "Checks": [
+ "entra_admin_users_sign_in_frequency_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Sign-in frequency is enabled and browser sessions are not persistent for Administrative users",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "In complex environments, organizations may need to place limits on authentication session durations to reduce risk. Microsoft Entra Conditional Access (CA) policies allow organizations to enforce session controls based on user roles, device state, location, and application sensitivity. Common scenarios include: • Access from unmanaged or shared devices • External access to sensitive resources • High-privileged user accounts • Business-critical applications The following configurations are recommended: • Sign-in frequency: Require reauthentication at least every 4 hours for Microsoft 365 E3 tenants, or every 24 hours for E5 tenants using Privileged Identity Management (PIM). • Persistent browser session: Set to Never persistent. Note: These settings can be integrated into the Conditional Access policy that enforces multifactor authentication for users in administrative roles.",
+ "AdditionalInformation": "Limiting the duration of authentication sessions helps prevent long-lived sessions that could be hijacked by attackers. Requiring periodic reauthentication ensures that a session cannot remain active indefinitely. Disabling persistent browser sessions further reduces the risk of drive-by browser attacks and ensures that session cookies are not stored, leaving nothing behind for an attacker to reuse in case of a compromised device.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "1.3.9",
+ "Description": "Ensure OneDrive sync is restricted for unmanaged devices",
+ "Checks": [
+ "sharepoint_onedrive_sync_restricted_unmanaged_devices"
+ ],
+ "Attributes": [
+ {
+ "Title": "OneDrive sync is restricted for unmanaged devices",
+ "Section": "1. IAM",
+ "SubSection": "1.3 Privilege Escalation Prevention",
+ "AttributeDescription": "Microsoft OneDrive allows users to sign in with their organizational (cloud tenant) account and sync their OneDrive files—including selected folders or the entire contents of their storage—to a local computer. By default, synchronization is permitted on any device where OneDrive is installed, regardless of whether the device is Microsoft Entra ID Joined, Hybrid Entra ID Joined, or Active Directory Domain Joined. To improve control over where organizational data can be synchronized, it is recommended to restrict OneDrive syncing to only those devices joined to specific, trusted domains by enabling the policy: “Allow syncing only on computers joined to specific domains”, and specifying the appropriate Active Directory (AD) domain GUID(s)",
+ "AdditionalInformation": "Allowing users to sync OneDrive data to unmanaged or personal devices introduces significant risk, as those endpoints may not comply with corporate security policies, lack endpoint protection, or be subject to malicious activity. When organizational data is synchronized to such devices, the organization loses visibility and control over how that data is accessed, shared, or protected. This opens the door to accidental data leaks, intentional misuse, or loss of sensitive information through theft or compromise. Restricting synchronization to verified, domain-joined devices ensures that only endpoints under the organization’s management and monitoring can access and store OneDrive data locally. This approach aligns with zero-trust principles, enforces data governance policies, and significantly reduces the risk of unauthorized access or exfiltration.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "2.1.1",
+ "Description": "Ensure the connection filter IP allow list is not used",
+ "Checks": [
+ "defender_antispam_connection_filter_policy_empty_ip_allowlist"
+ ],
+ "Attributes": [
+ {
+ "Title": "Connection filter IP allow list is not used",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.1 Network",
+ "AttributeDescription": "In Microsoft 365 environments—whether using Exchange Online mailboxes or standalone Exchange Online Protection (EOP)—connection filtering policies play a critical role in determining the trustworthiness of incoming email based on the source IP address. The default connection filter policy includes three main components: the IP Allow List, the IP Block List, and a Safe List. These lists influence how email messages are processed before any content filtering occurs. It is recommended that the IP Allow List remains empty or undefined to avoid bypassing essential security checks.",
+ "AdditionalInformation": "Email originating from IP addresses on the Allow List bypasses several key layers of protection, including spam filtering and sender authentication protocols such as SPF, DKIM, and DMARC. Without additional safeguards like mail flow rules, this configuration introduces a significant risk: malicious actors can exploit the Allow List to deliver spoofed or harmful emails directly to users’ inboxes. Maintaining an empty IP Allow List ensures that all messages undergo full evaluation and filtering, reducing the likelihood of malware, phishing attempts, and impersonation attacks reaching end users.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "2.1.2",
+ "Description": "Ensure the connection filter safe list is off",
+ "Checks": [
+ "defender_antispam_connection_filter_policy_safe_list_off"
+ ],
+ "Attributes": [
+ {
+ "Title": "Connection filter safe list is off",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.1 Network",
+ "AttributeDescription": "In Microsoft 365 environments—whether using Exchange Online mailboxes or standalone Exchange Online Protection (EOP)—connection filtering policies are used to evaluate and classify incoming email based on the IP address of the sending server. The default connection filter policy includes three main components: the IP Allow List, the IP Block List, and the Safe List. The Safe List is a Microsoft-managed, dynamically updated set of sender IP addresses that are automatically treated as trusted sources. The recommended configuration is to have the Safe List disabled (set to Off or False) to ensure all incoming mail is properly evaluated by the organization’s email security policies.",
+ "AdditionalInformation": "When the Safe List is enabled, messages from IP addresses on this list bypass key security mechanisms, including spam filtering and sender authentication checks such as SPF, DKIM, and DMARC. Although Microsoft manages this list dynamically, administrators have no visibility or control over which senders are included. As a result, allowing Safe List traffic to skip verification introduces significant risk—malicious actors could exploit this blind spot to deliver spam, phishing, or malware directly to user inboxes. Disabling the Safe List ensures that all messages undergo full inspection, allowing organizations to maintain strict control over the email filtering pipeline and reduce the likelihood of successful compromise.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "2.1.3",
+ "Description": "Ensure SMTP AUTH is disabled",
+ "Checks": [
+ "exchange_transport_config_smtp_auth_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "SMTP AUTH is disabled",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.1 Network",
+ "AttributeDescription": "The SMTP AUTH (Simple Mail Transfer Protocol Authentication) setting in Exchange Online controls whether authenticated client SMTP submission is enabled at the organization level. This legacy protocol is used primarily by older applications and devices to send email via SMTP using basic authentication. By default, Microsoft recommends disabling SMTP AUTH at the tenant level to enhance security posture. Modern email clients and applications that connect to Microsoft 365 mailboxes no longer require SMTP AUTH and can use more secure, modern authentication methods (such as OAuth 2.0).",
+ "AdditionalInformation": "SMTP AUTH is an outdated and insecure protocol that relies on basic authentication, which transmits credentials in plaintext and lacks support for multifactor authentication. Leaving this protocol enabled increases the risk of credential theft, account compromise, and unauthorized access, especially in environments not protected by additional controls such as Conditional Access or legacy protocol blocking. Disabling SMTP AUTH supports the principle of least functionality by reducing protocol exposure and hardening the email infrastructure against exploitation attempts. This action also aligns with Microsoft’s broader security guidance and helps organizations phase out legacy authentication methods in favor of modern, secure protocols.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "2.2.1",
+ "Description": "Ensure additional storage providers are restricted in Outlook on the web",
+ "Checks": [
+ "exchange_mailbox_policy_additional_storage_restricted"
+ ],
+ "Attributes": [
+ {
+ "Title": "Additional storage providers are restricted in Outlook on the web",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.2 Storage",
+ "AttributeDescription": "The AdditionalStorageProvidersAvailable setting in Microsoft 365 controls whether users can connect to and open files from third-party storage services while using Outlook on the Web (OWA). When enabled, users may link external services such as Dropbox, Box, Google Drive, Facebook, or OneDrive Personal to access and interact with files directly within the Outlook web interface. Although this can enhance user productivity, it also introduces third-party services that Microsoft does not govern, meaning their terms of use, privacy policies, and security practices are outside the organization’s control. To mitigate potential risks, it is recommended to restrict or disable access to additional storage providers, limiting file access to only trusted organizational sources.",
+ "AdditionalInformation": "Allowing connections to external storage providers from within Outlook on the Web significantly increases the risk of data leakage and malware exposure. Users may inadvertently upload or download sensitive organizational data to or from non-sanctioned storage platforms, where proper security controls and compliance measures may not be in place. Additionally, files retrieved from these services could serve as vectors for malware or phishing payloads, especially if users are unaware of their origin or if access controls on those platforms are weak. Restricting access to third-party storage providers helps enforce data governance policies, reduces the organization’s attack surface, and ensures that sensitive communications and files remain within controlled and monitored environments. This is especially important in industries with regulatory or compliance obligations.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "2.2.2",
+ "Description": "Ensure external file sharing in Teams is enabled for only approved cloud storage services",
+ "Checks": [
+ "teams_external_file_sharing_restricted"
+ ],
+ "Attributes": [
+ {
+ "Title": "External file sharing in Teams is enabled for only approved cloud storage services",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.2 Storage",
+ "AttributeDescription": "Microsoft Teams facilitates collaboration by enabling users to share and access files within chat, meetings, and channels. By default, file sharing in Teams is integrated with SharePoint Online for team channels and OneDrive for Business for private chats. However, the platform also supports third-party cloud storage providers such as Dropbox, Box, and Google Drive, which can be made available within the Teams interface. Administrators have the ability to configure and restrict which external storage providers are accessible to end users. This helps align file-sharing capabilities with organizational data governance and compliance requirements. Note: While Skype for Business was officially deprecated on July 31, 2021, some configuration settings inherited from its infrastructure may still apply for a limited time. Refer to Microsoft’s official documentation for ongoing support timelines.",
+ "AdditionalInformation": "Allowing unrestricted access to third-party cloud storage providers within Microsoft Teams can undermine an organization’s data protection and compliance efforts. Users may unintentionally store or share sensitive information using non-sanctioned platforms that fall outside of the organization’s control, monitoring, or security policies. By restricting file-sharing capabilities to only approved storage providers, organizations can ensure that collaboration remains within trusted ecosystems. This reduces the risk of data leakage, non-compliant data transfers, and unauthorized access, while also reinforcing secure and consistent file management practices across the collaboration environment.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "2.3.1",
+ "Description": "Ensure the Common Attachment Types Filter is Enabled",
+ "Checks": [
+ "defender_malware_policy_common_attachments_filter_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Common Attachment Types Filter is Enabled",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.3 Application",
+ "AttributeDescription": "The Common Attachment Types Filter allows users to block both well-known and custom-defined malicious file types from being attached to email messages.",
+ "AdditionalInformation": "By blocking commonly exploited file types, this filter helps prevent the delivery of malware-laden attachments, reducing the risk of endpoint compromise and broader system infection.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "2.3.2",
+ "Description": "Ensure comprehensive attachment filtering is applied",
+ "Checks": [
+ "defender_malware_policy_comprehensive_attachments_filter_applied"
+ ],
+ "Attributes": [
+ {
+ "Title": "Comprehensive attachment filtering is applied",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.3 Application",
+ "AttributeDescription": "The Common Attachment Types Filter allows users to block both known and custom-defined malicious file types from being attached to email messages. While Microsoft provides a default policy that blocks 53 high-risk file extensions, organizations can extend this protection by defining their own custom list. This recommendation includes a broader set of 186 potentially dangerous file extensions, offering a more robust safeguard. Although comprehensive, the list is not exhaustive and should be tailored to fit organizational needs.",
+ "AdditionalInformation": "Blocking file types commonly associated with malware helps prevent the delivery of malicious payloads that can compromise hosts, exfiltrate data, or facilitate phishing attacks. By enforcing a strict attachment policy, organizations reduce their exposure to threats delivered through legacy formats, binary executables, and compressed archives. Allow-listing only those file types necessary for business operations and blocking all others is an effective strategy for mitigating risks such as Business Email Compromise (BEC) and enhancing overall email security posture.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "2.3.3",
+ "Description": "Ensure users installing Outlook add-ins is not allowed",
+ "Checks": [
+ "exchange_roles_assignment_policy_addins_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Users installing Outlook add-ins is not allowed",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.3 Application",
+ "AttributeDescription": "In Exchange Online, administrators have the ability to control who can install and manage Outlook add-ins within the Microsoft 365 environment. By default, end users are allowed to install third-party or custom add-ins directly in their Outlook desktop client, which can access data within the application such as emails, calendar events, and contacts. To enhance security and reduce potential risks, it is recommended to restrict add-in management privileges to a limited set of trusted administrators and users. This can be configured via the Microsoft 365 admin center or PowerShell, providing centralized control over which add-ins are allowed and who can deploy them.",
+ "AdditionalInformation": "Allowing end users to install Outlook add-ins introduces a potential attack surface, especially if the add-ins are vulnerable, poorly maintained, or intentionally malicious. Threat actors can exploit this capability to gain unauthorized access to sensitive mailbox data or to execute malicious code within the Outlook client. By disabling or restricting user-installed add-ins, organizations can significantly reduce the risk of data exfiltration, phishing, and privilege abuse. Managing add-ins centrally ensures that only vetted and trusted integrations are used, aligning with best practices for securing email clients and minimizing exposure to third-party threats.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "2.3.4",
+ "Description": "Ensure external meeting chat is off",
+ "Checks": [
+ "teams_meeting_external_chat_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "External meeting chat is off",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.3 Application",
+ "AttributeDescription": "This meeting policy setting in Microsoft Teams governs whether users in your organization can read or write messages in meeting chats hosted by external, untrusted organizations. If the external meeting is hosted by an organization that has been explicitly designated as trusted, this restriction does not apply.",
+ "AdditionalInformation": "Allowing unrestricted chat participation in meetings hosted by untrusted external organizations increases the risk of exposure to malicious content, including links, files, or payloads designed to exploit user behavior or application vulnerabilities.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "2.3.5",
+ "Description": "Ensure users can report security concerns in Teams",
+ "Checks": [
+ "teams_security_reporting_enabled",
+ "defender_chat_report_policy_configured"
+ ],
+ "Attributes": [
+ {
+ "Title": "Users can report security concerns in Teams",
+ "Section": "2. Attack Surface",
+ "SubSection": "2.3 Application",
+ "AttributeDescription": "User reporting settings in Microsoft Teams and Microsoft 365 allow end users to report messages they believe to be malicious or suspicious, enabling quicker response and investigation by security teams. To ensure the reporting feature functions as intended, this recommendation encompasses three distinct but interdependent settings that must all be correctly configured: 1. Teams Admin Center – User Reporting: This setting controls whether users can report messages directly from the Teams interface. It is enabled by default for new tenants. If disabled, users cannot report messages in Teams, and downstream settings in Microsoft Defender will not have any effect. 2. Microsoft 365 Defender Portal – User Reporting Integration: Also enabled by default in new tenants, this setting must be explicitly enabled for existing tenants. It ensures that messages reported from Teams are properly surfaced on the “User reported” tab of the Submissions page in Microsoft 365 Defender. 3. Defender – Report Message Destinations: This broader configuration applies to multiple Microsoft 365 services, including Teams. It allows organizations to control where reported messages are routed, such as keeping them within the organization or forwarding them to Microsoft for deeper analysis. Given its influence on how user submissions are processed, it is included as a required configuration in this assessment.",
+ "AdditionalInformation": "Enabling user reporting equips employees with a straightforward mechanism to flag suspicious or potentially malicious content in Teams, acting as a critical early warning system for security teams. This improves organizational responsiveness to phishing, social engineering, or targeted attacks that may initially evade automated detection.",
+ "LevelOfRisk": 2
+ }
+ ]
+ },
+ {
+ "Id": "3.1.1",
+ "Description": "Ensure 'AuditDisabled' organizationally is set to 'False'",
+ "Checks": [
+ "exchange_organization_mailbox_auditing_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "AuditDisabled organizationally is set to False",
+ "Section": "3. Logging and monitoring",
+ "SubSection": "3.1 Logging",
+ "AttributeDescription": "The setting “Mailbox auditing on by default” determines whether mailbox auditing is automatically enabled across all mailboxes in the organization, regardless of their individual auditing configuration. When this setting is configured as False, it enables auditing at the organization level, overriding the AuditEnabled property for individual mailboxes—even if it is explicitly set to False. With this setting enabled, default audit actions are automatically recorded for all mailboxes without requiring manual configuration. Conversely, disabling this setting (True) effectively turns off mailbox auditing across the organization and overrides any mailbox-level auditing settings. The consequences of disabling this setting include: • Mailbox auditing is completely disabled organization-wide. • No mailbox actions are logged, even if AuditEnabled is set to True for individual mailboxes. • New mailboxes do not inherit auditing, and setting AuditEnabled=True has no effect. • Bypass audit rules set via Set-MailboxAuditBypassAssociation are ignored. • Existing audit records remain in place until they expire based on the audit log retention policy. The recommended configuration is to set this value to False at the organization level to ensure auditing is enforced consistently.",
+ "AdditionalInformation": "Enforcing mailbox auditing by default ensures that audit logging cannot be unintentionally or maliciously disabled on individual mailboxes. This setting provides vital visibility for forensic investigations and incident response (IR) teams, allowing them to trace suspicious or malicious activity—such as unauthorized inbox access, message deletion, or rule manipulation—that may signal account compromise. Consistent auditing across all mailboxes is critical for detecting threat actor behaviors (TTPs) and correlating events across users. While organizations without Microsoft 365 E5 licenses are limited to 90 days of audit log retention, enabling this setting still significantly improves detection and accountability within that window.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "3.1.2",
+ "Description": "Ensure mailbox auditing for E3 users is Enabled",
+ "Checks": [
+ "exchange_user_mailbox_auditing_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Mailbox auditing for E3 users is Enabled",
+ "Section": "3. Logging and monitoring",
+ "SubSection": "3.1 Logging",
+ "AttributeDescription": "As of January 2019, Microsoft enables mailbox audit logging by default across all organizations. This feature ensures that specific actions performed by mailbox owners, delegates, and administrators are automatically captured and recorded. These audit records can then be searched by administrators through the mailbox audit log in Microsoft 365. Each mailbox type—whether user, shared, resource, or public folder—can have tailored audit settings to track activities that are most relevant to the organization. While audit logging is enabled by default at the organizational level, it is important to explicitly configure the AuditEnabled property to True on all user mailboxes, and to expand the list of audited actions beyond the Microsoft defaults to meet specific visibility or compliance needs. Note: This recommendation is particularly relevant to users with Microsoft 365 E3 licenses, where audit actions differ slightly from the default configurations in E5.",
+ "AdditionalInformation": "Mailbox auditing plays a critical role in supporting both regulatory compliance and security monitoring. Whether investigating unauthorized configuration changes, potential account compromise, or insider threats, detailed mailbox audit logs provide essential evidence for security operations, forensic analysis, and general administrative oversight. While mailbox auditing is enabled by default for most user mailboxes, certain mailbox types—such as Resource Mailboxes, Public Folder Mailboxes, and the DiscoverySearch Mailbox—do not inherit the organizational auditing default. For these mailboxes, AuditEnabled must be manually set to True to ensure relevant activities are captured. Note: Organizations without Microsoft 365 E5 licenses are subject to a 90-day audit log retention limit, but enabling comprehensive mailbox auditing remains a best practice for operational readiness and incident response.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "3.1.3",
+ "Description": "Ensure mailbox auditing for E5 users is Enabled",
+ "Checks": [
+ "exchange_user_mailbox_auditing_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Mailbox auditing for E5 users is Enabled",
+ "Section": "3. Logging and monitoring",
+ "SubSection": "3.1 Logging",
+ "AttributeDescription": "Since January 2019, mailbox audit logging has been enabled by default in all Microsoft 365 organizations. This feature ensures that specific actions performed by mailbox owners, delegates, and administrators are automatically captured and stored as audit records. These logs are accessible to administrators through the Microsoft 365 mailbox audit log, enabling visibility into key mailbox-level activity. Although logging is enabled by default, each mailbox—particularly user and shared mailboxes—can have custom audit actions assigned to capture the specific types of events deemed valuable by the organization. For environments with Microsoft 365 E5 licenses or the advanced auditing add-on, it is recommended to explicitly set AuditEnabled to True on all user mailboxes and to configure additional audit actions beyond Microsoft’s default settings for enhanced visibility. Note: This recommendation specifically applies to E5 or equivalent auditing-enabled license holders, as the available audit depth and event coverage differ from E3.",
+ "AdditionalInformation": "Mailbox audit logging is essential for supporting security investigations, regulatory compliance, and operational forensics in Microsoft 365. Whether you’re tracking unauthorized changes, detecting suspicious access, or conducting post-incident analysis, having a complete and accurate mailbox audit trail is critical. While audit logging is broadly applied by default, certain mailbox types bypass the organizational setting and require manual configuration to enable auditing. These include: • Resource Mailboxes • Public Folder Mailboxes • DiscoverySearch Mailboxes For these mailbox types, the AuditEnabled property must be explicitly set to True to ensure that audit events are captured. Important: Without advanced auditing (included in E5 or via add-on), mailbox audit logs are retained for only 90 days, limiting the historical window for investigations. Nonetheless, enabling detailed auditing remains a key best practice for maintaining strong visibility and compliance readiness.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "3.1.4",
+ "Description": "Ensure 'AuditBypassEnabled' is not enabled on mailboxes",
+ "Checks": [
+ "exchange_mailbox_audit_bypass_disabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "AuditBypassEnabled is not enabled on mailboxes",
+ "Section": "3. Logging and monitoring",
+ "SubSection": "3.1 Logging",
+ "AttributeDescription": "The AuditBypassEnabled setting in Microsoft 365 allows specific user or computer accounts to bypass mailbox audit logging, meaning that any actions they perform on mailboxes will not be recorded in the audit logs. This includes actions such as reading, deleting, moving, or modifying messages.",
+ "AdditionalInformation": "Allowing an account to bypass mailbox audit logging creates a blind spot in security monitoring. If the account is compromised, misused, or maliciously configured, it can access and interact with mailboxes without leaving any trace in the logs. This significantly undermines the organization’s ability to conduct forensic investigations, detect insider threats, or comply with audit requirements.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "3.2.1",
+ "Description": "Ensure Microsoft 365 audit log search is Enabled ",
+ "Checks": [
+ "purview_audit_log_search_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Microsoft 365 audit log search is Enabled ",
+ "Section": "3. Logging and monitoring",
+ "SubSection": "3.2 Retention",
+ "AttributeDescription": "Audit log search in the Microsoft Purview compliance portal allows organizations to track and retain user and administrator activities across Microsoft 365 services. When enabled, audit events—such as sign-ins, file access, configuration changes, and other operational actions—are captured and stored for up to 90 days by default. While some organizations may choose to integrate auditing data with third-party Security Information and Event Management (SIEM) systems, audit log search in Microsoft Purview remains a critical native capability for centralized visibility and incident response. Although global administrators have the ability to disable audit log search, it is generally recommended to keep it enabled to maintain full visibility into user and system activity.",
+ "AdditionalInformation": "Activating audit log search provides essential forensic and compliance value. It enables organizations to detect anomalous behavior, investigate potential security incidents, and demonstrate adherence to regulatory and legal requirements. In addition, it supports operational monitoring, internal audits, and proactive threat detection. By retaining and centralizing audit data within the Microsoft 365 ecosystem, security and compliance teams gain faster access to actionable insights, reducing response times and strengthening the organization’s overall security posture.",
+ "LevelOfRisk": 5
+ }
+ ]
+ },
+ {
+ "Id": "3.3.1",
+ "Description": "Ensure notifications for internal users sending malware is Enabled",
+ "Checks": [
+ "defender_malware_policy_notifications_internal_users_malware_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Notifications for internal users sending malware is Enabled",
+ "Section": "3. Logging and monitoring",
+ "SubSection": "3.3 Monitoring",
+ "AttributeDescription": "Exchange Online Protection (EOP) is Microsoft’s cloud-based email filtering service designed to safeguard organizations against spam, malware, and other email-borne threats. It is included by default in all Microsoft 365 tenants with Exchange Online mailboxes. EOP provides customizable anti-malware policies that allow administrators to define protection settings and configure alerts for detected malicious activity.",
+ "AdditionalInformation": "Enabling notifications for malware detections ensures that administrators are alerted when an internal user sends a message containing malware. Such incidents may signal a compromised user account or infected device, requiring immediate investigation to mitigate potential security breaches.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "4.1.1",
+ "Description": "Ensure that DKIM is enabled for all Exchange Online Domains",
+ "Checks": [
+ "defender_domain_dkim_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "DKIM is enabled for all Exchange Online Domains",
+ "Section": "4. Encryption",
+ "SubSection": "4.1 In-Transit",
+ "AttributeDescription": "DomainKeys Identified Mail (DKIM) is one of the three key email authentication technologies—alongside SPF and DMARC—used to protect domains from being spoofed by malicious actors. DKIM allows organizations to apply a cryptographic digital signature to the header of outbound email messages. When properly configured, DKIM enables a domain to associate its identity with the message, allowing recipient email systems to verify the authenticity of the sender. Combined with SPF and DMARC, DKIM helps prevent unauthorized use of your domain in phishing or spoofing attacks.",
+ "AdditionalInformation": "Enabling DKIM in Office 365 ensures that all outbound emails sent via Exchange Online are cryptographically signed. This enables recipient mail servers to verify that messages originate from an authorized source, significantly reducing the risk of email spoofing and reinforcing trust in the organization’s email communications.",
+ "LevelOfRisk": 4
+ }
+ ]
+ },
+ {
+ "Id": "4.1.2",
+ "Description": "Ensure that password hash sync is enabled for hybrid deployments",
+ "Checks": [
+ "entra_password_hash_sync_enabled"
+ ],
+ "Attributes": [
+ {
+ "Title": "Password hash sync is enabled for hybrid deployments",
+ "Section": "4. Encryption",
+ "SubSection": "4.1 In-Transit",
+ "AttributeDescription": "Password Hash Synchronization (PHS) is a hybrid identity sign-in method that enables secure synchronization of user credentials from an on-premises Active Directory to Microsoft Entra ID. Microsoft Entra Connect performs this by syncing a hash of the password hash, ensuring credentials are not exposed in transit or storage. Note: This recommendation applies only to Microsoft 365 tenants configured with Entra Connect synchronization in a hybrid environment. It does not apply to tenants using federated domain configurations.",
+ "AdditionalInformation": "PHS simplifies the user experience by allowing a single password to be used across both on-premises and cloud resources. It also enables leaked credential detection via Microsoft Entra ID Protection, helping identify compromised accounts when passwords appear in known data breaches or public forums. Compared to other synchronization methods like federation, PHS offers greater resilience—users can still sign in to Microsoft 365 even if connectivity to the on-premises environment is temporarily unavailable.",
+ "LevelOfRisk": 2
+ }
+ ]
+ }
+ ]
+}
diff --git a/prowler/config/config.py b/prowler/config/config.py
index 52bd2fd742..51f52ae3ca 100644
--- a/prowler/config/config.py
+++ b/prowler/config/config.py
@@ -12,7 +12,7 @@ from prowler.lib.logger import logger
timestamp = datetime.today()
timestamp_utc = datetime.now(timezone.utc).replace(tzinfo=timezone.utc)
-prowler_version = "5.6.0"
+prowler_version = "5.7.0"
html_logo_url = "https://github.com/prowler-cloud/prowler/"
square_logo_img = "https://prowler.com/wp-content/uploads/logo-html.png"
aws_logo = "https://user-images.githubusercontent.com/38561120/235953920-3e3fba08-0795-41dc-b480-9bea57db9f2e.png"
@@ -29,6 +29,7 @@ class Provider(str, Enum):
AZURE = "azure"
KUBERNETES = "kubernetes"
M365 = "m365"
+ GITHUB = "github"
NHN = "nhn"
diff --git a/prowler/config/config.yaml b/prowler/config/config.yaml
index 033b2f2d3e..c4bcd40b8e 100644
--- a/prowler/config/config.yaml
+++ b/prowler/config/config.yaml
@@ -500,6 +500,18 @@ m365:
# Exchange
# m365.exchange_organization_mailtips_enabled
recommended_mailtips_large_audience_threshold: 25 # maximum number of recipients
+ # Defender Malware Policy Settings
+ # m365.defender_malware_policy_comprehensive_attachments_filter_applied
+ # The recommended list of file extensions to be blocked, this can be changed depending on the organization needs
+ default_recommended_extensions:
+ [
+ "ace", "ani", "apk", "app", "appx", "arj", "bat", "cab", "cmd", "com",
+ "deb", "dex", "dll", "docm", "elf", "exe", "hta", "img", "iso", "jar",
+ "jnlp", "kext", "lha", "lib", "library", "lnk", "lzh", "macho", "msc",
+ "msi", "msix", "msp", "mst", "pif", "ppa", "ppam", "reg", "rev", "scf",
+ "scr", "sct", "sys", "uif", "vb", "vbe", "vbs", "vxd", "wsc", "wsf",
+ "wsh", "xll", "xz", "z"
+ ]
# m365.exchange_mailbox_properties_auditing_enabled
# Maximum number of days to keep audit logs
audit_log_age: 90
diff --git a/prowler/config/github_mutelist_example.yaml b/prowler/config/github_mutelist_example.yaml
new file mode 100644
index 0000000000..591dbed772
--- /dev/null
+++ b/prowler/config/github_mutelist_example.yaml
@@ -0,0 +1,17 @@
+### Account, Check and/or Region can be * to apply for all the cases.
+### Account ==
+### Resources and tags are lists that can have either Regex or Keywords.
+### Tags is an optional list that matches on tuples of 'key=value' and are "ANDed" together.
+### Use an alternation Regex to match one of multiple tags with "ORed" logic.
+### For each check you can except Accounts, Regions, Resources and/or Tags.
+########################### MUTELIST EXAMPLE ###########################
+Mutelist:
+ Accounts:
+ "account_1":
+ Checks:
+ "repository_public_has_securitymd_file":
+ Regions:
+ - "*"
+ Resources:
+ - "resource_1"
+ - "resource_2"
diff --git a/prowler/lib/check/check.py b/prowler/lib/check/check.py
index 9ed70a22cd..bce9db8378 100644
--- a/prowler/lib/check/check.py
+++ b/prowler/lib/check/check.py
@@ -631,7 +631,10 @@ def execute(
)
elif global_provider.type == "kubernetes":
is_finding_muted_args["cluster"] = global_provider.identity.cluster
-
+ elif global_provider.type == "github":
+ is_finding_muted_args["account_name"] = (
+ global_provider.identity.account_name
+ )
for finding in check_findings:
is_finding_muted_args["finding"] = finding
finding.muted = global_provider.mutelist.is_finding_muted(
diff --git a/prowler/lib/check/models.py b/prowler/lib/check/models.py
index 88e4d83aa7..0ef3195b2a 100644
--- a/prowler/lib/check/models.py
+++ b/prowler/lib/check/models.py
@@ -125,9 +125,9 @@ class CheckMetadata(BaseModel):
if not isinstance(value, str):
raise ValueError("Categories must be a list of strings")
value_lower = value.lower()
- if not re.match("^[a-z-]+$", value_lower):
+ if not re.match("^[a-z0-9-]+$", value_lower):
raise ValueError(
- f"Invalid category: {value}. Categories can only contain lowercase letters and hyphen '-'"
+ f"Invalid category: {value}. Categories can only contain lowercase letters, numbers and hyphen '-'"
)
return value_lower
@@ -542,6 +542,37 @@ class Check_Report_Kubernetes(Check_Report):
self.namespace = "cluster-wide"
+@dataclass
+class CheckReportGithub(Check_Report):
+ """Contains the GitHub Check's finding information."""
+
+ resource_name: str
+ resource_id: str
+ repository: str
+
+ def __init__(
+ self,
+ metadata: Dict,
+ resource: Any,
+ resource_name: str = None,
+ resource_id: str = None,
+ repository: str = "global",
+ ) -> None:
+ """Initialize the GitHub Check's finding information.
+
+ Args:
+ metadata: The metadata of the check.
+ resource: Basic information about the resource. Defaults to None.
+ resource_name: The name of the resource related with the finding.
+ resource_id: The id of the resource related with the finding.
+ repository: The repository of the resource related with the finding.
+ """
+ super().__init__(metadata, resource)
+ self.resource_name = resource_name or getattr(resource, "name", "")
+ self.resource_id = resource_id or getattr(resource, "id", "")
+ self.repository = repository or getattr(resource, "repository", "")
+
+
@dataclass
class CheckReportM365(Check_Report):
"""Contains the M365 Check's finding information."""
diff --git a/prowler/lib/cli/parser.py b/prowler/lib/cli/parser.py
index f2cc8d12dd..1990c7f90a 100644
--- a/prowler/lib/cli/parser.py
+++ b/prowler/lib/cli/parser.py
@@ -34,6 +34,7 @@ Available Cloud Providers:
azure Azure Provider
gcp GCP Provider
kubernetes Kubernetes Provider
+ github GitHub Provider
m365 Microsoft 365 Provider
nhn NHN Provider (Unofficial)
diff --git a/prowler/lib/mutelist/mutelist.py b/prowler/lib/mutelist/mutelist.py
index 68d19ce567..70f74a2ff5 100644
--- a/prowler/lib/mutelist/mutelist.py
+++ b/prowler/lib/mutelist/mutelist.py
@@ -433,8 +433,8 @@ class Mutelist(ABC):
if tag:
is_item_matched = True
for item in matched_items:
- if item.startswith("*"):
- item = ".*" + item[1:]
+ if "*" in item:
+ item = item.replace("*", ".*")
if tag:
if not re.search(item, finding_items):
is_item_matched = False
diff --git a/prowler/lib/outputs/compliance/cis/cis_github.py b/prowler/lib/outputs/compliance/cis/cis_github.py
new file mode 100644
index 0000000000..c06a766a05
--- /dev/null
+++ b/prowler/lib/outputs/compliance/cis/cis_github.py
@@ -0,0 +1,101 @@
+from datetime import datetime
+
+from prowler.lib.check.compliance_models import Compliance
+from prowler.lib.outputs.compliance.cis.models import GithubCISModel
+from prowler.lib.outputs.compliance.compliance_output import ComplianceOutput
+from prowler.lib.outputs.finding import Finding
+
+
+class GithubCIS(ComplianceOutput):
+ """
+ This class represents the GitHub CIS compliance output.
+
+ Attributes:
+ - _data (list): A list to store transformed data from findings.
+ - _file_descriptor (TextIOWrapper): A file descriptor to write data to a file.
+
+ Methods:
+ - transform: Transforms findings into GitHub CIS compliance format.
+ """
+
+ def transform(
+ self,
+ findings: list[Finding],
+ compliance: Compliance,
+ compliance_name: str,
+ ) -> None:
+ """
+ Transforms a list of findings into GitHub CIS compliance format.
+
+ Parameters:
+ - findings (list): A list of findings.
+ - compliance (Compliance): A compliance model.
+ - compliance_name (str): The name of the compliance model.
+
+ Returns:
+ - None
+ """
+ for finding in findings:
+ # Get the compliance requirements for the finding
+ finding_requirements = finding.compliance.get(compliance_name, [])
+ for requirement in compliance.Requirements:
+ if requirement.Id in finding_requirements:
+ for attribute in requirement.Attributes:
+ compliance_row = GithubCISModel(
+ Provider=finding.provider,
+ Description=compliance.Description,
+ Account_Id=finding.account_uid,
+ Account_Name=finding.account_name,
+ AssessmentDate=str(finding.timestamp),
+ Requirements_Id=requirement.Id,
+ Requirements_Description=requirement.Description,
+ Requirements_Attributes_Section=attribute.Section,
+ Requirements_Attributes_Profile=attribute.Profile,
+ Requirements_Attributes_AssessmentStatus=attribute.AssessmentStatus,
+ Requirements_Attributes_Description=attribute.Description,
+ Requirements_Attributes_RationaleStatement=attribute.RationaleStatement,
+ Requirements_Attributes_ImpactStatement=attribute.ImpactStatement,
+ Requirements_Attributes_RemediationProcedure=attribute.RemediationProcedure,
+ Requirements_Attributes_AuditProcedure=attribute.AuditProcedure,
+ Requirements_Attributes_AdditionalInformation=attribute.AdditionalInformation,
+ Requirements_Attributes_References=attribute.References,
+ Requirements_Attributes_DefaultValue=attribute.DefaultValue,
+ Status=finding.status,
+ StatusExtended=finding.status_extended,
+ ResourceId=finding.resource_uid,
+ ResourceName=finding.resource_name,
+ CheckId=finding.check_id,
+ Muted=finding.muted,
+ )
+ self._data.append(compliance_row)
+ # Add manual requirements to the compliance output
+ for requirement in compliance.Requirements:
+ if not requirement.Checks:
+ for attribute in requirement.Attributes:
+ compliance_row = GithubCISModel(
+ Provider=compliance.Provider.lower(),
+ Description=compliance.Description,
+ Account_Id="",
+ Account_Name="",
+ AssessmentDate=str(datetime.now()),
+ Requirements_Id=requirement.Id,
+ Requirements_Description=requirement.Description,
+ Requirements_Attributes_Section=attribute.Section,
+ Requirements_Attributes_Profile=attribute.Profile,
+ Requirements_Attributes_AssessmentStatus=attribute.AssessmentStatus,
+ Requirements_Attributes_Description=attribute.Description,
+ Requirements_Attributes_RationaleStatement=attribute.RationaleStatement,
+ Requirements_Attributes_ImpactStatement=attribute.ImpactStatement,
+ Requirements_Attributes_RemediationProcedure=attribute.RemediationProcedure,
+ Requirements_Attributes_AuditProcedure=attribute.AuditProcedure,
+ Requirements_Attributes_AdditionalInformation=attribute.AdditionalInformation,
+ Requirements_Attributes_References=attribute.References,
+ Requirements_Attributes_DefaultValue=attribute.DefaultValue,
+ Status="MANUAL",
+ StatusExtended="Manual check",
+ ResourceId="manual_check",
+ ResourceName="Manual check",
+ CheckId="manual",
+ Muted=False,
+ )
+ self._data.append(compliance_row)
diff --git a/prowler/lib/outputs/compliance/cis/models.py b/prowler/lib/outputs/compliance/cis/models.py
index 201925f19d..8ddbc3f1de 100644
--- a/prowler/lib/outputs/compliance/cis/models.py
+++ b/prowler/lib/outputs/compliance/cis/models.py
@@ -163,6 +163,37 @@ class KubernetesCISModel(BaseModel):
Muted: bool
+class GithubCISModel(BaseModel):
+ """
+ GithubCISModel generates a finding's output in Github CIS Compliance format.
+ """
+
+ Provider: str
+ Description: str
+ Account_Name: str
+ Account_Id: str
+ AssessmentDate: str
+ Requirements_Id: str
+ Requirements_Description: str
+ Requirements_Attributes_Section: str
+ Requirements_Attributes_Profile: str
+ Requirements_Attributes_AssessmentStatus: str
+ Requirements_Attributes_Description: str
+ Requirements_Attributes_RationaleStatement: str
+ Requirements_Attributes_ImpactStatement: str
+ Requirements_Attributes_RemediationProcedure: str
+ Requirements_Attributes_AuditProcedure: str
+ Requirements_Attributes_AdditionalInformation: str
+ Requirements_Attributes_References: str
+ Requirements_Attributes_DefaultValue: str
+ Status: str
+ StatusExtended: str
+ ResourceId: str
+ ResourceName: str
+ CheckId: str
+ Muted: bool
+
+
# TODO: Create a parent class for the common fields of CIS and have the specific classes from each provider to inherit from it.
# It is not done yet because it is needed to respect the current order of the fields in the output file.
diff --git a/prowler/lib/outputs/compliance/compliance_output.py b/prowler/lib/outputs/compliance/compliance_output.py
index bb0e49d452..d3b855521e 100644
--- a/prowler/lib/outputs/compliance/compliance_output.py
+++ b/prowler/lib/outputs/compliance/compliance_output.py
@@ -31,14 +31,21 @@ class ComplianceOutput(Output):
compliance: Compliance,
file_path: str = None,
file_extension: str = "",
+ from_cli: bool = True,
) -> None:
+ # TODO: This class needs to be refactored to use the Output class init, methods and properties
self._data = []
+ self.close_file = False
+ self.file_path = file_path
self.file_descriptor = None
+ # This parameter is to avoid refactoring more code, the CLI does not write in batches, the API does
+ self._from_cli = from_cli
if not file_extension and file_path:
self._file_extension = "".join(Path(file_path).suffixes)
if file_extension:
self._file_extension = file_extension
+ self.file_path = f"{file_path}{self.file_extension}"
if findings:
# Get the compliance name of the model
@@ -49,7 +56,7 @@ class ComplianceOutput(Output):
)
self.transform(findings, compliance, compliance_name)
if not self._file_descriptor and file_path:
- self.create_file_descriptor(file_path)
+ self.create_file_descriptor(self.file_path)
def batch_write_data_to_file(self) -> None:
"""
@@ -69,12 +76,14 @@ class ComplianceOutput(Output):
fieldnames=[field.upper() for field in self._data[0].dict().keys()],
delimiter=";",
)
- csv_writer.writeheader()
+ if self._file_descriptor.tell() == 0:
+ csv_writer.writeheader()
for finding in self._data:
csv_writer.writerow(
{k.upper(): v for k, v in finding.dict().items()}
)
- self._file_descriptor.close()
+ if self.close_file or self._from_cli:
+ self._file_descriptor.close()
except Exception as error:
logger.error(
f"{error.__class__.__name__}[{error.__traceback__.tb_lineno}]: {error}"
diff --git a/prowler/lib/outputs/compliance/prowler_threatscore/models.py b/prowler/lib/outputs/compliance/prowler_threatscore/models.py
index 2b5f5ada66..f1908b8de3 100644
--- a/prowler/lib/outputs/compliance/prowler_threatscore/models.py
+++ b/prowler/lib/outputs/compliance/prowler_threatscore/models.py
@@ -79,3 +79,29 @@ class ProwlerThreatScoreGCPModel(BaseModel):
ResourceName: str
CheckId: str
Muted: bool
+
+
+class ProwlerThreatScoreM365Model(BaseModel):
+ """
+ ProwlerThreatScoreM365Model generates a finding's output in M365 Prowler ThreatScore Compliance format.
+ """
+
+ Provider: str
+ Description: str
+ TenantId: str
+ Location: str
+ AssessmentDate: str
+ Requirements_Id: str
+ Requirements_Description: str
+ Requirements_Attributes_Title: str
+ Requirements_Attributes_Section: str
+ Requirements_Attributes_SubSection: Optional[str]
+ Requirements_Attributes_AttributeDescription: str
+ Requirements_Attributes_AdditionalInformation: str
+ Requirements_Attributes_LevelOfRisk: int
+ Status: str
+ StatusExtended: str
+ ResourceId: str
+ ResourceName: str
+ CheckId: str
+ Muted: bool
diff --git a/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_m365.py b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_m365.py
new file mode 100644
index 0000000000..26c5d01af0
--- /dev/null
+++ b/prowler/lib/outputs/compliance/prowler_threatscore/prowler_threatscore_m365.py
@@ -0,0 +1,91 @@
+from prowler.lib.check.compliance_models import Compliance
+from prowler.lib.outputs.compliance.compliance_output import ComplianceOutput
+from prowler.lib.outputs.compliance.prowler_threatscore.models import (
+ ProwlerThreatScoreM365Model,
+)
+from prowler.lib.outputs.finding import Finding
+
+
+class ProwlerThreatScoreM365(ComplianceOutput):
+ """
+ This class represents the M365 Prowler ThreatScore compliance output.
+
+ Attributes:
+ - _data (list): A list to store transformed data from findings.
+ - _file_descriptor (TextIOWrapper): A file descriptor to write data to a file.
+
+ Methods:
+ - transform: Transforms findings into M365 Prowler ThreatScore compliance format.
+ """
+
+ def transform(
+ self,
+ findings: list[Finding],
+ compliance: Compliance,
+ compliance_name: str,
+ ) -> None:
+ """
+ Transforms a list of findings into M365 Prowler ThreatScore compliance format.
+
+ Parameters:
+ - findings (list): A list of findings.
+ - compliance (Compliance): A compliance model.
+ - compliance_name (str): The name of the compliance model.
+
+ Returns:
+ - None
+ """
+ for finding in findings:
+ # Get the compliance requirements for the finding
+ finding_requirements = finding.compliance.get(compliance_name, [])
+ for requirement in compliance.Requirements:
+ if requirement.Id in finding_requirements:
+ for attribute in requirement.Attributes:
+ compliance_row = ProwlerThreatScoreM365Model(
+ Provider=finding.provider,
+ Description=compliance.Description,
+ TenantId=finding.account_uid,
+ Location=finding.region,
+ AssessmentDate=str(finding.timestamp),
+ Requirements_Id=requirement.Id,
+ Requirements_Description=requirement.Description,
+ Requirements_Attributes_Title=attribute.Title,
+ Requirements_Attributes_Section=attribute.Section,
+ Requirements_Attributes_SubSection=attribute.SubSection,
+ Requirements_Attributes_AttributeDescription=attribute.AttributeDescription,
+ Requirements_Attributes_AdditionalInformation=attribute.AdditionalInformation,
+ Requirements_Attributes_LevelOfRisk=attribute.LevelOfRisk,
+ Status=finding.status,
+ StatusExtended=finding.status_extended,
+ ResourceId=finding.resource_uid,
+ ResourceName=finding.resource_name,
+ CheckId=finding.check_id,
+ Muted=finding.muted,
+ )
+ self._data.append(compliance_row)
+ # Add manual requirements to the compliance output
+ for requirement in compliance.Requirements:
+ if not requirement.Checks:
+ for attribute in requirement.Attributes:
+ compliance_row = ProwlerThreatScoreM365Model(
+ Provider=compliance.Provider.lower(),
+ Description=compliance.Description,
+ TenantId="",
+ Location="",
+ AssessmentDate=str(finding.timestamp),
+ Requirements_Id=requirement.Id,
+ Requirements_Description=requirement.Description,
+ Requirements_Attributes_Title=attribute.Title,
+ Requirements_Attributes_Section=attribute.Section,
+ Requirements_Attributes_SubSection=attribute.SubSection,
+ Requirements_Attributes_AttributeDescription=attribute.AttributeDescription,
+ Requirements_Attributes_AdditionalInformation=attribute.AdditionalInformation,
+ Requirements_Attributes_LevelOfRisk=attribute.LevelOfRisk,
+ Status="MANUAL",
+ StatusExtended="Manual check",
+ ResourceId="manual_check",
+ ResourceName="Manual check",
+ CheckId="manual",
+ Muted=False,
+ )
+ self._data.append(compliance_row)
diff --git a/prowler/lib/outputs/finding.py b/prowler/lib/outputs/finding.py
index f8aab16555..b7547da815 100644
--- a/prowler/lib/outputs/finding.py
+++ b/prowler/lib/outputs/finding.py
@@ -245,6 +245,14 @@ class Finding(BaseModel):
)
output_data["region"] = f"namespace: {check_output.namespace}"
+ elif provider.type == "github":
+ output_data["auth_method"] = provider.auth_method
+ output_data["resource_name"] = check_output.resource_name
+ output_data["resource_uid"] = check_output.resource_id
+ output_data["account_name"] = provider.identity.account_name
+ output_data["account_uid"] = provider.identity.account_id
+ output_data["region"] = check_output.repository
+
elif provider.type == "m365":
output_data["auth_method"] = (
f"{provider.identity.identity_type}: {provider.identity.identity_id}"
diff --git a/prowler/lib/outputs/html/html.py b/prowler/lib/outputs/html/html.py
index aeb11aebfc..f775a00d3d 100644
--- a/prowler/lib/outputs/html/html.py
+++ b/prowler/lib/outputs/html/html.py
@@ -544,11 +544,55 @@ class HTML(Output):
)
return ""
+ @staticmethod
+ def get_github_assessment_summary(provider: Provider) -> str:
+ """
+ get_github_assessment_summary gets the HTML assessment summary for the provider
+
+ Args:
+ provider (Provider): the provider object
+
+ Returns:
+ str: the HTML assessment summary
+ """
+ try:
+ return f"""
+